[FFmpeg-devel] [PATCH 11/13] lavc: remove the FF_API_OLD_SAMPLE_FMT cruft.

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


---
 libavcodec/audioconvert.c |   17 -----------------
 libavcodec/audioconvert.h |   20 --------------------
 libavcodec/avcodec.h      |   23 -----------------------
 libavcodec/utils.c        |    6 ------
 4 files changed, 0 insertions(+), 66 deletions(-)

diff --git a/libavcodec/audioconvert.c b/libavcodec/audioconvert.c
index b29b030..d3612a4 100644
--- a/libavcodec/audioconvert.c
+++ b/libavcodec/audioconvert.c
@@ -31,23 +31,6 @@
 #include "avcodec.h"
 #include "audioconvert.h"
 
-#if FF_API_OLD_SAMPLE_FMT
-const char *avcodec_get_sample_fmt_name(int sample_fmt)
-{
-    return av_get_sample_fmt_name(sample_fmt);
-}
-
-enum AVSampleFormat avcodec_get_sample_fmt(const char* name)
-{
-    return av_get_sample_fmt(name);
-}
-
-void avcodec_sample_fmt_string (char *buf, int buf_size, int sample_fmt)
-{
-    av_get_sample_fmt_string(buf, buf_size, sample_fmt);
-}
-#endif
-
 int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
 {
     switch(nb_channels) {
diff --git a/libavcodec/audioconvert.h b/libavcodec/audioconvert.h
index ae6016a..38d325e 100644
--- a/libavcodec/audioconvert.h
+++ b/libavcodec/audioconvert.h
@@ -33,26 +33,6 @@
 #include "avcodec.h"
 #include "libavcore/audioconvert.h"
 
-#if FF_API_OLD_SAMPLE_FMT
-/**
- * @deprecated Use av_get_sample_fmt_string() instead.
- */
-attribute_deprecated
-void avcodec_sample_fmt_string(char *buf, int buf_size, int sample_fmt);
-
-/**
- * @deprecated Use av_get_sample_fmt_name() instead.
- */
-attribute_deprecated
-const char *avcodec_get_sample_fmt_name(int sample_fmt);
-
-/**
- * @deprecated Use av_get_sample_fmt() instead.
- */
-attribute_deprecated
-enum AVSampleFormat avcodec_get_sample_fmt(const char* name);
-#endif
-
 #if FF_API_OLD_AUDIOCONVERT
 /**
  * @deprecated Use av_get_channel_layout() instead.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 9736a8d..8f9e170 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_OLD_SAMPLE_FMT
-#define FF_API_OLD_SAMPLE_FMT   (LIBAVCODEC_VERSION_MAJOR < 53)
-#endif
 #ifndef FF_API_OLD_AUDIOCONVERT
 #define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 53)
 #endif
@@ -399,18 +396,6 @@ enum CodecID {
 #define CODEC_TYPE_NB         AVMEDIA_TYPE_NB
 #endif
 
-#if FF_API_OLD_SAMPLE_FMT
-#define SampleFormat AVSampleFormat
-
-#define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
-#define SAMPLE_FMT_U8   AV_SAMPLE_FMT_U8
-#define SAMPLE_FMT_S16  AV_SAMPLE_FMT_S16
-#define SAMPLE_FMT_S32  AV_SAMPLE_FMT_S32
-#define SAMPLE_FMT_FLT  AV_SAMPLE_FMT_FLT
-#define SAMPLE_FMT_DBL  AV_SAMPLE_FMT_DBL
-#define SAMPLE_FMT_NB   AV_SAMPLE_FMT_NB
-#endif
-
 #if FF_API_OLD_AUDIOCONVERT
 #include "libavcore/audioconvert.h"
 
@@ -3718,14 +3703,6 @@ char av_get_pict_type_char(int pict_type);
  */
 int av_get_bits_per_sample(enum CodecID codec_id);
 
-#if FF_API_OLD_SAMPLE_FMT
-/**
- * @deprecated Use av_get_bits_per_sample_fmt() instead.
- */
-attribute_deprecated
-int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
-#endif
-
 /* frame parsing */
 typedef struct AVCodecParserContext {
     void *priv_data;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 304a865..e304b74 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1066,12 +1066,6 @@ int av_get_bits_per_sample(enum CodecID codec_id){
     }
 }
 
-#if FF_API_OLD_SAMPLE_FMT
-int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt) {
-    return av_get_bits_per_sample_fmt(sample_fmt);
-}
-#endif
-
 #if !HAVE_THREADS
 int avcodec_thread_init(AVCodecContext *s, int thread_count){
     s->thread_count = thread_count;
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list