[FFmpeg-devel] [PATCH 1/2] Add split filter.

Michael Niedermayer michaelni
Wed Aug 4 03:30:04 CEST 2010


On Tue, Aug 03, 2010 at 09:07:11PM +0200, Stefano Sabatini wrote:
> On date Tuesday 2010-08-03 18:38:33 +0200, Michael Niedermayer encoded:
> > On Sat, Jul 31, 2010 at 02:07:12AM +0200, Stefano Sabatini wrote:
> [...]
> > > +#include "avfilter.h"
> > > +
> > > +static void start_frame(AVFilterLink *inlink, AVFilterPicRef *picref)
> > > +{
> > > +    avfilter_start_frame(inlink->dst->outputs[0],
> > > +                         avfilter_ref_pic(picref, ~AV_PERM_WRITE));
> > > +    avfilter_start_frame(inlink->dst->outputs[1],
> > > +                         avfilter_ref_pic(picref, ~AV_PERM_WRITE));
> > > +}
> > > +
> > > +static void end_frame(AVFilterLink *inlink)
> > > +{
> > > +    avfilter_end_frame(inlink->dst->outputs[0]);
> > > +    avfilter_end_frame(inlink->dst->outputs[1]);
> > > +
> > > +    avfilter_unref_pic(inlink->cur_pic);
> > > +}
> > > +
> > > +static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
> > > +{
> > > +    avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
> > > +    avfilter_draw_slice(inlink->dst->outputs[1], y, h, slice_dir);
> > > +}
> > 
> > this implementation does have some issues as frames are pushed down both
> > sides no matter if either is ready.
> > Its not a problem as such but what iam thinking of is that the filter core
> > should insert split and fifo filters as needed and not require them to be
> > manually specified
> 
> I cannot understand you, split defines the topology of the filter
> graph, so I suppose that should be defined by the user.
> 
> The filter graph is supposed to be "ready" when it has been inited and
> configured, then it is a problem of each single filter/sink/source to
> manage each following operation.
> 
> fifo is mainly useful as a testing/debugging device, I cannot find how
> it may be useful in other contexts.

a filter graph that splits and merges needs fifos if the time between
the 2 pathes differ or it will deadlock or not work at all.
its not reasonable to expect the user to know where he needs to insert a
fifo filter, the core should do this

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100804/f081a46e/attachment.pgp>



More information about the ffmpeg-devel mailing list