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

Stefano Sabatini stefano.sabatini-lala at poste.it
Wed Aug 31 00:04:45 CEST 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-lavfi-simplify-signature-for-avfilter_get_audio_buff.patch
Type: text/x-diff
Size: 10778 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110831/77da1bf7/attachment.bin>


More information about the ffmpeg-devel mailing list