Switch from libav v11.4 to ffmpeg n2.7.1

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
This commit is contained in:
Sebastian Dröge 2015-06-30 12:05:46 +02:00
parent 1dcdeb977c
commit 97f58baecd
4 changed files with 29 additions and 9 deletions

4
.gitmodules vendored
View file

@ -2,5 +2,5 @@
path = common path = common
url = git://anongit.freedesktop.org/gstreamer/common url = git://anongit.freedesktop.org/gstreamer/common
[submodule "gst-libs/ext/libav"] [submodule "gst-libs/ext/libav"]
path = gst-libs/ext/libav path = gst-libs/ext/libav
url = git://git.libav.org/libav.git url = git://source.ffmpeg.org/ffmpeg.git

View 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]) AC_WARN([libbz2 not found, matroska demuxer will not be able to read bz2 tracks])
fi 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_ARG_ENABLE(lgpl,
[AC_HELP_STRING([--enable-lgpl], [build a LGPL licensed gst-libav])]) [AC_HELP_STRING([--enable-lgpl], [build a LGPL licensed gst-libav])])
AM_CONDITIONAL(GST_LIBAV_ENABLE_LGPL, test "x$enable_lgpl" = "xyes") 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])]) [AC_HELP_STRING([--with-system-libav], [use system Libav libraries])])
if test "x$with_system_libav" = "xyes"; then 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) PKG_CHECK_MODULES(SWSCALE, libswscale libavutil)
saved_CPPFLAGS="$CPPFLAGS" saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBAV_CFLAGS" CPPFLAGS="$CPPFLAGS $LIBAV_CFLAGS"
@ -263,13 +275,13 @@ else
LIBAV_DEPS="\$(top_builddir)/gst-libs/ext/libav/libavformat/libavformat.a \ 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/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" \$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a"
if test "x$enable_static_plugins" = xyes; then if test "x$enable_static_plugins" = xyes; then
dnl with static linking we can't use the .a archive directly as they would 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 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 dnl libav*.a must be copied to the final destination too
LIBAV_LIBS="-lavformat -lavcodec -lavresample -lavutil" LIBAV_LIBS="-lavformat -lavcodec -lswresample -lavutil"
else else
dnl libgstlibav.la: libs to statically link to dnl libgstlibav.la: libs to statically link to
LIBAV_LIBS="$LIBAV_DEPS" LIBAV_LIBS="$LIBAV_DEPS"
@ -305,8 +317,10 @@ else
emblibav_configure_args="--prefix=$prefix" emblibav_configure_args="--prefix=$prefix"
# Enable pic and static so that we get .a files, but with PIC code. # Enable pic and static so that we get .a files, but with PIC code.
emblibav_configure_args="$emblibav_configure_args --disable-avserver --disable-avplay\ emblibav_configure_args="$emblibav_configure_args \
--disable-avconv --disable-avprobe --enable-static --enable-pic \ --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-encoder=flac --disable-protocols --disable-devices\
--disable-network --disable-hwaccels --disable-dxva2 --disable-vdpau\ --disable-network --disable-hwaccels --disable-dxva2 --disable-vdpau\
--disable-filters --disable-doc --enable-optimizations" --disable-filters --disable-doc --enable-optimizations"

View file

@ -6,6 +6,12 @@ else
BZ2_LIBS = BZ2_LIBS =
endif endif
if HAVE_LZMA
LZMA_LIBS = -llzma
else
LZMA_LIBS =
endif
libgstlibav_la_SOURCES = gstav.c \ libgstlibav_la_SOURCES = gstav.c \
gstavprotocol.c \ gstavprotocol.c \
gstavcodecmap.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) \ libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \ -lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
-lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) \ -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_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
libgstlibav_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) libgstlibav_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)

@ -1 +1 @@
Subproject commit 0069d4597bda5723fbcae410784bbfa4750df706 Subproject commit 620197d1ffea20e9168372c354438f1c1e926ecd