[FFmpeg-devel] [PATCH] ffprobe: add compact and compactnk writers

Stefano Sabatini stefasab at gmail.com
Tue Sep 27 19:00:52 CEST 2011


On date Sunday 2011-09-25 16:26:55 +0200, Alexander Strasser encoded:
> Hi
> 
> Stefano Sabatini wrote:
> > On date Sunday 2011-09-25 02:43:49 +0200, Clément Bœsch encoded:
> > > On Sun, Sep 25, 2011 at 02:09:24AM +0200, Stefano Sabatini wrote:
> > > > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> [...]
> > > > +static void compactnk_print_int(const char *key, int value)
> > > > +{
> > > > +    printf("%d", value);
> > > > +}
> > > > +
> > > > +static void compactnk_print_str(const char *key, const char *value)
> > > > +{
> > > > +    printf("%s", value);
> > > > +}
> > > >  
> > > 
> > 
> > > Maybe some quoting would be worth here? It's sometimes hard to tell what
> > > are the limit of a key. Another solution might be to use some '|'.
> > > 
> > > Those are just suggestions, I won't push for this.
> > 
> > I added escaping (which may be used e.g. for CSV output), and change
> 
>   I think for CSV output it would be better to adhere to RFC 4180.
> Probably with the exception of "Each line should contain the same
> number of fields throughout the file.", but that is "should" anyway.

MS-escaping (as described in RFC4180) is mal-designed and thus I'm not
eager to make of this the default escaping algo, I suppose the best
option is to make the escaping algorithm configurable, which requires
some major redesign.

I prefer to do this *after* committing this patch though.
-- 
FFmpeg = Fantastic & Forgiving Mean Philosophical Energized Guru


More information about the ffmpeg-devel mailing list