[FFmpeg-devel] [RFC] libavfilter audio API and related issues
S.N. Hemanth Meenakshisundaram
Thu Jul 1 10:42:51 CEST 2010
On 06/25/2010 05:10 PM, Stefano Sabatini wrote:
> On date Friday 2010-06-25 03:52:45 -0700, S.N. Hemanth Meenakshisundaram encoded:
Here is the working af_resample.c and associated Makefile and
This converts to specified sample format and to specified channel layout
if an appropriate channel layout conversion function is available.
I tested it by looking at the buffer contents and sizes manually and
also by resetting the SDL audio parameters in the ffplay.c code. However
how can this be done on the fly automatically? The SDL audio only seems
to provide a chance to configure channel layout/sample format etc once
Some TODOs and things to note:
1. For selecting the correct channel layout function, I have avoided
testing the condition for every buffer like is currently done in
resample.c and instead only test when input channels change. However,
the result is not elegant. I am still thinking of a better way to do
this. Any suggestions?
2. Need to make some channel conversion functions more generic and/or
add more functions to handle remaining type of channel conversions.
3. Need to get rid of the the sample format assumption during channel
4. Also found and fixed some bugs in my earlier audio filter framework
code. I will send that as a separate patch.
5. Is it ok to remove the existing code in ffplay.c that calls the
resample functions in lavc? This audio filter code is no longer
dependent on lavc, only on lavu.
6. Need to remove some code from resample.c and
audioconvert.h/audioconvert.c in lavc which are now in either lavu
(audiodesc.h, audiodesc.c) or af_resample itself.
Am wondering if I should do the tasks above first or if I should start
writing a af_resample2 for sample rate/pts modification (resample2.c
functionality in lavc).
Please review and comment on this patch and the rest of the audio filter
framework changes that follow.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel