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

Robert Swain robert.swain
Tue Mar 18 23:18:27 CET 2008


On 18 Mar 2008, at 09:29, vmrsss wrote:
> (3)
>> filter1->(abc)
>> (def)->filter2
> becomes: filter1 * filter2
>> filter1->filter2
>> |         ^
>> v         |
>> (abc)     (def)
> becomes: filter1, split, (filter2 * nop)  (note of course that you
> can't add input streams, the number of a filter's required input/
> output streams is determined by the filter you can't change it like
> that, only duplicate, )

I like your syntax and prefer it to Vitor's. I have a query about the  
second of these two examples. I assume that in the first, the input to  
filter1 and output of filter2 are individually not named and you've  
just chosen to suggest names for the output of filter1 and the input  
of filter2. That is...

       ---> filter1 ---> (abc)
(def) ---> filter2 --->

The point being that with your syntax, the names of the buffers are  
irrelevant because they are intrinsically numbered and syntax is  
adjusted to match the order of the input/output streams.

The diagram for the second of the two examples might be clearer if it  
were drawn as follows:

       ---> filter1 ---> (abc)
(def) ---> filter2 --->

I prefer this because the inputs are on the left and the outputs on  
the right. Please note, however, that the output of filter1 to (abc)  
would be filter1's second output looking at your diagram. The first  
output of filter1 goes to filter2 in your diagram.

Now, your notation is:

filter1, split, (filter2 * nop)

We have two input streams, the input of filter1 and (def). The inputs  
of filter2 come from filter1 (or the first output of split in your  
notation) and from (def). In what order are these fed into filter2? Is  
the 'spare' input that isn't used by filter1 to be kept in a list of  
remaining input possibilities and later used by the next filter that  
doesn't have enough inputs coming from other filters in the chain?  
What takes priority - the inputs from the chain or the initial inputs  
to the graph? Is this just a case that really needs some named inputs?

I hope that wasn't too confusing... :) It was an idly-noticed item  
that caught my eye.


More information about the ffmpeg-devel mailing list