[FFmpeg-devel] [RFC] Modify the ff* tools -version output

Stefano Sabatini stefano.sabatini-lala
Mon Aug 11 22:32:57 CEST 2008


On date Monday 2008-08-11 21:38:13 +0200, Michael Niedermayer encoded:
> On Fri, Aug 08, 2008 at 09:38:48PM +0200, Stefano Sabatini wrote:
> > Hi all,
> > 
> > with the patches applied the output of the ff* tools -version option becomes:
> > 
> > stefano at geppetto ~/s/ffmpeg> ffmpeg -version
> > FFmpeg version SVN-r14667, Copyright (c) 2000-2008 Fabrice Bellard, et al.
> >   configuration: --prefix=/home/stefano --disable-shared --enable-libschroedinger --enable-libx264 --enable-pthreads --enable-gpl --enable-debug=3 --enable-libtheora --enable-libvorbis --enable-avfilter --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libfaad --enable-libfaac --enable-x11grab --enable-libmp3lame --disable-optimizations --disable-mmx
> >   built on Aug  8 2008 21:21:18, gcc: 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
> > FFmpeg SVN-r14667
> >   libavutil version(C): 49.9.0
> >   libavutil version(L): 49.9.0
> >   libavcodec version(C): 51.63.0
> >   libavcodec version:(L) 51.63.0
> >   libavformat version(C): 52.20.0
> >   libavformat version(L): 52.20.0
> >   libavdevice version(C): 52.1.0
> >   libavdevice version(L): 52.1.0
> >   libavfilter version(C): 0.1.0
> >   libavfilter version(L): 0.1.0
> 
> libavutil a.b.c / d.e.f
> ...
> seems a more sane way to print it
 
OK, what about this:
FFmpeg SVN-r14692
libavutil   49.9.0 / 49.9.0
libavcodec  51.64.0 / 51.64.0
libavformat 52.20.0 / 52.20.0
libavdevice 52.1.0 / 52.1.0
libavfilter 0.1.0 / 0.1.0
?

> [...]
> > Index: libavutil/avutil.h
> > ===================================================================
> > --- libavutil/avutil.h	(revision 14667)
> > +++ libavutil/avutil.h	(working copy)
> > @@ -35,7 +35,7 @@
> >  #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
> >  
> >  #define LIBAVUTIL_VERSION_MAJOR 49
> > -#define LIBAVUTIL_VERSION_MINOR  8
> > +#define LIBAVUTIL_VERSION_MINOR  9
> >  #define LIBAVUTIL_VERSION_MICRO  0
> >  
> 
> >  #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
> > Index: libavutil/common.h
> > ===================================================================
> > --- libavutil/common.h	(revision 14667)
> > +++ libavutil/common.h	(working copy)
> > @@ -412,4 +412,9 @@
> >  #   define NULL_IF_CONFIG_SMALL(x) x
> >  #endif
> >  
> > +/**
> > + * Puts in \p buf a textual representation of \p version.
> > + */
> > +char* av_stringify_version(char* buf, unsigned buf_size, unsigned version);
> > +
> >  #endif /* FFMPEG_COMMON_H */
> > Index: libavutil/utils.c
> > ===================================================================
> > --- libavutil/utils.c	(revision 14667)
> > +++ libavutil/utils.c	(working copy)
> > @@ -27,3 +27,9 @@
> >  {
> >    return LIBAVUTIL_VERSION_INT;
> >  }
> > +
> > +char* av_stringify_version(char* buf, unsigned buf_size, unsigned version)
> > +{
> > +    snprintf(buf, buf_size, "%d.%d.%d", version >> 16, version >> 8 & 0xff, version & 0xff);
> > +    return buf;
> > +}
> 
> am against bloating libavutil with such stuff

Mmmh, OK the attached solution is a way more compact.

Regards.
-- 
FFmpeg = Furious and Frenzy Mastering Power Eager Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change-version-01.patch
Type: text/x-diff
Size: 1901 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080811/7f7638bd/attachment.patch>



More information about the ffmpeg-devel mailing list