[FFmpeg-devel] [PATCH] lavfi audio framework

Stefano Sabatini stefano.sabatini-lala
Thu Aug 12 23:23:14 CEST 2010


On date Thursday 2010-08-12 12:05:29 -0700, S.N. Hemanth Meenakshisundaram encoded:
> 
> Hi Stefano,
> 
> Since each buffer's sample format may be potentially different, the one in
> the link can't be relied upon. So I put it in as a separate parameter to
> get_audio_buffer.
> 
> Other fixes done.
> 
> ---
>  doc/APIchanges         |    4 ++
>  libavfilter/avfilter.c |   56 +++++++++++++++++++++++++++
>  libavfilter/avfilter.h |   94 +++++++++++++++++++++++++++++++++++++++++++---
>  libavfilter/defaults.c |   98 ++++++++++++++++++++++++++++++++++++++++++++++++
>  libavfilter/formats.c  |    3 +-
>  5 files changed, 248 insertions(+), 7 deletions(-)
[...] 

>  /**
> + * Request an audio samples buffer with a specific set of permissions.
> + *
> + * @param link           the output link to the filter from which the buffer will
> + *                       be requested
> + * @param perms          the required access permissions
> + * @param samples_nb     the number of samples in the buffer to allocate
> + * @param channel_layout the number and type of channels per sample in the buffer to allocate
> + * @param sample_fmt     the format of each sample in the buffer to allocate
> + * @return               A reference to the samples. This must be unreferenced with
> + *                       avfilter_unref_samples when you are finished with it.
> + */
> +AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms,
> +                                             int size, int64_t channel_layout,
> +                                             enum SampleFormat sample_fmt, int planar);

samples_nb is referenced in the doxy @params, but is not a parameter
of the function. Also please document the planar param.

Also maybe sample_fmt should be placed before the size param (looks
more natural to me).

[...]

Rest of the patch looks OK, please update against latest SVN.

Regards.
-- 
FFmpeg = Frightening & Fabulous Minimal Ponderous Eretic Game



More information about the ffmpeg-devel mailing list