Switch from libav v11.4 to ffmpeg n2.7.1
authorSebastian Dröge <sebastian@centricular.com>
Tue, 30 Jun 2015 10:05:46 +0000 (12:05 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 1 Jul 2015 19:40:00 +0000 (21:40 +0200)
ffmpeg seems to be the one of the two forks, which is most widely used by
Linux distributions and in general. Also Google is using it for e.g. Chrome
and has engineers working on finding and fixing security issues in it.

https://bugzilla.gnome.org/show_bug.cgi?id=751607

.gitmodules
configure.ac
ext/libav/Makefile.am
gst-libs/ext/libav

index 2585cfb..fa4d7ec 100644 (file)
@@ -2,5 +2,5 @@
         path = common
         url = git://anongit.freedesktop.org/gstreamer/common
 [submodule "gst-libs/ext/libav"]
-       path = gst-libs/ext/libav
-       url = git://git.libav.org/libav.git
+        path = gst-libs/ext/libav
+        url = git://source.ffmpeg.org/ffmpeg.git
index febb230..f26d2f8 100644 (file)
@@ -229,6 +229,18 @@ if test "x$HAVE_BZ2" = "xno"; then
   AC_WARN([libbz2 not found, matroska demuxer will not be able to read bz2 tracks])
 fi
 
+dnl *** Check for lzma
+save_LIBS=$LIBS
+LIBS="$LIBS -llzma"
+AC_MSG_CHECKING([for lzma_version_string in -llzma])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <lzma.h>]], [[const char *version = lzma_version_string ();]])],[HAVE_LZMA=yes],[HAVE_LZMA=no])
+AC_MSG_RESULT($HAVE_LZMA)
+LIBS=$save_LIBS
+AM_CONDITIONAL(HAVE_LZMA, test "x$HAVE_LZMA" = "xyes")
+if test "x$HAVE_LZMA" = "xno"; then
+    AC_WARN([lzma not found, tiff reader will not be able to read lzma files])
+fi
+
 AC_ARG_ENABLE(lgpl,
               [AC_HELP_STRING([--enable-lgpl], [build a LGPL licensed gst-libav])])
 AM_CONDITIONAL(GST_LIBAV_ENABLE_LGPL, test "x$enable_lgpl" = "xyes")
@@ -244,7 +256,7 @@ AC_ARG_WITH(system-libav,
             [AC_HELP_STRING([--with-system-libav], [use system Libav libraries])])
 
 if test "x$with_system_libav" = "xyes"; then
-  PKG_CHECK_MODULES(LIBAV, libavformat libavcodec libavresample libavutil)
+  PKG_CHECK_MODULES(LIBAV, libavformat libavcodec libavutil)
   PKG_CHECK_MODULES(SWSCALE, libswscale libavutil)
   saved_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $LIBAV_CFLAGS"
@@ -263,13 +275,13 @@ else
 
   LIBAV_DEPS="\$(top_builddir)/gst-libs/ext/libav/libavformat/libavformat.a \
               \$(top_builddir)/gst-libs/ext/libav/libavcodec/libavcodec.a \
-              \$(top_builddir)/gst-libs/ext/libav/libavresample/libavresample.a \
+              \$(top_builddir)/gst-libs/ext/libav/libswresample/libswresample.a \
               \$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a"
   if test "x$enable_static_plugins" = xyes; then
       dnl with static linking we can't use the .a archive directly as they would
       dnl be included in the final libgstlibav.a as a file and won't be usable.
       dnl libav*.a must be copied to the final destination too
-      LIBAV_LIBS="-lavformat -lavcodec -lavresample -lavutil"
+      LIBAV_LIBS="-lavformat -lavcodec -lswresample -lavutil"
   else
       dnl libgstlibav.la: libs to statically link to
       LIBAV_LIBS="$LIBAV_DEPS"
@@ -305,8 +317,10 @@ else
   emblibav_configure_args="--prefix=$prefix"
 
   # Enable pic and static so that we get .a files, but with PIC code.
-  emblibav_configure_args="$emblibav_configure_args --disable-avserver --disable-avplay\
-        --disable-avconv --disable-avprobe --enable-static --enable-pic \
+  emblibav_configure_args="$emblibav_configure_args \
+        --enable-static --enable-pic \
+        --disable-avdevice --disable-postproc --disable-avfilter \
+        --disable-programs --disable-ffserver --disable-ffplay --disable-ffprobe --disable-ffmpeg \
         --disable-encoder=flac --disable-protocols --disable-devices\
         --disable-network --disable-hwaccels --disable-dxva2 --disable-vdpau\
         --disable-filters --disable-doc --enable-optimizations"
index 24d0eb9..4aeff59 100644 (file)
@@ -6,6 +6,12 @@ else
     BZ2_LIBS =
 endif
 
+if HAVE_LZMA
+    LZMA_LIBS = -llzma
+else
+    LZMA_LIBS =
+endif
+
 libgstlibav_la_SOURCES = gstav.c       \
                          gstavprotocol.c       \
                          gstavcodecmap.c       \
@@ -27,7 +33,7 @@ libgstlibav_la_CFLAGS = $(LIBAV_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
 libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \
        -lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
        -lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) \
-       $(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS)
+       $(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS) $(LZMA_LIBS)
 libgstlibav_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
 libgstlibav_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
index 0069d45..620197d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0069d4597bda5723fbcae410784bbfa4750df706
+Subproject commit 620197d1ffea20e9168372c354438f1c1e926ecd