]> git.sesse.net Git - x264/commitdiff
Add some more info to `x264 --version`
authorYasuhiro Ikeda <wipple625@gmail.com>
Mon, 22 Nov 2010 02:01:57 +0000 (11:01 +0900)
committerFiona Glaser <fiona@x264.com>
Thu, 25 Nov 2010 21:46:11 +0000 (13:46 -0800)
x264.c

diff --git a/x264.c b/x264.c
index 03bc7061f88a101b1947b87488c55355975f5b3b..9a09e66df70f0380aa381a9712137cc69000fde2 100644 (file)
--- a/x264.c
+++ b/x264.c
 #include <libavutil/pixdesc.h>
 #endif
 
+#if HAVE_SWSCALE
+#include <libswscale/swscale.h>
+#endif
+
+#if HAVE_FFMS
+#include <ffms.h>
+#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" ))))