[linux] log how ffmpeg was linked, ffmpeg version check and logging
authorwsnipex <wsnipex@a1.net>
Thu, 17 Apr 2014 13:18:07 +0000 (15:18 +0200)
committerRainer Hochecker <fernetmenta@online.de>
Sun, 27 Apr 2014 16:05:13 +0000 (18:05 +0200)
configure.in
tools/depends/target/ffmpeg/Makefile
tools/depends/target/ffmpeg/autobuild.sh
tools/rbp/depends/ffmpeg/Makefile
xbmc/Application.cpp
xbmc/cores/FFmpeg.h

index df956b2..3fcb178 100644 (file)
@@ -1714,6 +1714,10 @@ FFMPEG_LIBNAMES="libavcodec >= 55.39.101
                  libswscale >= 2.5.101
                  libswresample >= 0.17.104"
 
+ffmpeg_build="${abs_top_srcdir}/tools/depends/target/ffmpeg"
+FFMPEG_VER_SHA=$(grep "VERSION=" ${ffmpeg_build}/FFMPEG-VERSION | sed 's/VERSION=//g')
+AC_DEFINE_UNQUOTED([FFMPEG_VER_SHA], ["$FFMPEG_VER_SHA"], [FFmpeg version hash])
+
 if test "$with_ffmpeg" = "shared"; then
   # allow linking against shared ffmpeg libs
   # a proper version must be installed, we won't build ffmpeg
@@ -1734,7 +1738,6 @@ if test "${USE_STATIC_FFMPEG}" = "1"; then
   fi
 
   if test "$cross_compiling" != "yes"; then
-    ffmpeg_build="${abs_top_srcdir}/tools/depends/target/ffmpeg"
     if test "$use_debug" != "yes"; then
       FFMPEG_OPTS="-r"
     fi
index 8b95d5c..4abc3f0 100644 (file)
@@ -7,7 +7,7 @@ DEPS= ../../Makefile.include FFMPEG-VERSION Makefile
 APPLY_PATCHES=no
 
 # configuration settings
-ffmpg_config = --prefix=$(PREFIX)
+ffmpg_config = --prefix=$(PREFIX) --extra-version="xbmc-$(VERSION)"
 ffmpg_config += --cc=$(CC) --cxx=$(CXX)
 ffmpg_config += --disable-devices --disable-doc
 ffmpg_config += --disable-ffplay --disable-ffmpeg
index b7a1ba6..543c10e 100755 (executable)
@@ -126,6 +126,7 @@ tar --strip-components=1 -xf ../${ARCHIVE}
 
 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
 ./configure --prefix=$FFMPEG_PREFIX \
+       --extra-version="xbmc-${VERSION}" \
        --disable-devices \
        --disable-ffplay \
        --disable-ffmpeg \
index 93b5a02..0c11cea 100644 (file)
@@ -8,7 +8,7 @@ DEPS= ../../Makefile.include ../depends.mk ../../../depends/target/ffmpeg/FFMPEG
 APPLY_PATCHES=no
 
 # configuration settings
-ffmpg_config = --sysroot=$(SYSROOT) --prefix=$(PREFIX)
+ffmpg_config = --sysroot=$(SYSROOT) --prefix=$(PREFIX) --extra-version="xbmc-$(VERSION)"
 ffmpg_config += --enable-cross-compile --target-os=linux --cpu=arm1176jzf-s --arch=arm
 ffmpg_config += --cc=$(CC) --cxx=$(CXX)
 ffmpg_config += --disable-devices --disable-doc
index cc60025..db93f0d 100644 (file)
@@ -741,6 +741,14 @@ bool CApplication::Create()
   CLog::Log(LOGNOTICE, "Running on Android %d-bit API level %d (%s, %s)", g_sysinfo.GetKernelBitness(), CJNIBuild::SDK_INT, g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str());
 #elif defined(TARGET_POSIX)
   CLog::Log(LOGNOTICE, "Running on Linux %d-bit (%s, %s)", g_sysinfo.GetKernelBitness(), g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str());
+  CLog::Log(LOGNOTICE, "FFmpeg version: %s, statically linked: %d", FFMPEG_VERSION, USE_STATIC_FFMPEG);
+if (!strstr(FFMPEG_VERSION, FFMPEG_VER_SHA))
+{
+  if (strstr(FFMPEG_VERSION, "xbmc"))
+    CLog::Log(LOGNOTICE, "WARNING: unknown ffmpeg-xbmc version detected");
+  else
+    CLog::Log(LOGNOTICE, "WARNING: unsupported ffmpeg version detected");
+}
 #elif defined(TARGET_WINDOWS)
   CLog::Log(LOGNOTICE, "Running on %s", g_sysinfo.GetKernelVersion().c_str());
 #endif
index 885c3b5..2a5e6be 100644 (file)
@@ -28,6 +28,7 @@ extern "C" {
 #include "libavcodec/avcodec.h"
 #include "libavformat/avformat.h"
 #include "libavutil/avutil.h"
+#include "libavutil/ffversion.h"
 #include "libavfilter/avfilter.h"
 #include "libpostproc/postprocess.h"
 }