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

Vitor Sessak vitor1001
Mon Apr 21 18:36:53 CEST 2008


Michael Niedermayer wrote:
> On Fri, Apr 18, 2008 at 05:35:40PM +0200, Vitor Sessak wrote:
>> Hi
>>
>> Michael Niedermayer wrote:
>>> On Sat, Apr 12, 2008 at 04:40:24PM +0200, Vitor Sessak wrote:
>>>> Hi
> [...]
>>> [...]
>>>>         // We need to parse the inputs of the filter after we create it, so
>>>>         // skip it by now
>>>>         filters = skip_inouts(filters);
>>>>
>>>>         if(!(filter = parse_filter(&filters, graph, index, log_ctx)))
>>>>             goto fail;
>>>>
>>>>         pad = parse_inouts(&inouts, &inout, chr == ',', LinkTypeIn, filter,
>>>>                            log_ctx);
>>> I do not like this design.
>> Me neither. But how else could I parse the following:
>>
>> (in) (T1) picInPic, rotate, split (T2) (out) ; (T2) vflip (T1)
>>
>> What will the parser do in the first "(T1)"? It don't have a pointer yet 
>> to the AVFilterContext of the picInPic filter to store in the InOut 
>> list. Nor does it have opened the vflip filter to make the link. Your 
>> point about linking several filters is only valid for things like:
> 
> 
> something approximately like: (in/out might not be hadled ideally)

I've done as you suggested. The code is more complex, but it is less 
ugly and more functional (now the comma links one or more filters). I 
guess that this would be needed sooner or later anyway for implementing 
all that is planned...

-Vitor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphparser.c
Type: text/x-csrc
Size: 12154 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080421/abef94ee/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphparser.h
Type: text/x-chdr
Size: 1643 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080421/abef94ee/attachment.h>



More information about the ffmpeg-devel mailing list