[FFmpeg-devel] [PATCH] ffprobe integration

Måns Rullgård mans
Tue Feb 9 12:04:44 CET 2010

Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> On date Monday 2010-02-08 15:39:11 +0100, Michael Niedermayer encoded:
>> On Mon, Feb 08, 2010 at 01:01:59AM +0100, Stefano Sabatini wrote:
> [...]
>> > Also once given the get_flags function
>> > this requires also less code (just one line and the flags definitions)
>> > / options (just one compared to N).
>> huh?
>> you need 2 lines for what i suggest
>> static int print_unit;
>> and a single line in the cmdline parsing array that contains the string,
>> help text, default value, ...
>> your code does NOT work with less, you need at least the enum and
>> flag_descriptor
>> but its much messier, has no default, no help text
> So what about to use opt.c? This has all the features you're asking
> for, and the flexibility I aim to.
> Sample ouput:
> ffprobe -show format+streams -format +pretty in.avi
> [...]

I don't like that format.  It's hard to parse.  If you don't have
nested sections, there is no need for a closing marker at all.  If you
do, enclosing each group in {} is much easier to deal with.  Or you
could use s-expressions.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list