[FFmpeg-devel] [PATCH 01/14] lavfi: add common code to handle options parsing.

Stefano Sabatini stefasab at gmail.com
Sun Mar 17 15:19:45 CET 2013

On date Sunday 2013-03-17 14:57:16 +0100, Nicolas George encoded:
> Another point: lavfi is different from the others AVOption users because it
> implements its own parser (parsers, even) from strings. Codecs, formats,
> etc., only see options as a finished business, they do not care whether they
> came from command line with the dash-option syntax or from a GUI.

The only difference is that its init takes a string, while the other
components takes an AVDictionary, but apart from that it is very
similar (e.g. codecs could parse a provided string in their init). And
we could add an AVDictionary interface to filters, once all the
filters support options.

> In other words, the shorthand list makes sense along with the
> "init(char *args)" method, and only filters have it.


> (As a side note, I am currently considering reworking buffersrc and -sink to
> allow setting the parameters using av_opt_set rather than with the argument
> string or the opaque structure. Other filters may benefit from the same
> changes, and that would allow, e.g. GUI to build filter graphs. Filters who
> adapt their number of pads dynamically will not work that way yet though.)

The opaque structure is still useful for passing data which can't be
easily serialized (e.g. a list of formats).
FFmpeg = Formidable Fanciful Multimedia Peaceless Enhanced Genius

More information about the ffmpeg-devel mailing list