(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

@@ -211,22 +211,18 @@ struct obs_encoder_info {
/**
* Returns desired audio format and sample information
*
* @param data Data associated with this encoder context
* @param[out] info Audio format information
* @return true if specific format is desired, false
* otherwise
* @param data Data associated with this encoder context
* @param[in/out] info Audio format information
*/
bool (*get_audio_info)(void *data, struct audio_convert_info *info);
void (*get_audio_info)(void *data, struct audio_convert_info *info);
/**
* Returns desired video format information
*
* @param data Data associated with this encoder context
* @param[out] info Video format information
* @return true if specific format is desired, false
* otherwise
* @param data Data associated with this encoder context
* @param[in/out] info Video format information
*/
bool (*get_video_info)(void *data, struct video_scale_info *info);
void (*get_video_info)(void *data, struct video_scale_info *info);
};
EXPORT void obs_register_encoder_s(const struct obs_encoder_info *info,