[FFmpeg-devel] [PATCH] ffprobe: add -show_version option

Clément Bœsch ubitux at gmail.com
Mon Jan 9 00:58:43 CET 2012


On Mon, Jan 09, 2012 at 12:52:17AM +0100, Stefano Sabatini wrote:
> On date Sunday 2012-01-08 16:22:51 +0100, Stefano Sabatini encoded:
> > On date Sunday 2012-01-08 13:44:12 +0100, Clément Bœsch encoded:
> > > On Sun, Jan 08, 2012 at 11:32:41AM +0100, Stefano Sabatini wrote:
> > [...]
> > > > Now it is:
> > > > 
> > > > {
> > > >     "versions": {
> > > >         "program_version": {
> > > >             "version": "N-36604-g029c58b",
> > > >             "copyright": "Copyright (c) 2007-2012 the FFmpeg developers",
> > > >             "build_date": "Jan  8 2012",
> > > >             "build_time": "11:26:39",
> > > >             "compiler_type": "gcc",
> > > >             "compiler_version": "4.6.1",
> > > >             "configuration": ...
> > > >         },
> > > >         "library_versions": [
> > > >             {
> > > >                 "name": "libavutil",
> > > >                 "major": 51,
> > > >                 "minor": 34,
> > > >                 "micro": 100,
> > > >                 "version": 3351140
> > > >             },
> > > >             {
> > > >                 "name": "libavcodec",
> > > >                 "major": 53,
> > > >                 "minor": 54,
> > > >                 "micro": 100,
> > > >                 "version": 3487332
> > > >             },
> > > >             ...
> > > >         ]
> > > >     }
> > > 
> > 
> > > I forgot to mention that direct access can be a bit painful in this case:
> > > you have to loop over the different libraries if you are looking for one
> > > in particular (or sort them in a particular way).
> > 
> > Forget previous patch, this one is much simpler, output is:
> > 
> > {
> >     "program_version": {
> >         "version": "N-36604-gf740540",
> >         "copyright": "Copyright (c) 2007-2012 the FFmpeg developers",
> >         "build_date": "Jan  8 2012",
> >         "build_time": "16:12:59",
> >         "compiler_type": "gcc",
> >         "compiler_version": "4.6.1",
> >         "configuration": ...
> >     },
> >     "library_versions": [
> >         {
> >             "name": "libavutil",
> >             "major": 51,
> >             "minor": 34,
> >             "micro": 100,
> >             "version": 3351140
> >         },
> >         ...
> >     ]
> > }
> > -- 
> > FFmpeg = Funny and Fancy Mean Puritan Eretic Guru
> 
> > From 1aab40fbf4b9c5c10b29921ede1b093d0cbabbd5 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefasab at gmail.com>
> > Date: Sun, 1 Jan 2012 17:19:58 +0100
> > Subject: [PATCH] ffprobe: add -show_program_version and
> >  -show_library_versions options
> > 
> > ---
> >  doc/ffprobe.texi |   17 +++++++++++
> >  doc/ffprobe.xsd  |   26 +++++++++++++++++
> >  ffprobe.c        |   79 +++++++++++++++++++++++++++++++++++++++++++++++++++---
> >  3 files changed, 118 insertions(+), 4 deletions(-)
> 
> I'll apply this in a few days if no one has better ideas.

Well it's too bad not to have:
  {"libavutil":  {"major": ..., "minor": ... },
   "libavcodec": {"major": ..., "minor": ... },
   ...}
Especially for the direct access (data["versions"]["libavxxx"])

But I can live with that :)

-- 
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/20120109/8c4cc4e5/attachment.asc>


More information about the ffmpeg-devel mailing list