[FFmpeg-devel] [PATCH 06/10] asrc_abuffer: deprecate av_asrc_buffer_* functions.

Stefano Sabatini stefasab at gmail.com
Sun May 6 00:01:29 CEST 2012


On date Saturday 2012-05-05 10:22:34 +0200, Nicolas George encoded:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/asrc_abuffer.h |    9 +++++++++
>  libavfilter/src_buffer.c   |    4 ++++
>  2 files changed, 13 insertions(+)
> 
> 
> Putting attribute_deprecated in the previous line makes the patch more
> readable, and avoids overly long lines and broken indent.
> 
> 
> diff --git a/libavfilter/asrc_abuffer.h b/libavfilter/asrc_abuffer.h
> index 4352c74..ebf55fd 100644
> --- a/libavfilter/asrc_abuffer.h
> +++ b/libavfilter/asrc_abuffer.h
> @@ -38,7 +38,10 @@
>   * @param planar flag to indicate if audio data is planar or packed
>   * @param pts presentation timestamp of the audio buffer
>   * @param flags unused
> + *
> + * @deprecated use av_buffersrc_add_ref() instead.
>   */
> +attribute_deprecated
>  int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc,
>                                 uint8_t *data[8], int linesize[8],
>                                 int nb_samples, int sample_rate,
> @@ -59,7 +62,10 @@ int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc,
>   * @param ch_layout channel layout of the audio data
>   * @param pts presentation timestamp of the audio buffer
>   * @param flags unused
> + *
> + * @deprecated use av_buffersrc_add_ref() instead.
>   */
> +attribute_deprecated
>  int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc,
>                                uint8_t *buf, int buf_size,
>                                int sample_rate,
> @@ -72,7 +78,10 @@ int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc,
>   * @param abuffersrc audio source buffer context
>   * @param samplesref buffer ref to queue
>   * @param flags unused
> + *
> + * @deprecated use av_buffersrc_add_ref() instead.
>   */
> +attribute_deprecated
>  int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffersrc,
>                                          AVFilterBufferRef *samplesref,
>                                          int av_unused flags);

Also: please update av_buffersrc_add_ref() documentation before
applying this patch, it currently only mentions video.

BTW I wonder if av_buffersrc_add_buffer_ref() was not a better -
altough longer name - since "ref" alone may be a bit misleading
(reference to what?).
-- 
FFmpeg = Faithful Forgiving Martial Political Extensive Gangster


More information about the ffmpeg-devel mailing list