From 032880c9727bb1cefc4d1711c84152a5eca6fd07 Mon Sep 17 00:00:00 2001 From: Yasuhiro Ikeda Date: Mon, 22 Nov 2010 11:01:57 +0900 Subject: [PATCH] Add some more info to `x264 --version` --- x264.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/x264.c b/x264.c index 03bc7061..9a09e66d 100644 --- a/x264.c +++ b/x264.c @@ -55,6 +55,14 @@ #include #endif +#if HAVE_SWSCALE +#include +#endif + +#if HAVE_FFMS +#include +#endif + /* Ctrl-C handler */ static volatile int b_ctrl_c = 0; static int b_exit_on_ctrl_c = 0; @@ -207,6 +215,15 @@ static void print_version_info() printf( "x264 "X264_POINTVER"\n" ); #else printf( "x264 0.%d.X\n", X264_BUILD ); +#endif +#if HAVE_SWSCALE + printf( "(libswscale %d.%d.%d)\n", LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO ); +#endif +#if HAVE_LAVF + printf( "(libavformat %d.%d.%d)\n", LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO ); +#endif +#if HAVE_FFMS + printf( "(ffmpegsource %d.%d.%d.%d)\n", FFMS_VERSION >> 24, (FFMS_VERSION & 0xff0000) >> 16, (FFMS_VERSION & 0xff00) >> 8, FFMS_VERSION & 0xff ); #endif printf( "built on " __DATE__ ", " ); #ifdef __GNUC__ @@ -221,9 +238,9 @@ static void print_version_info() #else printf( "Non-GPL commercial\n" ); #endif -#if HAVE_LAVF - const char *license = avformat_license(); - printf( "libavformat license: %s\n", license ); +#if HAVE_SWSCALE + const char *license = swscale_license(); + printf( "libswscale%s%s license: %s\n", HAVE_LAVF ? "/libavformat" : "", HAVE_FFMS ? "/ffmpegsource" : "" , license ); if( !strcmp( license, "nonfree and unredistributable" ) || (!HAVE_GPL && (!strcmp( license, "GPL version 2 or later" ) || !strcmp( license, "GPL version 3 or later" )))) -- 2.40.0