[FFmpeg-devel] [PATCH 3/3] ffprobe: add JSON output printing format.

Clément Bœsch ubitux at gmail.com
Tue Sep 13 23:07:17 CEST 2011


On Tue, Sep 13, 2011 at 05:45:41PM +0200, Stefano Sabatini wrote:
> On date Sunday 2011-09-11 23:31:59 +0200, Clément Bœsch encoded:
> > On Tue, Sep 06, 2011 at 03:52:00PM +0200, Stefano Sabatini wrote:
> > > On date Saturday 2011-09-03 20:12:56 +0200, Clément Bœsch encoded:
> > > > ---
> > > >  doc/ffprobe.texi |    4 ++
> > > >  ffprobe.c        |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
> > > >  2 files changed, 120 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi
> > > > index 6f7e83b..b66c619 100644
> > > > --- a/doc/ffprobe.texi
> > > > +++ b/doc/ffprobe.texi
> > > > @@ -87,6 +87,10 @@ Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
> > > >  Prettify the format of the displayed values, it corresponds to the
> > > >  options "-unit -prefix -byte_binary_prefix -sexagesimal".
> > > >  
> > > > + at item -print_format
> > > 
> > > @item -print_format @var{format}
> > > 
> > 
> > Oups, fixed locally.
> > 
> > [...]
> > > > +    for (i = 0; s[i]; i++) {
> > > > +        if (strchr(json_escape, s[i]))     len += 2;
> > > 
> > > > +        else if ((unsigned char)s[i] < 32) len += 6;
> > > 
> > > maybe you can pass an unsigned char string, and avoid the obufscating
> > > casts, a note on the line of // handle non-printable chars
> > > may help.
> > > 
> > 
> > I'd say it is a simple string while an unsigned char * might give the
> > feeling it is a bytes stream. But I don't really care so changed to
> > unsigned char locally.
> 
> whatever, do as you prefer, your considerations also are valid.
> 

Then rollbacked to my version :)

[...]
> > > Looks fine otherwise.
> > 
> > I'll push when we'll find an agreement for the previous patch.
> 
> Fine.

Pushed :)

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110913/1d201d4a/attachment.asc>


More information about the ffmpeg-devel mailing list