[FFmpeg-devel] [RFC] Simplify avfilter_get_audio_buffer()

Michael Niedermayer michaelni at gmx.at
Wed Aug 31 22:28:58 CEST 2011


On Wed, Aug 31, 2011 at 12:04:45AM +0200, Stefano Sabatini wrote:
> Hi,
> 
> this is meant to simplify the signature and make it consistent with
> the video API.
> 
> The only code using the feature is af_aconvert.c (not yet committed):
> 
>     if (aconvert->convert_chlayout) {
>         aconvert->mix_samplesref =
>             avfilter_get_audio_buffer(outlink,
>                                       AV_PERM_WRITE | AV_PERM_REUSE2,
>                                       inlink->format,
>                                       nb_samples,
>                                       outlink->channel_layout,
>                                       inlink->planar);
> 
> in this case it is requested a buffer with "formats" different from
> the ones specified in the output link.
> 
> This code can be replaced by a combination of av_samples_alloc() and
> avfilter_get_audio_buffer_ref_from_arrays() (which we may eventually
> merge in a avfilter_alloc_audio_buffer() function).
> 
> This change is going to break ABI/API, so I'd commit it in the
> instability period 1-month timeframe just after the next incoming
> major bump (which I need for the sink API unification).
> 
> Anyone against?
> -- 
> FFmpeg = Formidable & Fanciful Mortal Powered Exciting Ghost

>  af_aresample.c |    5 +----
>  avfilter.c     |   14 +++++---------
>  avfilter.h     |   17 ++++++-----------
>  defaults.c     |   25 ++++++++++---------------
>  src_movie.c    |    4 +---
>  5 files changed, 23 insertions(+), 42 deletions(-)
> 357425c45867b0d0010584f4575ca00d09705d09  0018-lavfi-simplify-signature-for-avfilter_get_audio_buff.patch
> From 06d86b94545d1d0a8d191a61a06e9c9c00edb6eb Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Tue, 30 Aug 2011 23:22:29 +0200
> Subject: [PATCH] lavfi: simplify signature for avfilter_get_audio_buffer() and friends
> 
> The additional parameters were never used and are complicating the
> function interface. Also, they're inconsistent with the way the video
> API works.
> 
> So this assumes that a requested samples buffer will have *always* the
> format specified in the requested link.
> 
> This breaks API and ABI, so it will require a major bump.

iam not sure this needs a major bump
not even ffmpeg.c used it yet, so id almost tend to say this is a
non issue ABI wise


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110831/7d4772ce/attachment.asc>


More information about the ffmpeg-devel mailing list