[FFmpeg-devel] [PATCH] lavc: deprecate VIMA decoder
Paul B Mahol
onemda at gmail.com
Tue Feb 10 13:14:23 CET 2015
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
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 e46124a..25f8940 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2014-08-09
API changes, most recent first:
+2015-01-xx - xxxxxxx - lavc 56.21.102
+ Deprecate VIMA decoder.
+
2015-01-xx - xxxxxxx - 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 2fe3609..59fe681 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 87b53a2..1266799 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'),
+#ifdef 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 0af66f4..a87a831 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 7e2750e..8a86414 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 ba3f07a..74d6a9a 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
--
1.7.11.2
More information about the ffmpeg-devel
mailing list