diff options
author | James Almer <jamrial@gmail.com> | 2019-09-21 19:57:11 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-09-27 10:37:11 -0300 |
commit | f96a8b015f2fa62b18a613ebdb3c26da50951652 (patch) | |
tree | 987a30dc2e3eeceaa605a29176ead08fa77f2c9e /libavcodec/mpeg4audio.h | |
parent | bb697f30ab28604c57f4ac396f31116fd765d4b8 (diff) | |
download | ffmpeg-f96a8b015f2fa62b18a613ebdb3c26da50951652.tar.gz |
avcodec/mpeg4audio: add avpriv_mpeg4audio_get_config2()
Identical to avpriv_mpeg4audio_get_config() except taking a size argument in
bytes, and featuring a new logging context paremeter.
Schedule avpriv_mpeg4audio_get_config() for removal as soon as major is bumped
as well.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mpeg4audio.h')
-rw-r--r-- | libavcodec/mpeg4audio.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h index b9cea8af17..00aa680c13 100644 --- a/libavcodec/mpeg4audio.h +++ b/libavcodec/mpeg4audio.h @@ -53,11 +53,13 @@ extern const uint8_t ff_mpeg4audio_channels[8]; * @param[in] c MPEG4AudioConfig structure to fill. * @param[in] gb Extradata from container. * @param[in] sync_extension look for a sync extension after config if true. + * @param[in] logctx opaque struct starting with an AVClass element, used for logging. * @return On error -1 is returned, on success AudioSpecificConfig bit index in extradata. */ int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb, - int sync_extension); + int sync_extension, void *logctx); +#if LIBAVCODEC_VERSION_MAJOR < 59 /** * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. * @param[in] c MPEG4AudioConfig structure to fill. @@ -68,6 +70,19 @@ int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb, */ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int bit_size, int sync_extension); +#endif + +/** + * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. + * @param[in] c MPEG4AudioConfig structure to fill. + * @param[in] buf Extradata from container. + * @param[in] size Extradata size in bytes. + * @param[in] sync_extension look for a sync extension after config if true. + * @param[in] logctx opaque struct starting with an AVClass element, used for logging. + * @return negative AVERROR code on error, AudioSpecificConfig bit index in extradata on success. + */ +int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, + int size, int sync_extension, void *logctx); enum AudioObjectType { AOT_NULL, |