[FFmpeg-devel] [PATCH] ffprobe: add -show_version option
Stefano Sabatini
stefasab at gmail.com
Sun Jan 8 11:32:41 CET 2012
On date Saturday 2012-01-07 23:15:01 +0100, Clément Bœsch encoded:
> On Sat, Jan 07, 2012 at 11:11:00PM +0100, Stefano Sabatini wrote:
> > On date Saturday 2012-01-07 12:59:18 +0100, Clément Bœsch encoded:
> > > On Sat, Jan 07, 2012 at 11:25:29AM +0100, Stefano Sabatini wrote:
> > [...]
> > > Another way of doing this would be to have -show_versions, and:
[...]
> > version: {
> > program: {
> > ...
> > },
> > ...
> >
> > >
> > > "libavformat": {
> > > "micro": ...
> > > "minor": ...
> > > "major": ...
> > > },
> > >
> > > "libav...": {
> > > ...
> > > },
> > > }
> >
> > Possibly a good idea, but requires more changes in ffprobe.c (mainly
> > in the JSON writer).
>
> That was just a suggestion; if it's too much trouble to implement, I'm
> fine with the current patch, push anytime you believe it's decent enough
> :)
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
},
...
]
}
}
JSON implementation is a little hacky since I had to fool the writer
to make it write a subsection, in compensation XML schema is pretty
compact and sweet:
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
<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_version name="libavutil" major="51" minor="34" micro="100" version="3351140"/>
<library_version name="libavcodec" major="53" minor="54" micro="100" version="3487332"/>
<library_version name="libavformat" major="53" minor="29" micro="100" version="3480932"/>
<library_version name="libavdevice" major="53" minor="4" micro="100" version="3474532"/>
<library_version name="libavfilter" major="2" minor="57" micro="101" version="145765"/>
<library_version name="libswscale" major="2" minor="1" micro="100" version="131428"/>
<library_version name="libswresample" major="0" minor="5" micro="100" version="1380"/>
<library_version name="libpostproc" major="51" minor="2" micro="100" version="3342948"/>
</versions>
</ffprobe>
Based on the previously posted JSON patches.
--
FFmpeg = Foolish & Forgiving Merciful Picky Erroneous Guru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-ffprobe-add-show_versions-option.patch
Type: text/x-diff
Size: 11111 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120108/911e8712/attachment.bin>
More information about the ffmpeg-devel
mailing list