(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:
jp9000
2015-04-17 01:34:10 -07:00
parent 5c91d93d87
commit 4d002f588b
5 changed files with 28 additions and 42 deletions

View File

@@ -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)