(API Change) Remove encoder callback boilerplate
API Changed (in struct obs_encoder_info): ---------------------------------------- bool (*get_audio_info)(void *data, struct audio_convert_info *info); bool (*get_video_info)(void *data, struct video_scale_info *info); To: ---------------------------------------- void (*get_audio_info)(void *data, struct audio_convert_info *info); void (*get_video_info)(void *data, struct video_scale_info *info); The encoder video/audio information callbacks no longer need to manually query the libobs video/audio information, that information is now passed via the parameter, which the callbacks can modify. The refactor that reduces boilerplate in the encoder video/audio information callbacks also removes the need for their return values, so change the return types to void.
This commit is contained in:
@@ -273,14 +273,10 @@ static bool libfdk_extra_data(void *data, uint8_t **extra_data, size_t *size)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool libfdk_audio_info(void *data, struct audio_convert_info *info)
|
||||
static void libfdk_audio_info(void *data, struct audio_convert_info *info)
|
||||
{
|
||||
UNUSED_PARAMETER(data);
|
||||
|
||||
memset(info, 0, sizeof(struct audio_convert_info));
|
||||
info->format = AUDIO_FORMAT_16BIT;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static size_t libfdk_frame_size(void *data)
|
||||
|
Reference in New Issue
Block a user