From 284e65d64ea91dc172dea1b843d162b22ed48730 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 22 Jan 2012 10:56:42 +0100 Subject: [PATCH] lavc: remove disabled FF_API_OLD_SAMPLE_FMT cruft. --- libavcodec/audioconvert.c | 17 ----------------- libavcodec/audioconvert.h | 20 -------------------- libavcodec/avcodec.h | 20 -------------------- libavcodec/utils.c | 6 ------ libavcodec/version.h | 3 --- 5 files changed, 66 deletions(-) diff --git a/libavcodec/audioconvert.c b/libavcodec/audioconvert.c index a244345..9cb465c 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 - uint64_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 f50eb3e..0a63130 100644 --- a/libavcodec/audioconvert.h +++ b/libavcodec/audioconvert.h @@ -33,26 +33,6 @@ #include "avcodec.h" #include "libavutil/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 5a5c4be..a31c63e 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -424,18 +424,6 @@ enum CodecID { CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information. }; -#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 "libavutil/audioconvert.h" @@ -4197,14 +4185,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_bytes_per_sample() 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 184f67e..bcdb71a 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1658,12 +1658,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_bytes_per_sample(sample_fmt) << 3; -} -#endif - #if !HAVE_THREADS int ff_thread_init(AVCodecContext *s){ return -1; diff --git a/libavcodec/version.h b/libavcodec/version.h index f3a8be6..20c8437 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -38,9 +38,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_OLD_SAMPLE_FMT -#define FF_API_OLD_SAMPLE_FMT (LIBAVCODEC_VERSION_MAJOR < 54) -#endif #ifndef FF_API_OLD_AUDIOCONVERT #define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 54) #endif -- 2.7.4