[FFmpeg-devel] [PATCH] lavr: deprecate the entire library
James Almer
jamrial at gmail.com
Thu Dec 28 18:25:45 EET 2017
On 12/25/2017 2:53 PM, Rostislav Pehlivanov wrote:
> diff --git a/libavresample/avresample.h b/libavresample/avresample.h
> index 193443e2a6..57889c572c 100644
> --- a/libavresample/avresample.h
> +++ b/libavresample/avresample.h
> @@ -103,10 +103,10 @@
>
> #define AVRESAMPLE_MAX_CHANNELS 32
>
> -typedef struct AVAudioResampleContext AVAudioResampleContext;
> +typedef attribute_deprecated struct AVAudioResampleContext AVAudioResampleContext;
>
> /** Mixing Coefficient Types */
> -enum AVMixCoeffType {
> +enum attribute_deprecated AVMixCoeffType {
> AV_MIX_COEFF_TYPE_Q8, /** 16-bit 8.8 fixed-point */
> AV_MIX_COEFF_TYPE_Q15, /** 32-bit 17.15 fixed-point */
> AV_MIX_COEFF_TYPE_FLT, /** floating-point */
> @@ -114,13 +114,13 @@ enum AVMixCoeffType {
> };
>
> /** Resampling Filter Types */
> -enum AVResampleFilterType {
> +enum attribute_deprecated AVResampleFilterType {
> AV_RESAMPLE_FILTER_TYPE_CUBIC, /**< Cubic */
> AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall Windowed Sinc */
> AV_RESAMPLE_FILTER_TYPE_KAISER, /**< Kaiser Windowed Sinc */
> };
>
> -enum AVResampleDitherMethod {
> +enum attribute_deprecated AVResampleDitherMethod {
> AV_RESAMPLE_DITHER_NONE, /**< Do not use dithering */
> AV_RESAMPLE_DITHER_RECTANGULAR, /**< Rectangular Dither */
> AV_RESAMPLE_DITHER_TRIANGULAR, /**< Triangular Dither*/
wm4 found out that deprecating enums does basically nothing. some
compilers complain about the attribute, and others don't say anything at
all (aka, not warn when the enum is being used). I don't know if that
also applies to structs, but it might be a good idea to find out.
I'd say just add the deprecated attribute to functions as per usual.
More information about the ffmpeg-devel
mailing list