[FFmpeg-cvslog] lavc: remove the FF_API_AUDIO_OLD cruft.

Anton Khirnov git at videolan.org
Wed Apr 20 04:52:18 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Feb  3 14:48:00 2011 +0100| [9b4f1cdb6a7e838c0261109e8a6262e78657ee7b] | committer: Anton Khirnov

lavc: remove the FF_API_AUDIO_OLD cruft.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b4f1cdb6a7e838c0261109e8a6262e78657ee7b
---

 libavcodec/avcodec.h  |   27 ---------------------------
 libavcodec/resample.c |   11 -----------
 libavcodec/utils.c    |   14 --------------
 libavcodec/version.h  |    3 ---
 4 files changed, 0 insertions(+), 55 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5d85b41..cf3664a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3227,14 +3227,6 @@ struct AVResampleContext;
 
 typedef struct ReSampleContext ReSampleContext;
 
-#if FF_API_AUDIO_OLD
-/**
- * @deprecated Use av_audio_resample_init() instead.
- */
-attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
-                                                          int output_rate, int input_rate);
-#endif
-
 /**
  *  Initialize audio resampling context.
  *
@@ -3706,25 +3698,6 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
  */
 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
 
-#if FF_API_AUDIO_OLD
-/**
- * Decode an audio frame from buf into samples.
- * Wrapper function which calls avcodec_decode_audio3.
- *
- * @deprecated Use avcodec_decode_audio3 instead.
- * @param avctx the codec context
- * @param[out] samples the output buffer
- * @param[in,out] frame_size_ptr the output buffer size in bytes
- * @param[in] buf the input buffer
- * @param[in] buf_size the input buffer size in bytes
- * @return On error a negative value is returned, otherwise the number of bytes
- * used or zero if no frame could be decompressed.
- */
-attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
-                         int *frame_size_ptr,
-                         const uint8_t *buf, int buf_size);
-#endif
-
 /**
  * Decode the audio frame of size avpkt->size from avpkt->data into samples.
  * Some decoders may support multiple frames in a single AVPacket, such
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index 8e66689..2185a11 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -218,17 +218,6 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
     return s;
 }
 
-#if FF_API_AUDIO_OLD
-ReSampleContext *audio_resample_init(int output_channels, int input_channels,
-                                     int output_rate, int input_rate)
-{
-    return av_audio_resample_init(output_channels, input_channels,
-                                  output_rate, input_rate,
-                                  AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16,
-                                  TAPS, 10, 0, 0.8);
-}
-#endif
-
 /* resample audio. 'nb_samples' is the number of input samples */
 /* XXX: optimize it ! */
 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6d31254..e90be46 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -679,20 +679,6 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
     return ret;
 }
 
-#if FF_API_AUDIO_OLD
-int attribute_align_arg avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
-                         int *frame_size_ptr,
-                         const uint8_t *buf, int buf_size)
-{
-    AVPacket avpkt;
-    av_init_packet(&avpkt);
-    avpkt.data = buf;
-    avpkt.size = buf_size;
-
-    return avcodec_decode_audio3(avctx, samples, frame_size_ptr, &avpkt);
-}
-#endif
-
 int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
                          int *frame_size_ptr,
                          AVPacket *avpkt)
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 08574f7..8c891e2 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -41,9 +41,6 @@
 #ifndef FF_API_PALETTE_CONTROL
 #define FF_API_PALETTE_CONTROL  (LIBAVCODEC_VERSION_MAJOR < 54)
 #endif
-#ifndef FF_API_AUDIO_OLD
-#define FF_API_AUDIO_OLD        (LIBAVCODEC_VERSION_MAJOR < 53)
-#endif
 #ifndef FF_API_VIDEO_OLD
 #define FF_API_VIDEO_OLD        (LIBAVCODEC_VERSION_MAJOR < 53)
 #endif



More information about the ffmpeg-cvslog mailing list