[FFmpeg-devel] [PATCH 05/13] lavc: remove the FF_API_AUDIO_OLD cruft.

Anton Khirnov anton
Thu Feb 3 16:35:36 CET 2011


---
 libavcodec/avcodec.h  |   29 -----------------------------
 libavcodec/resample.c |   11 -----------
 libavcodec/utils.c    |   14 --------------
 3 files changed, 0 insertions(+), 54 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index cf0c5f7..20b72dc 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -52,9 +52,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
@@ -3095,13 +3092,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
  *
@@ -3560,25 +3550,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 2728315..10317f3 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 e9db33e..ada0d21 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -652,20 +652,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)
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list