[FFmpeg-devel] [PATCH] [2/??] [3/3] Filter graphs - Parser for a graph description

Michael Niedermayer michaelni
Tue Apr 1 23:58:40 CEST 2008


On Tue, Apr 01, 2008 at 11:43:55PM +0200, Michael Niedermayer wrote:
> On Tue, Apr 01, 2008 at 10:49:39PM +0200, Vitor Sessak wrote:
> > Hi
> > 
> > Michael Niedermayer wrote:
> > > On Sun, Mar 30, 2008 at 01:50:51PM +0200, Vitor Sessak wrote:
> > 
> > (...)
> > 
> > >> static int query_formats(AVFilterGraph *graph)
> > >> {
> > > 
> > > Now i dont think this belongs in the parser code ...
> > > There should be IMHO
> > > A. code for a filter graph (a single flat filter graph that is a filter graph
> > >    is not a filter) If we ever see the need for having filter graphs be
> > >    filters this can be added later as a filter easily. Not weirdly
> > >    intermingled with everything else.
> > > B. the parser
> > 
> > This function is _not_ passed as a callback to AVFilter.query_formats 
> > (but it was some svn revs ago). It is called by the code 
> > (avfilter_graph_config_formats()) that tries to set a agreed upon filter 
> > format for all filters.
> 
> This does NOT belong in the parser! Absolutely nothing related to colorspace
> negotation belongs in the parser. No matter in what form.

A Parser takes a string and builds a graph of filters. At that point the
parser is done with its work and you have a bunch of filters with links
between them.
Next and indepednant on how the graph was constructed some colorspace
format resolving code would be run over the graph, this might insert
scale filters.
And as last step all the remaining init/config is done this again should
be independant of how the previous steps have been done.

Is there some problem/disadvantage with my suggestion? If so please elaborate.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080401/b42c249e/attachment.pgp>



More information about the ffmpeg-devel mailing list