[FFmpeg-devel] Ideas to replace the options system

Ganesh Ajjanagadde gajjanag at mit.edu
Fri Dec 4 17:22:17 CET 2015

On Fri, Dec 4, 2015 at 9:33 AM, Nicolas George <george at nsup.org> wrote:
> Hi.


>     Substring parsers
>       Parsers need to be able to operate on a substring, and stop when they
>       reach the delimiters for the surrounding syntax. This is, in fact,
>       rather easy to achieve.
>       Think how strtol() works: consume the string while there are digits
>       and return a pointer to the end of it. Then the surrounding parser can
>       continue parsing at this point. Actually, all parsers should behave
>       that way anyway, irregardless of escaping hell, because it is more
>       convenient.
>       And while we are at it, we should change them to accept strings as
>       pointer+length or pointer+end instead of zero-terminated C strings.

Are you referring here to something like djb's netstrings:
http://cr.yp.to/proto/netstrings.txt?  djb has used them skillfully in
qmail: http://wiki.tcl.tk/15074. IMHO, djb's ideas are very good; I
can't comment on this specifically.


>     Embedded documentation
>       Types and fields can contain documentation, more than the simple
>       string currently in AVOption. An API should be available to build a
>       single documentation page for a given set of elements, pulling the
>       necessary dependencies (description for the syntax of fields) only
>       once, and at various detail levels: short summary for a tooltip or
>       full text with examples for the web page.

Nice to see this; thanks for giving it thought.


> Conclusion
>   This has been a very lengthy exposition. Actually, I believe
>   implementation would not be that long. Well, longer than text, of course,
>   but not as gigantic as the explanation suggests. And a lot of steps can be
>   made incrementally.
>   IMHO, the result would be both a better design and an enhanced user
>   experience.
> Personal note: if you skimmed through the whole thing and did not find it
> completely uninteresting, I would appreciate even short quick feedback,
> even "looks interesting, will read more carefully later".

So this is not my area, so I can't give good technical feedback.
However, from a skim through, your ideas seem very good, and I think
they are very interesting.
Maybe a good gsoc project: I am quite sure there are many students out
there interested in these sorts of things.

> Regards,
> --
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list