[FFmpeg-devel] [RFC] libavfilter audio API and related issues

S.N. Hemanth Meenakshisundaram smeenaks
Wed Jun 2 08:29:48 CEST 2010


Michael Niedermayer <michaelni <at> gmx.at> writes:

> 
> On Sat, May 22, 2010 at 10:37:18PM -0700, S.N. Hemanth Meenakshisundaram wrote:
> > On 05/02/2010 12:08 PM, Stefano Sabatini wrote:
> >> On date Wednesday 2010-04-28 07:07:54 +0000, S.N. Hemanth 
> >> Meenakshisundaram encoded:
> >>    
> >>> Stefano Sabatini<stefano.sabatini-lala<at>  poste.it>  writes:
> >>>      
> >>>> Follow some notes about a possible design for the audio support in
> >>>> libavfilter.
> >>>>
> >>>> AVFilterSamples struct
> >>>> ======================
> >>>>
> >>>> (Already defined in afilters, but renamed AVFilterBuffer at some
> >>>> point.)
> >>>>
> >>>> Follows a possible definition (with some differences whit respect to
> >>>> that currently implemented in afilters):
> >>>>
> >>>>        
> >>> [...]
> >>>      
> >>    
> >
> > Hi,
> >
> > I started off trying to make the ffplay changes required for audio 
> > [...]
> >
> 
> there is nothing that prevents one from creating a file where such things
> change. (and we try to support all files)
> [...]
> 
> also please avoid memcpy() or explain why each is unavoidable in your patch
> 
> [...]
> 

Hi All,

I am working on the audio structures and functions. Keeping parameters like # of
channels at the buffer level as Michael recommended above. I have a couple of
questions at this point:

1. I need to use functions like avcodec_channel_layout_num_channels() from
audioconvert.c and avcodec_channel_layout_num_channels() from resample.c

Is it ok to define new functions in libavfilter since we eventually hope to
replace resample.c etc and also lavfi shouldn't be dependent on lavc. Please let
me know if I should call existing functions instead.

2. If supported sample formats differ between adjacent filters, I am
automatically inserting a resampling filter in between just as a scaling filter
is inserted for video. But how should differences in supported channel layouts
be handled? Should this be left to individual filters to decide?

Regards,
Hemanth






More information about the ffmpeg-devel mailing list