[FFmpeg-devel] [GSoC] Qualification Task

Stefano Sabatini stefano.sabatini-lala at poste.it
Tue Mar 22 15:14:28 CET 2011


On date Tuesday 2011-03-22 13:42:33 +0200, Mina Nagy Zaki encoded:
> On Tuesday 22 March 2011 13:01:24 Stefano Sabatini wrote:
> > On date Tuesday 2011-03-22 21:28:10 +1100, Peter Ross encoded:
> > > On Tue, Mar 22, 2011 at 09:54:02AM +0200, Mina Nagy Zaki wrote:
> > > > Hi,
> > > > I've ported a small filter from sox, the 'earwax' filter, essentially a
> > > > stereo widening effect. It's a relatively simple filter, I was
> > > > actually looking to write a general sox wrapper but turns out there
> > > > would be a few things that would make this slightly difficult.
> > > 
> > > Can you elaborate on this, just curious.
> > 
> > I remeber the mail from Hemanth, he said that there was the need to
> > use threading for it. I have the last patch from Hemanth, and the
> > mails with the discussion, and I can ask Hemanth to comment on this.
> 
> IMHO threading could be avoided. I would like to see discussion/patches as 
> well.

>From a private mail I received on 2011-01-28:
> Attached is the most recent patch I could find. There is a bottleneck
> however with sox:
>
> The sox API that starts off the filtering of data - sox_flow_effects() -
> keeps trying to pull data from the input effect defined in lavfi until
> it sends EOF, otherwise doesn't return. So I changed the af_sox input
> effect behavior in the patch below to always send EOF after giving every
> buffer to the sox chain. This means the sox chain would be reinitialized
> when calling sox_flow_effects for each audio buffer. This causes sox to
> crash after playing out a few buffers.
>
> Instead, it might be better to call sox_flow_effects once in a new
> thread and let it fetch and output its buffers from/to the FIFOs at the
> input and output.
>
> Hope that helps.
>
> Regards,
> Hemanth

Attached patch, compile but completely untested. You need to configure
FFmpeg with --enable-libsox.
-- 
FFmpeg = Friendly & Fierce Monstrous Portable Educated Generator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-lavfi-add-sox-wrapper.patch
Type: text/x-diff
Size: 16338 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110322/3ecbe679/attachment.bin>


More information about the ffmpeg-devel mailing list