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

Michael Niedermayer michaelni
Fri Feb 22 00:32:47 CET 2008


On Sat, Feb 16, 2008 at 12:45:12PM +0100, Vitor Sessak wrote:
> See $subj.
>

> /*
>  * filter graph descriptions
>  * copyright (c) 2007 Bobby Bingham
[...]
> #include <ctype.h>
> #include <string.h>
> 
> #include "avfilter.h"
> #include "avfiltergraph.h"
> 
> #define LINESIZE    240             ///< maximum length of an input line
> 
> /** a comment is a line which is empty, or starts with whitespace, ';' or '#' */
> static inline int is_line_comment(char *line)
> {
>     return line[0] == 0     ||
>            isspace(line[0]) ||
>            line[0] == ';'   ||
>            line[0] == '#';
> }

A filter graph description should at least treat all whitespace outside
quotes equal that is '\n' == ' ' == '  '
Also it should be terse and it should be useable on the command line, that is
avoid characters which needs complicated escaping to pass the shell.

Heres a possible example, this is just a idea after 5min thinking and might
not be the best ...
[in]scale=400:300,crop=200:100,[+tmp]picInPic=50:50,rotate=1,split[+out],delay=50[tmp]

would result in a filter graph like:

in --> scale --> crop --> picInPic --> rotate --> split --> out
                             ^                      |
                             |                      |
                           delay<-------------------/

the syntax idea here would have been
[inputs]filtername=parameter1:parameter2:...[outputs]
with the default input the previous filter, and the default output the
next filter [+abc] adds an additional in/output

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

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/20080222/2bca9ccd/attachment.pgp>



More information about the ffmpeg-devel mailing list