From 0f1764195a8b818ecafed37841e4c48d9f4718da Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 14 Oct 2013 19:48:58 +0200 Subject: mplayer: print ffmpeg library versions along with mpv version info Also change what the FFmpeg version info looks like, and additionally dump lavfi/lavr/lswr versions. (Don't bother with libavdevice and libpostproc, they're not important enough.) Unfortunately, there's no "single" FFmpeg/Libav version due to fatal braindeath on the FFmpeg/Libav side. We can't map the versions to releases either (it simply isn't accessible anywhere). --- mpvcore/av_log.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'mpvcore/av_log.c') diff --git a/mpvcore/av_log.c b/mpvcore/av_log.c index c233984be9..9fa6fc93ae 100644 --- a/mpvcore/av_log.c +++ b/mpvcore/av_log.c @@ -41,6 +41,13 @@ #include #endif +#ifdef CONFIG_LIBAVRESAMPLE +#include +#endif +#ifdef CONFIG_LIBSWRESAMPLE +#include +#endif + static int av_log_level_to_mp_level(int av_level) { if (av_level > AV_LOG_VERBOSE) @@ -140,22 +147,30 @@ void init_libav(void) } #define V(x) (x)>>16, (x)>>8 & 255, (x) & 255 -static void print_version(char *name, unsigned buildv, unsigned runv) +static void print_version(int v, char *name, unsigned buildv, unsigned runv) { - - if (buildv == runv) - mp_msg(MSGT_CPLAYER, MSGL_V, "Compiled against %s version %d.%d.%d\n", - name, V(buildv)); - else - mp_msg(MSGT_CPLAYER, MSGL_V, "Compiled against %s version %d.%d.%d " - "(runtime %d.%d.%d)\n", name, V(buildv), V(runv)); + mp_msg(MSGT_CPLAYER, v, " %-15s %d.%d.%d", name, V(buildv)); + if (buildv != runv) + mp_msg(MSGT_CPLAYER, v, " (runtime %d.%d.%d)", V(runv)); + mp_msg(MSGT_CPLAYER, v, "\n"); } #undef V -void print_libav_versions(void) +void print_libav_versions(int v) { - print_version("libavutil", LIBAVUTIL_VERSION_INT, avutil_version()); - print_version("libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version()); - print_version("libavformat", LIBAVFORMAT_VERSION_INT, avformat_version()); - print_version("libswscale", LIBSWSCALE_VERSION_INT, swscale_version()); + mp_msg(MSGT_CPLAYER, v, "%s library versions:\n", LIB_PREFIX); + + print_version(v, "libavutil", LIBAVUTIL_VERSION_INT, avutil_version()); + print_version(v, "libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version()); + print_version(v, "libavformat", LIBAVFORMAT_VERSION_INT, avformat_version()); + print_version(v, "libswscale", LIBSWSCALE_VERSION_INT, swscale_version()); +#ifdef CONFIG_LIBAVFILTER + print_version(v, "libavfilter", LIBAVFILTER_VERSION_INT, avfilter_version()); +#endif +#ifdef CONFIG_LIBAVRESAMPLE + print_version(v, "libavresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()); +#endif +#ifdef CONFIG_LIBSWRESAMPLE + print_version(v, "libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version()); +#endif } -- cgit v1.2.3