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

Stefano Sabatini stefano.sabatini-lala
Wed Aug 13 22:08:14 CEST 2008


On date Wednesday 2008-08-13 01:19:51 +0200, Michael Niedermayer encoded:
> On Wed, Aug 13, 2008 at 12:42:29AM +0200, Stefano Sabatini wrote:
> > On date Tuesday 2008-08-12 23:52:18 +0200, Michael Niedermayer encoded:
> > > On Tue, Aug 12, 2008 at 10:05:32PM +0200, Stefano Sabatini wrote:
> > > > On date Tuesday 2008-08-12 17:24:23 +0200, Michael Niedermayer encoded:
> > > > > On Tue, Aug 12, 2008 at 05:03:43PM +0200, Stefano Sabatini wrote:
> > > > > > On date Tuesday 2008-08-12 16:00:45 +0200, Michael Niedermayer encoded:
> > > > > > > On Tue, Aug 12, 2008 at 03:42:48PM +0200, Stefano Sabatini wrote:
> > > > > > > [...]
> > > > > > > > > [...]
> > > > > > > > > > Index: cmdutils.c
> > > > > > > > > > ===================================================================
> > > > > > > > > > --- cmdutils.c	(revision 14695)
> > > > > > > > > > +++ cmdutils.c	(working copy)
> > > > > > > > > > @@ -201,13 +201,6 @@
> > > > > > > > > >      fprintf(stderr, "%s version " FFMPEG_VERSION ", Copyright (c) %d-2008 Fabrice Bellard, et al.\n",
> > > > > > > > > >              program_name, program_birth_year);
> > > > > > > > > >      fprintf(stderr, "  configuration: " FFMPEG_CONFIGURATION "\n");
> > > > > > > > > > -    fprintf(stderr, "  libavutil version: " AV_STRINGIFY(LIBAVUTIL_VERSION) "\n");
> > > > > > > > > > -    fprintf(stderr, "  libavcodec version: " AV_STRINGIFY(LIBAVCODEC_VERSION) "\n");
> > > > > > > > > > -    fprintf(stderr, "  libavformat version: " AV_STRINGIFY(LIBAVFORMAT_VERSION) "\n");
> > > > > > > > > > -    fprintf(stderr, "  libavdevice version: " AV_STRINGIFY(LIBAVDEVICE_VERSION) "\n");
> > > > > > > > > > -#if ENABLE_AVFILTER
> > > > > > > > > > -    fprintf(stderr, "  libavfilter version: " AV_STRINGIFY(LIBAVFILTER_VERSION) "\n");
> > > > > > > > > > -#endif
> > > > > > > > > >      fprintf(stderr, "  built on " __DATE__ " " __TIME__);
> > > > > > > > > >  #ifdef __GNUC__
> > > > > > > > > >      fprintf(stderr, ", gcc: " __VERSION__ "\n");
> > > > > > > > > > @@ -216,14 +209,22 @@
> > > > > > > > > >  #endif
> > > > > > > > > >  }
> > > > > > > > > 
> > > > > > > > > rejected, we need to have the version in the output in bugreports
> > > > > > > > 
> > > > > > > > See that, but just to make my point: that information may be deduced
> > > > > > > > by the SVN revision number, so it's redundant and leads to code
> > > > > > > > duplication.
> > > > > > > 
> > > > > > > with which version of libavcodec.so has a user if SVN r14710 linked
> > > > > > > his ffmpeg?
> > > > > > 
> > > > > > Is this sentence supposed to mean something?
> > > > > 
> > > > > well ..
> > > > > 
> > > > > let me try again
> > > > > with which version of libavcodec.so did the user link his ffmpeg r14710?
> > > > 
> > > > Currently there is no way to check that, show_banner() only shows
> > > > compile-time versions, while show_version() prints again the
> > > > compile-time versions, with the only exception the lavc version (which
> > > > is printed using the deprecated avcodec_build()).
> > > > 
> > > > > so yes i would like to have both of these versions printed no matter
> > > > > which are currently, iam fairly sure we printed the lib versions for
> > > > > at least one of the libs in the past but then i may be wrong.
> > > > 
> > > > So do you want to print both in show_banner() and in show_version()
> > > > both compile-time and link-time/run-time libs versions?
> > > 
> > > id like a normal ffmpeg -i kdjfdf.avi  skjdfsdkj.avi to print the versions
> > > so they are in bugreports.
> > > 
> > > 
> > > [...]
> > > > Index: cmdutils.c
> > > > ===================================================================
> > > > --- cmdutils.c	(revision 14710)
> > > > +++ cmdutils.c	(working copy)
> > > > @@ -196,18 +196,32 @@
> > > >      }
> > > >  }
> > > >  
> > > > +#define PRINT_LIB_VERSION(outstream,libname,LIBNAME) \
> > > > +    version= libname##_version(); \
> > > > +    snprintf(buf1, sizeof(buf1), "%2d.%2d.%2d", \
> > > > +             LIB##LIBNAME##_VERSION_MAJOR, LIB##LIBNAME##_VERSION_MINOR, LIB##LIBNAME##_VERSION_MICRO); \
> > > > +    snprintf(buf2, sizeof(buf2), "%2d.%2d.%2d", version >> 16, version >> 8 & 0xff, version & 0xff); \
> > > > +    printf("lib%-8s %9s / %9s\n", #libname, buf1, buf2);
> > > 
> > > you cannot use printf() as it writes to stdout.
> > 
> > oops, I meant fprintf(outstream, ...)
> > 
> > > also i dont see why you would need a buffer and snprintf()
> > 
> > you're right, it's a fossil coming from the evolution of the patch.
> > 
> > I also added an indent feature to save consistency with the current
> > output, now it results:
> > 
> > FFmpeg versionSVN-r14718, Copyright (c) 2000-2008 Fabrice Bellard, et al.
> >   configuration: ...
> >   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
> >   built on Aug 13 2008 00:34:21, gcc: 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
> > FFmpeg SVN-r14718
> > 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
> 
> ok

Applied.
-- 
FFmpeg = Freak and Faboulous Merciless Prodigious Extreme Gadget




More information about the ffmpeg-devel mailing list