libobs: Deprecate service multitrack check
This isn't particularly needed, as a service with multiple tracks won't be using multiple tracks to begin with anyway. This might change later, but for now just mark it deprecated.
This commit is contained in:
parent
86147d9719
commit
af09057395
@ -1018,27 +1018,10 @@ void obs_output_set_audio_conversion(
|
||||
output->audio_conversion_set = true;
|
||||
}
|
||||
|
||||
static inline bool service_supports_multitrack(const struct obs_output *output)
|
||||
{
|
||||
const struct obs_service *service = output->service;
|
||||
|
||||
if (!service || !service->info.supports_multitrack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return service->info.supports_multitrack(service->context.data);
|
||||
}
|
||||
|
||||
static inline size_t num_audio_mixes(const struct obs_output *output)
|
||||
{
|
||||
size_t mix_count = 1;
|
||||
|
||||
if ((output->info.flags & OBS_OUTPUT_SERVICE) != 0) {
|
||||
if (!service_supports_multitrack(output)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((output->info.flags & OBS_OUTPUT_MULTI_TRACK) != 0) {
|
||||
mix_count = 0;
|
||||
|
||||
|
@ -63,7 +63,7 @@ struct obs_service_info {
|
||||
const char *(*get_username)(void *data);
|
||||
const char *(*get_password)(void *data);
|
||||
|
||||
bool (*supports_multitrack)(void *data);
|
||||
bool (*deprecated_1)();
|
||||
|
||||
void (*apply_encoder_settings)(void *data,
|
||||
obs_data_t *video_encoder_settings,
|
||||
|
@ -645,5 +645,4 @@ struct obs_service_info rtmp_common_service = {
|
||||
.get_key = rtmp_common_key,
|
||||
.apply_encoder_settings = rtmp_common_apply_settings,
|
||||
.get_output_type = rtmp_common_get_output_type,
|
||||
.supports_multitrack = supports_multitrack,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user