[FFmpeg-devel] [GSoC] Qualification Task
michaelni at gmx.at
Wed Mar 23 17:11:03 CET 2011
On Wed, Mar 23, 2011 at 06:25:15AM +0200, Mina Nagy Zaki wrote:
> On Tuesday 22 March 2011 17:35:39 Stefano Sabatini wrote:
> > > In both cases I can't seem to figure out how I can find the end of
> > > stream, which is important for some effects as they need to 'drain'
> > > (like the echo effect).
> > I suppose you read AVERROR_EOF from avfilter_request_frame() when you
> > reach the end of a stream. Note that I'm a bit rusty with libavfilter
> > audio, as it is some months I don't touch that code and I don't have a
> > good memory ;-), but I remember there was a problem with some filters
> > which needed that (in particular a video concatenation filter).
> > Check: cmdutils.c:get_filtered_audio_buffer(), it implements a pull
> > model, correct me if I'm wrong.
> I have already checked that, which is what lead me to the question in the first
> place. I can't really read AVERROR_EOF from request_frame() because audio
> filters don't(/shouldn't?) use it. get_filtered_audio_buffer() does a
> request_frame() on aout which propagates all the way to asrc (without passing
> through intermediate filters, because they don't/shouldn't use it) which then
> does a filter_samples that propagates all the way to aout! If I try to
> request_frame from the previous buffer it will reach asrc then eventually lead
> to calling my own effect's filter_samples, so now do I filter in filter_samples or
> request_frame :D And in any case, asrc never returns AVERROR_EOF anyway.
i would say
filtering should be on the push side not the pull (request_frame)
that way a filter can handle pushed data that has been pushed without
there having been a pull
> I have examined most of the RFC thread about lavfi audio, but I couldn't really
> find a discussion about push/pull models. The current mixture is a slight mess.
i cant speak about audio as ive not thought much about it but for video
everyone thinkng about it seems to end up with a very similar push/pull
model that we have (for example mplayers model is quite similar in that
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel