From ba22295e76f0cc97f6dcce32bc3ade9ad3ab822f Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 10 Feb 2015 12:13:53 +0000 Subject: [PATCH] lavc: deprecate VIMA decoder Signed-off-by: Paul B Mahol --- doc/APIchanges | 3 +++ libavcodec/allcodecs.c | 2 ++ libavcodec/avcodec.h | 2 ++ libavcodec/codec_desc.c | 2 ++ libavcodec/version.h | 3 +++ libavcodec/vima.c | 2 ++ 6 files changed, 14 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index d3bac9a9d7..e8ea0129ea 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2014-08-09 API changes, most recent first: +2015-02-xx - xxxxxxx - lavc 56.21.102 + Deprecate VIMA decoder. + 2015-01-27 - 728685f - lavc 56.12.0, lavu 54.8.0 - avcodec.h, frame.h Add AV_PKT_DATA_AUDIO_SERVICE_TYPE and AV_FRAME_DATA_AUDIO_SERVICE_TYPE for storing the audio service type as side data. diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 2fe3609a17..59fe6811fc 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -477,7 +477,9 @@ void avcodec_register_all(void) REGISTER_DECODER(ADPCM_VIMA, adpcm_vima); REGISTER_DECODER(ADPCM_XA, adpcm_xa); REGISTER_ENCDEC (ADPCM_YAMAHA, adpcm_yamaha); +#if FF_API_VIMA_DECODER REGISTER_DECODER(VIMA, vima); +#endif /* subtitles */ REGISTER_ENCDEC (SSA, ssa); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 87b53a2840..982b5a8373 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -390,7 +390,9 @@ enum AVCodecID { AV_CODEC_ID_ADPCM_IMA_APC, AV_CODEC_ID_ADPCM_VIMA_DEPRECATED, AV_CODEC_ID_ADPCM_VIMA = MKBETAG('V','I','M','A'), +#if FF_API_VIMA_DECODER AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'), +#endif AV_CODEC_ID_ADPCM_AFC = MKBETAG('A','F','C',' '), AV_CODEC_ID_ADPCM_IMA_OKI = MKBETAG('O','K','I',' '), AV_CODEC_ID_ADPCM_DTK = MKBETAG('D','T','K',' '), diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 0af66f495a..a87a831ae6 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -2807,6 +2807,7 @@ static const AVCodecDescriptor codec_descriptors[] = { AV_CODEC_PROP_LOSSLESS, }, +#if FF_API_VIMA_DECODER { .id = AV_CODEC_ID_VIMA, .type = AVMEDIA_TYPE_AUDIO, @@ -2814,6 +2815,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio (deprecated id)"), .props = AV_CODEC_PROP_LOSSY, }, +#endif { .id = AV_CODEC_ID_ADPCM_VIMA_DEPRECATED, .type = AVMEDIA_TYPE_AUDIO, diff --git a/libavcodec/version.h b/libavcodec/version.h index 7e2750ee2d..8a86414f8e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -48,6 +48,9 @@ * the public API and may change, break or disappear at any time. */ +#ifndef FF_API_VIMA_DECODER +#define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 57) +#endif #ifndef FF_API_REQUEST_CHANNELS #define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 57) #endif diff --git a/libavcodec/vima.c b/libavcodec/vima.c index ba3f07aad6..74d6a9a184 100644 --- a/libavcodec/vima.c +++ b/libavcodec/vima.c @@ -217,6 +217,7 @@ AVCodec ff_adpcm_vima_decoder = { .capabilities = CODEC_CAP_DR1, }; +#if FF_API_VIMA_DECODER AVCodec ff_vima_decoder = { .name = "vima", .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio"), @@ -226,3 +227,4 @@ AVCodec ff_vima_decoder = { .decode = decode_frame, .capabilities = CODEC_CAP_DR1, }; +#endif