mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Rename everything from gst-ffmpeg to gst-libav
Also change elements factory names to avenc_*, avdec_*, avmux_* and avdemux_*. The actual filenames, type names, function/variable names are not touched to make merging with 0.10 easier at this point. Once 0.10 is not supported anymore everything should be renamed.
This commit is contained in:
parent
4964bd753c
commit
e49c069995
38 changed files with 211 additions and 6354 deletions
120
configure.ac
120
configure.ac
|
@ -5,7 +5,7 @@ dnl when going to/from release please set the nano (fourth number) right !
|
||||||
dnl releases only do Wall, cvs and prerelease does Werror too
|
dnl releases only do Wall, cvs and prerelease does Werror too
|
||||||
AC_INIT(GStreamer Libav, 0.11.89.1,
|
AC_INIT(GStreamer Libav, 0.11.89.1,
|
||||||
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
|
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
|
||||||
gst-ffmpeg)
|
gst-libav)
|
||||||
|
|
||||||
AG_GST_INIT
|
AG_GST_INIT
|
||||||
|
|
||||||
|
@ -208,42 +208,42 @@ if test "x$have_bz2" = "xno"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(lgpl,
|
AC_ARG_ENABLE(lgpl,
|
||||||
[AC_HELP_STRING([--enable-lgpl], [build a LGPL licensed gst-ffmpeg])])
|
[AC_HELP_STRING([--enable-lgpl], [build a LGPL licensed gst-libav])])
|
||||||
AM_CONDITIONAL(GST_FFMPEG_ENABLE_LGPL, test "x$enable_lgpl" = "xyes")
|
AM_CONDITIONAL(GST_LIBAV_ENABLE_LGPL, test "x$enable_lgpl" = "xyes")
|
||||||
if test "x$enable_lgpl" = "xyes"; then
|
if test "x$enable_lgpl" = "xyes"; then
|
||||||
AC_DEFINE([GST_FFMPEG_ENABLE_LGPL], [], [Defined if building a LGPL-only version of gst-ffmpeg])
|
AC_DEFINE([GST_LIBAV_ENABLE_LGPL], [], [Defined if building a LGPL-only version of gst-libav])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl *** configure external libs ***
|
dnl *** configure external libs ***
|
||||||
|
|
||||||
HAVE_FFMPEG_UNINSTALLED=1
|
HAVE_LIBAV_UNINSTALLED=1
|
||||||
|
|
||||||
AC_ARG_WITH(system-ffmpeg,
|
AC_ARG_WITH(system-libav,
|
||||||
[AC_HELP_STRING([--with-system-ffmpeg], [use system Libav libraries])])
|
[AC_HELP_STRING([--with-system-libav], [use system Libav libraries])])
|
||||||
|
|
||||||
if test "x$with_system_ffmpeg" = "xyes"; then
|
if test "x$with_system_libav" = "xyes"; then
|
||||||
PKG_CHECK_MODULES(FFMPEG, libavformat libavcodec libavutil)
|
PKG_CHECK_MODULES(LIBAV, libavformat libavcodec libavutil)
|
||||||
if test "x$enable_lgpl" != "xyes"; then
|
if test "x$enable_lgpl" != "xyes"; then
|
||||||
PKG_CHECK_MODULES(POSTPROC, libpostproc libavcodec libavutil)
|
PKG_CHECK_MODULES(POSTPROC, libpostproc libavcodec libavutil)
|
||||||
fi
|
fi
|
||||||
PKG_CHECK_MODULES(SWSCALE, libswscale libavutil)
|
PKG_CHECK_MODULES(SWSCALE, libswscale libavutil)
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $LIBAV_CFLAGS"
|
||||||
AC_CHECK_HEADERS([avi.h])
|
AC_CHECK_HEADERS([avi.h])
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
AC_DEFINE([FFMPEG_SOURCE], ["system install"], [Describes where the Libav libraries come from.])
|
AC_DEFINE([LIBAV_SOURCE], ["system install"], [Describes where the Libav libraries come from.])
|
||||||
HAVE_FFMPEG_UNINSTALLED=0
|
HAVE_LIBAV_UNINSTALLED=0
|
||||||
AC_MSG_NOTICE([Using system-installed FFMpeg code])
|
AC_MSG_NOTICE([Using system-installed FFMpeg code])
|
||||||
AC_MSG_WARN([
|
AC_MSG_WARN([
|
||||||
======================================================================
|
======================================================================
|
||||||
WARNING: you have chosen to build gst-ffmpeg against a random
|
WARNING: you have chosen to build gst-libav against a random
|
||||||
external version of Libav instead of building it against the tested
|
external version of Libav instead of building it against the tested
|
||||||
internal Libav snapshot that is included with gst-ffmpeg.
|
internal Libav snapshot that is included with gst-libav.
|
||||||
|
|
||||||
This is a very bad idea. So bad in fact that words cannot express
|
This is a very bad idea. So bad in fact that words cannot express
|
||||||
just how bad it is. Suffice to say that it is BAD.
|
just how bad it is. Suffice to say that it is BAD.
|
||||||
|
|
||||||
The GStreamer developers cannot and will not support a gst-ffmpeg
|
The GStreamer developers cannot and will not support a gst-libav
|
||||||
built this way. Any bug reports that indicate there is an external
|
built this way. Any bug reports that indicate there is an external
|
||||||
version of Libav involved will be closed immediately without further
|
version of Libav involved will be closed immediately without further
|
||||||
investigation.
|
investigation.
|
||||||
|
@ -251,15 +251,15 @@ if test "x$with_system_ffmpeg" = "xyes"; then
|
||||||
The reason such a setup can't be supported is that the Libav API
|
The reason such a setup can't be supported is that the Libav API
|
||||||
and ABI is in constant flux, yet there aren't any official releases
|
and ABI is in constant flux, yet there aren't any official releases
|
||||||
of the Libav library to develop against. This makes it impossible
|
of the Libav library to develop against. This makes it impossible
|
||||||
to guarantee that gst-ffmpeg will work reliably, or even compile,
|
to guarantee that gst-libav will work reliably, or even compile,
|
||||||
with a randomly picked version Libav. Even if gst-ffmpeg compiles
|
with a randomly picked version Libav. Even if gst-libav compiles
|
||||||
and superficially appears to work fine against your chosen external
|
and superficially appears to work fine against your chosen external
|
||||||
Libav version, that might just not be the case on other systems, or
|
Libav version, that might just not be the case on other systems, or
|
||||||
even the same system at a later time, or when using decoders,
|
even the same system at a later time, or when using decoders,
|
||||||
encoders, demuxers or muxers that have not been tested.
|
encoders, demuxers or muxers that have not been tested.
|
||||||
|
|
||||||
Please do not create or distribute binary packages of gst-Libav
|
Please do not create or distribute binary packages of gst-Libav
|
||||||
that link against an external ffmpeg. Thank you!
|
that link against an external libav. Thank you!
|
||||||
======================================================================
|
======================================================================
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -269,16 +269,16 @@ else
|
||||||
|
|
||||||
AC_MSG_NOTICE([Using local Libav snapshot])
|
AC_MSG_NOTICE([Using local Libav snapshot])
|
||||||
|
|
||||||
dnl libgstffmpeg.la: include dirs
|
dnl libgstlibav.la: include dirs
|
||||||
FFMPEG_CFLAGS="-I \$(top_srcdir)/gst-libs/ext/libav/libavutil \
|
LIBAV_CFLAGS="-I \$(top_srcdir)/gst-libs/ext/libav/libavutil \
|
||||||
-I \$(top_srcdir)/gst-libs/ext/libav/libavformat \
|
-I \$(top_srcdir)/gst-libs/ext/libav/libavformat \
|
||||||
-I \$(top_srcdir)/gst-libs/ext/libav/libavcodec \
|
-I \$(top_srcdir)/gst-libs/ext/libav/libavcodec \
|
||||||
-I \$(top_srcdir)/gst-libs/ext/libav \
|
-I \$(top_srcdir)/gst-libs/ext/libav \
|
||||||
-I \$(top_builddir)/gst-libs/ext/libav \
|
-I \$(top_builddir)/gst-libs/ext/libav \
|
||||||
-Wno-deprecated-declarations"
|
-Wno-deprecated-declarations"
|
||||||
|
|
||||||
dnl libgstffmpeg.la: libs to statically link to
|
dnl libgstlibav.la: libs to statically link to
|
||||||
FFMPEG_LIBS="\$(top_builddir)/gst-libs/ext/libav/libavformat/libavformat.a \
|
LIBAV_LIBS="\$(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/libavutil/libavutil.a"
|
\$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a"
|
||||||
dnl
|
dnl
|
||||||
|
@ -304,47 +304,47 @@ else
|
||||||
SWSCALE_LIBS="\$(top_builddir)/gst-libs/ext/libav/libswscale/libswscale.a \
|
SWSCALE_LIBS="\$(top_builddir)/gst-libs/ext/libav/libswscale/libswscale.a \
|
||||||
\$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a"
|
\$(top_builddir)/gst-libs/ext/libav/libavutil/libavutil.a"
|
||||||
|
|
||||||
FFMPEG_SUBDIRS=gst-libs
|
LIBAV_SUBDIRS=gst-libs
|
||||||
AC_DEFINE(HAVE_AVI_H)
|
AC_DEFINE(HAVE_AVI_H)
|
||||||
AC_DEFINE([FFMPEG_SOURCE], ["local snapshot"], [Describes where the Libav libraries come from.])
|
AC_DEFINE([LIBAV_SOURCE], ["local snapshot"], [Describes where the Libav libraries come from.])
|
||||||
|
|
||||||
AC_ARG_WITH(ffmpeg-extra-configure,
|
AC_ARG_WITH(libav-extra-configure,
|
||||||
AC_HELP_STRING([--with-ffmpeg-extra-configure="xxx"],
|
AC_HELP_STRING([--with-libav-extra-configure="xxx"],
|
||||||
[extra configure options for internal ffmpeg ./configure script]),,
|
[extra configure options for internal libav ./configure script]),,
|
||||||
with_ffmpeg_extra_configure=no)
|
with_libav=no)
|
||||||
|
|
||||||
# basic arguments
|
# basic arguments
|
||||||
embffmpeg_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.
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --disable-avserver --disable-avplay\
|
emblibav_configure_args="$emblibav_configure_args --disable-avserver --disable-avplay\
|
||||||
--disable-ffmpeg --disable-avprobe --enable-static --enable-pic \
|
--disable-ffmpeg --disable-avprobe --enable-static --enable-pic \
|
||||||
--disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices\
|
--disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices\
|
||||||
--disable-network --disable-hwaccels --disable-filters --disable-doc\
|
--disable-network --disable-hwaccels --disable-filters --disable-doc\
|
||||||
--enable-optimizations"
|
--enable-optimizations"
|
||||||
|
|
||||||
if test "x$enable_lgpl" != "xyes"; then
|
if test "x$enable_lgpl" != "xyes"; then
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --enable-postproc \
|
emblibav_configure_args="$emblibav_configure_args --enable-postproc \
|
||||||
--enable-gpl"
|
--enable-gpl"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if we are cross-compiling, tell ffmpeg so
|
# if we are cross-compiling, tell libav so
|
||||||
target_os=`echo $host_os | sed 's/-gnu//'`
|
target_os=`echo $host_os | sed 's/-gnu//'`
|
||||||
if test "x$cross_compiling" = xyes; then
|
if test "x$cross_compiling" = xyes; then
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --enable-cross-compile \
|
emblibav_configure_args="$emblibav_configure_args --enable-cross-compile \
|
||||||
--target-os=$target_os --arch=$host_cpu --cross-prefix=$host_alias-"
|
--target-os=$target_os --arch=$host_cpu --cross-prefix=$host_alias-"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
# Unfortunately, in Mac OS 10.5 the current rev of ffmpeg builds
|
# Unfortunately, in Mac OS 10.5 the current rev of libav builds
|
||||||
# some non-PIC code into the .a file. See
|
# some non-PIC code into the .a file. See
|
||||||
# http://trac.macosforge.org/projects/macports/ticket/13725 for more
|
# http://trac.macosforge.org/projects/macports/ticket/13725 for more
|
||||||
# info.
|
# info.
|
||||||
darwin*)
|
darwin*)
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --disable-mmx --disable-altivec"
|
emblibav_configure_args="$emblibav_configure_args --disable-mmx --disable-altivec"
|
||||||
;;
|
;;
|
||||||
mingw32*)
|
mingw32*)
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --enable-memalign-hack"
|
emblibav_configure_args="$emblibav_configure_args --enable-memalign-hack"
|
||||||
WIN32_LIBS="-lws2_32"
|
WIN32_LIBS="-lws2_32"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -353,29 +353,29 @@ else
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl checks for extra enable/disable flags
|
dnl checks for extra enable/disable flags
|
||||||
FFMPEG_OPTS="(cd $srcdir/gst-libs/ext/libav && ./configure --help)"
|
LIBAV_OPTS="(cd $srcdir/gst-libs/ext/libav && ./configure --help)"
|
||||||
# Let's check if we can disable the building of the ffmpeg binary
|
# Let's check if we can disable the building of the libav binary
|
||||||
can_disable=`echo "$FFMPEG_OPTS" | grep 'disable-ffmpeg'`
|
can_disable=`echo "$LIBAV_OPTS" | grep 'disable-ffmpeg'`
|
||||||
if test "$can_disable" != ""; then
|
if test "$can_disable" != ""; then
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --disable-ffmpeg"
|
emblibav_configure_args="$emblibav_configure_args --disable-ffmpeg"
|
||||||
fi
|
fi
|
||||||
dnl check if libswscale needs enabling explicitly
|
dnl check if libswscale needs enabling explicitly
|
||||||
can_enable=`echo "$FFMPEG_OPTS" | grep 'enable-swscale'`
|
can_enable=`echo "$LIBAV_OPTS" | grep 'enable-swscale'`
|
||||||
if test "$can_enable" != ""; then
|
if test "$can_enable" != ""; then
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args --enable-swscale"
|
emblibav_configure_args="$emblibav_configure_args --enable-swscale"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# append extra configure options to embffmpeg_configure_args if needed
|
# append extra configure options to emblibav_configure_args if needed
|
||||||
if test "x$with_ffmpeg_extra_configure" != "xno"; then
|
if test "x$with_libav_extra_configure" != "xno"; then
|
||||||
embffmpeg_configure_args="$embffmpeg_configure_args $with_ffmpeg_extra_configure"
|
emblibav_configure_args="$emblibav_configure_args $with_libav_extra_configure"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(FFMPEG_CO_DIR)
|
AC_SUBST(LIBAV_CO_DIR)
|
||||||
AC_SUBST(FFMPEG_SVN)
|
AC_SUBST(LIBAV_SVN)
|
||||||
AC_SUBST(FFMPEG_REVISION)
|
AC_SUBST(LIBAV_REVISION)
|
||||||
AC_SUBST(FFMPEG_EXTERNALS_REVISION)
|
AC_SUBST(LIBAV_EXTERNALS_REVISION)
|
||||||
AC_CONFIG_COMMANDS([configure-embedded-ffmpeg],
|
AC_CONFIG_COMMANDS([configure-embedded-libav],
|
||||||
[echo "Configuring included Libav instance with args $embffmpeg_configure_args"
|
[echo "Configuring included Libav instance with args $emblibav_configure_args"
|
||||||
origdir=`pwd`
|
origdir=`pwd`
|
||||||
dnl Don't put path on the configure call when not needed, as FFmpeg's configure relies on it
|
dnl Don't put path on the configure call when not needed, as FFmpeg's configure relies on it
|
||||||
dnl to detect out-of-tree builds
|
dnl to detect out-of-tree builds
|
||||||
|
@ -387,33 +387,33 @@ else
|
||||||
|
|
||||||
AS_MKDIR_P(["$ac_top_build_prefix"gst-libs/ext/libav])
|
AS_MKDIR_P(["$ac_top_build_prefix"gst-libs/ext/libav])
|
||||||
cd "$ac_top_build_prefix"gst-libs/ext/libav &&
|
cd "$ac_top_build_prefix"gst-libs/ext/libav &&
|
||||||
eval "$confcmd $embffmpeg_configure_args" ||
|
eval "$confcmd $emblibav_configure_args" ||
|
||||||
AC_MSG_ERROR([Failed to configure embedded Libav tree])
|
AC_MSG_ERROR([Failed to configure embedded Libav tree])
|
||||||
cd "$origdir"
|
cd "$origdir"
|
||||||
],
|
],
|
||||||
[embffmpeg_configure_args="$embffmpeg_configure_args"])
|
[emblibav_configure_args="$emblibav_configure_args"])
|
||||||
AC_MSG_NOTICE([Using included Libav code])
|
AC_MSG_NOTICE([Using included Libav code])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(FFMPEG_CFLAGS)
|
AC_SUBST(LIBAV_CFLAGS)
|
||||||
AC_SUBST(FFMPEG_LIBS)
|
AC_SUBST(LIBAV_LIBS)
|
||||||
AC_SUBST(FFMPEG_SUBDIRS)
|
AC_SUBST(LIBAV_SUBDIRS)
|
||||||
AC_SUBST(POSTPROC_CFLAGS)
|
AC_SUBST(POSTPROC_CFLAGS)
|
||||||
AC_SUBST(POSTPROC_LIBS)
|
AC_SUBST(POSTPROC_LIBS)
|
||||||
AC_SUBST(SWSCALE_CFLAGS)
|
AC_SUBST(SWSCALE_CFLAGS)
|
||||||
AC_SUBST(SWSCALE_LIBS)
|
AC_SUBST(SWSCALE_LIBS)
|
||||||
AC_SUBST(WIN32_LIBS)
|
AC_SUBST(WIN32_LIBS)
|
||||||
|
|
||||||
if test x$HAVE_FFMPEG_UNINSTALLED = x1; then
|
if test x$HAVE_LIBAV_UNINSTALLED = x1; then
|
||||||
AC_DEFINE(HAVE_FFMPEG_UNINSTALLED, [], [Defined if building against uninstalled Libav source])
|
AC_DEFINE(HAVE_LIBAV_UNINSTALLED, [], [Defined if building against uninstalled Libav source])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_FFMPEG_UNINSTALLED, test x$HAVE_FFMPEG_UNINSTALLED = x1)
|
AM_CONDITIONAL(HAVE_LIBAV_UNINSTALLED, test x$HAVE_LIBAV_UNINSTALLED = x1)
|
||||||
|
|
||||||
AC_CONFIG_FILES(
|
AC_CONFIG_FILES(
|
||||||
Makefile
|
Makefile
|
||||||
common/Makefile
|
common/Makefile
|
||||||
common/m4/Makefile
|
common/m4/Makefile
|
||||||
gst-ffmpeg.spec
|
gst-libav.spec
|
||||||
ext/Makefile
|
ext/Makefile
|
||||||
ext/ffmpeg/Makefile
|
ext/ffmpeg/Makefile
|
||||||
ext/libpostproc/Makefile
|
ext/libpostproc/Makefile
|
||||||
|
|
|
@ -4,7 +4,7 @@ GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj
|
||||||
|
|
||||||
# The name of the module, e.g. 'glib'.
|
# The name of the module, e.g. 'glib'.
|
||||||
#DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@
|
#DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@
|
||||||
MODULE=gst-ffmpeg
|
MODULE=gst-libav
|
||||||
DOC_MODULE=$(MODULE)-plugins
|
DOC_MODULE=$(MODULE)-plugins
|
||||||
|
|
||||||
# for upload-doc.mak
|
# for upload-doc.mak
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = ffmpeg libswscale
|
SUBDIRS = ffmpeg libswscale
|
||||||
if !GST_FFMPEG_ENABLE_LGPL
|
if !GST_LIBAV_ENABLE_LGPL
|
||||||
SUBDIRS += libpostproc
|
SUBDIRS += libpostproc
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
plugin_LTLIBRARIES = libgstffmpeg.la
|
plugin_LTLIBRARIES = libgstlibav.la
|
||||||
|
|
||||||
if HAVE_BZ2
|
if HAVE_BZ2
|
||||||
BZ2_LIBS = -lbz2
|
BZ2_LIBS = -lbz2
|
||||||
|
@ -6,7 +6,7 @@ else
|
||||||
BZ2_LIBS =
|
BZ2_LIBS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libgstffmpeg_la_SOURCES = gstffmpeg.c \
|
libgstlibav_la_SOURCES = gstffmpeg.c \
|
||||||
gstffmpegprotocol.c \
|
gstffmpegprotocol.c \
|
||||||
gstffmpegcodecmap.c \
|
gstffmpegcodecmap.c \
|
||||||
gstffmpegutils.c \
|
gstffmpegutils.c \
|
||||||
|
@ -21,16 +21,16 @@ libgstffmpeg_la_SOURCES = gstffmpeg.c \
|
||||||
# \
|
# \
|
||||||
# gstffmpegscale.c
|
# gstffmpegscale.c
|
||||||
|
|
||||||
libgstffmpeg_la_CFLAGS = $(FFMPEG_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
|
libgstlibav_la_CFLAGS = $(LIBAV_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
|
||||||
libgstffmpeg_la_LIBADD = $(FFMPEG_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)
|
||||||
libgstffmpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
|
libgstlibav_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
|
||||||
libgstffmpeg_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstlibav_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
if HAVE_FFMPEG_UNINSTALLED
|
if HAVE_LIBAV_UNINSTALLED
|
||||||
libgstffmpeg_la_DEPENDENCIES = $(FFMPEG_LIBS)
|
libgstlibav_la_DEPENDENCIES = $(LIBAV_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#include <avformat.h>
|
#include <avformat.h>
|
||||||
#else
|
#else
|
||||||
|
@ -128,7 +128,7 @@ gboolean _shut_up_I_am_probing = FALSE;
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (ffmpeg_debug, "ffmpeg", 0, "FFmpeg elements");
|
GST_DEBUG_CATEGORY_INIT (ffmpeg_debug, "libav", 0, "libav elements");
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
|
|
||||||
av_log_set_callback (gst_ffmpeg_log_callback);
|
av_log_set_callback (gst_ffmpeg_log_callback);
|
||||||
|
@ -160,12 +160,12 @@ plugin_init (GstPlugin * plugin)
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
ffmpeg,
|
libav,
|
||||||
"All FFmpeg codecs and formats (" FFMPEG_SOURCE ")",
|
"All libav codecs and formats (" LIBAV_SOURCE ")",
|
||||||
plugin_init, PACKAGE_VERSION,
|
plugin_init, PACKAGE_VERSION,
|
||||||
#ifdef GST_FFMPEG_ENABLE_LGPL
|
#ifdef GST_LIBAV_ENABLE_LGPL
|
||||||
"LGPL",
|
"LGPL",
|
||||||
#else
|
#else
|
||||||
"GPL",
|
"GPL",
|
||||||
#endif
|
#endif
|
||||||
"FFmpeg", "http://ffmpeg.org/")
|
"libav", "http://www.libav.org")
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef __GST_FFMPEG_H__
|
#ifndef __GST_FFMPEG_H__
|
||||||
#define __GST_FFMPEG_H__
|
#define __GST_FFMPEG_H__
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#include <avformat.h>
|
#include <avformat.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
|
@ -110,7 +110,7 @@ gst_ffmpegaudioresample_base_init (gpointer g_class)
|
||||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
||||||
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
||||||
gst_element_class_set_static_metadata (element_class,
|
gst_element_class_set_static_metadata (element_class,
|
||||||
"FFMPEG Audio resampling element", "Filter/Converter/Audio",
|
"libav Audio resampling element", "Filter/Converter/Audio",
|
||||||
"Converts audio from one samplerate to another",
|
"Converts audio from one samplerate to another",
|
||||||
"Edward Hervey <bilboed@bilboed.com>");
|
"Edward Hervey <bilboed@bilboed.com>");
|
||||||
}
|
}
|
||||||
|
@ -306,6 +306,6 @@ gst_ffmpegaudioresample_transform (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
gboolean
|
gboolean
|
||||||
gst_ffmpegaudioresample_register (GstPlugin * plugin)
|
gst_ffmpegaudioresample_register (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
return gst_element_register (plugin, "ffaudioresample",
|
return gst_element_register (plugin, "avaudioresample",
|
||||||
GST_RANK_NONE, GST_TYPE_FFMPEGAUDIORESAMPLE);
|
GST_RANK_NONE, GST_TYPE_FFMPEGAUDIORESAMPLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ gst_ffmpeg_pass_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_pass_type =
|
ffmpeg_pass_type =
|
||||||
g_enum_register_static ("GstFFMpegEncPass", ffmpeg_passes);
|
g_enum_register_static ("GstLibAVEncPass", ffmpeg_passes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_pass_type;
|
return ffmpeg_pass_type;
|
||||||
|
@ -71,7 +71,7 @@ gst_ffmpeg_lim_pass_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_lim_pass_type =
|
ffmpeg_lim_pass_type =
|
||||||
g_enum_register_static ("GstFFMpegEncLimPass", ffmpeg_lim_passes);
|
g_enum_register_static ("GstLibAVEncLimPass", ffmpeg_lim_passes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_lim_pass_type;
|
return ffmpeg_lim_pass_type;
|
||||||
|
@ -94,7 +94,7 @@ gst_ffmpeg_mb_decision_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_mb_decision_type =
|
ffmpeg_mb_decision_type =
|
||||||
g_enum_register_static ("GstFFMpegEncMBDecision", ffmpeg_mb_decisions);
|
g_enum_register_static ("GstLibAVEncMBDecision", ffmpeg_mb_decisions);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_mb_decision_type;
|
return ffmpeg_mb_decision_type;
|
||||||
|
@ -129,7 +129,7 @@ gst_ffmpeg_mb_cmp_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_mb_cmp_type =
|
ffmpeg_mb_cmp_type =
|
||||||
g_enum_register_static ("GstFFMpegCMPFunction", ffmpeg_mb_cmps);
|
g_enum_register_static ("GstLibAVCMPFunction", ffmpeg_mb_cmps);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_mb_cmp_type;
|
return ffmpeg_mb_cmp_type;
|
||||||
|
@ -154,7 +154,7 @@ gst_ffmpeg_dct_algo_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_dct_algo_type =
|
ffmpeg_dct_algo_type =
|
||||||
g_enum_register_static ("GstFFMpegDCTAlgo", ffmpeg_dct_algos);
|
g_enum_register_static ("GstLibAVDCTAlgo", ffmpeg_dct_algos);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_dct_algo_type;
|
return ffmpeg_dct_algo_type;
|
||||||
|
@ -187,7 +187,7 @@ gst_ffmpeg_idct_algo_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_idct_algo_type =
|
ffmpeg_idct_algo_type =
|
||||||
g_enum_register_static ("GstFFMpegIDCTAlgo", ffmpeg_idct_algos);
|
g_enum_register_static ("GstLibAVIDCTAlgo", ffmpeg_idct_algos);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_idct_algo_type;
|
return ffmpeg_idct_algo_type;
|
||||||
|
@ -207,7 +207,7 @@ gst_ffmpeg_quant_type_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_quant_type_type =
|
ffmpeg_quant_type_type =
|
||||||
g_enum_register_static ("GstFFMpegEncQuantTypes", ffmpeg_quant_types);
|
g_enum_register_static ("GstLibAVEncQuantTypes", ffmpeg_quant_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_quant_type_type;
|
return ffmpeg_quant_type_type;
|
||||||
|
@ -228,7 +228,7 @@ gst_ffmpeg_pre_me_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_pre_me_type =
|
ffmpeg_pre_me_type =
|
||||||
g_enum_register_static ("GstFFMpegEncPreME", ffmpeg_pre_mes);
|
g_enum_register_static ("GstLibAVEncPreME", ffmpeg_pre_mes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_pre_me_type;
|
return ffmpeg_pre_me_type;
|
||||||
|
@ -249,7 +249,7 @@ gst_ffmpeg_pred_method_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_pred_method =
|
ffmpeg_pred_method =
|
||||||
g_enum_register_static ("GstFFMpegEncPredMethod", ffmpeg_pred_methods);
|
g_enum_register_static ("GstLibAVEncPredMethod", ffmpeg_pred_methods);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_pred_method;
|
return ffmpeg_pred_method;
|
||||||
|
@ -293,8 +293,7 @@ gst_ffmpeg_flags_get_type (void)
|
||||||
{0, NULL, NULL},
|
{0, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpeg_flags_type =
|
ffmpeg_flags_type = g_flags_register_static ("GstLibAVFlags", ffmpeg_flags);
|
||||||
g_flags_register_static ("GstFFMpegFlags", ffmpeg_flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpeg_flags_type;
|
return ffmpeg_flags_type;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef __GST_FFMPEG_CODECMAP_H__
|
#ifndef __GST_FFMPEG_CODECMAP_H__
|
||||||
#define __GST_FFMPEG_CODECMAP_H__
|
#define __GST_FFMPEG_CODECMAP_H__
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
|
@ -261,7 +261,7 @@ static void gst_ffmpegdec_release_buffer (AVCodecContext * context,
|
||||||
|
|
||||||
static void gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec);
|
static void gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec);
|
||||||
|
|
||||||
#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("ffdec-params")
|
#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("avdec-params")
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ gst_ffmpegdec_lowres_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpegdec_lowres_type =
|
ffmpegdec_lowres_type =
|
||||||
g_enum_register_static ("GstFFMpegDecLowres", ffmpegdec_lowres);
|
g_enum_register_static ("GstLibAVDecLowres", ffmpegdec_lowres);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpegdec_lowres_type;
|
return ffmpegdec_lowres_type;
|
||||||
|
@ -302,7 +302,7 @@ gst_ffmpegdec_skipframe_get_type (void)
|
||||||
};
|
};
|
||||||
|
|
||||||
ffmpegdec_skipframe_type =
|
ffmpegdec_skipframe_type =
|
||||||
g_enum_register_static ("GstFFMpegDecSkipFrame", ffmpegdec_skipframe);
|
g_enum_register_static ("GstLibAVDecSkipFrame", ffmpegdec_skipframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffmpegdec_skipframe_type;
|
return ffmpegdec_skipframe_type;
|
||||||
|
@ -323,10 +323,10 @@ gst_ffmpegdec_base_init (GstFFMpegDecClass * klass)
|
||||||
g_assert (in_plugin != NULL);
|
g_assert (in_plugin != NULL);
|
||||||
|
|
||||||
/* construct the element details struct */
|
/* construct the element details struct */
|
||||||
longname = g_strdup_printf ("FFmpeg %s decoder", in_plugin->long_name);
|
longname = g_strdup_printf ("libav %s decoder", in_plugin->long_name);
|
||||||
classification = g_strdup_printf ("Codec/Decoder/%s",
|
classification = g_strdup_printf ("Codec/Decoder/%s",
|
||||||
(in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
|
(in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
|
||||||
description = g_strdup_printf ("FFmpeg %s decoder", in_plugin->name);
|
description = g_strdup_printf ("libav %s decoder", in_plugin->name);
|
||||||
gst_element_class_set_metadata (element_class, longname,
|
gst_element_class_set_metadata (element_class, longname,
|
||||||
classification, description,
|
classification, description,
|
||||||
"Wim Taymans <wim.taymans@gmail.com>, "
|
"Wim Taymans <wim.taymans@gmail.com>, "
|
||||||
|
@ -714,7 +714,7 @@ gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
|
||||||
could_not_open:
|
could_not_open:
|
||||||
{
|
{
|
||||||
gst_ffmpegdec_close (ffmpegdec);
|
gst_ffmpegdec_close (ffmpegdec);
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "ffdec_%s: Failed to open FFMPEG codec",
|
GST_DEBUG_OBJECT (ffmpegdec, "avdec_%s: Failed to open FFMPEG codec",
|
||||||
oclass->in_plugin->name);
|
oclass->in_plugin->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1353,19 +1353,19 @@ gst_ffmpegdec_video_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
unknown_format:
|
unknown_format:
|
||||||
{
|
{
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
/* using internal ffmpeg snapshot */
|
/* using internal ffmpeg snapshot */
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
||||||
("Could not find GStreamer caps mapping for FFmpeg pixfmt %d.",
|
("Could not find GStreamer caps mapping for libav pixfmt %d.",
|
||||||
ffmpegdec->ctx_pix_fmt), (NULL));
|
ffmpegdec->ctx_pix_fmt), (NULL));
|
||||||
#else
|
#else
|
||||||
/* using external ffmpeg */
|
/* using external ffmpeg */
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
||||||
("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
|
("Could not find GStreamer caps mapping for libav codec '%s', and "
|
||||||
"you are using an external libavcodec. This is most likely due to "
|
"you are using an external libavcodec. This is most likely due to "
|
||||||
"a packaging problem and/or libavcodec having been upgraded to a "
|
"a packaging problem and/or libavcodec having been upgraded to a "
|
||||||
"version that is not compatible with this version of "
|
"version that is not compatible with this version of "
|
||||||
"gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
|
"gstreamer-libav. Make sure your gstreamer-libav and libavcodec "
|
||||||
"packages come from the same source/repository.",
|
"packages come from the same source/repository.",
|
||||||
oclass->in_plugin->name), (NULL));
|
oclass->in_plugin->name), (NULL));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1374,7 +1374,7 @@ unknown_format:
|
||||||
caps_failed:
|
caps_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
|
||||||
("Could not set caps for ffmpeg decoder (%s), not fixed?",
|
("Could not set caps for libav decoder (%s), not fixed?",
|
||||||
oclass->in_plugin->name));
|
oclass->in_plugin->name));
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
@ -1461,19 +1461,19 @@ gst_ffmpegdec_audio_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
no_caps:
|
no_caps:
|
||||||
{
|
{
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
/* using internal ffmpeg snapshot */
|
/* using internal ffmpeg snapshot */
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
||||||
("Could not find GStreamer caps mapping for FFmpeg codec '%s'.",
|
("Could not find GStreamer caps mapping for libav codec '%s'.",
|
||||||
oclass->in_plugin->name), (NULL));
|
oclass->in_plugin->name), (NULL));
|
||||||
#else
|
#else
|
||||||
/* using external ffmpeg */
|
/* using external ffmpeg */
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
|
||||||
("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
|
("Could not find GStreamer caps mapping for libav codec '%s', and "
|
||||||
"you are using an external libavcodec. This is most likely due to "
|
"you are using an external libavcodec. This is most likely due to "
|
||||||
"a packaging problem and/or libavcodec having been upgraded to a "
|
"a packaging problem and/or libavcodec having been upgraded to a "
|
||||||
"version that is not compatible with this version of "
|
"version that is not compatible with this version of "
|
||||||
"gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
|
"gstreamer-libav. Make sure your gstreamer-libav and libavcodec "
|
||||||
"packages come from the same source/repository.",
|
"packages come from the same source/repository.",
|
||||||
oclass->in_plugin->name), (NULL));
|
oclass->in_plugin->name), (NULL));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1482,7 +1482,7 @@ no_caps:
|
||||||
caps_failed:
|
caps_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
|
||||||
("Could not set caps for ffmpeg decoder (%s), not fixed?",
|
("Could not set caps for libav decoder (%s), not fixed?",
|
||||||
oclass->in_plugin->name));
|
oclass->in_plugin->name));
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
@ -2361,7 +2361,7 @@ gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
|
||||||
if (len == -1 && (in_plugin->id == CODEC_ID_AAC
|
if (len == -1 && (in_plugin->id == CODEC_ID_AAC
|
||||||
|| in_plugin->id == CODEC_ID_AAC_LATM)) {
|
|| in_plugin->id == CODEC_ID_AAC_LATM)) {
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
|
GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
|
||||||
("Decoding of AAC stream by FFMPEG failed."));
|
("Decoding of AAC stream by libav failed."));
|
||||||
*ret = GST_FLOW_ERROR;
|
*ret = GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2444,7 +2444,7 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
|
||||||
|
|
||||||
if (len < 0 || have_data < 0) {
|
if (len < 0 || have_data < 0) {
|
||||||
GST_WARNING_OBJECT (ffmpegdec,
|
GST_WARNING_OBJECT (ffmpegdec,
|
||||||
"ffdec_%s: decoding error (len: %d, have_data: %d)",
|
"avdec_%s: decoding error (len: %d, have_data: %d)",
|
||||||
oclass->in_plugin->name, len, have_data);
|
oclass->in_plugin->name, len, have_data);
|
||||||
*got_data = 0;
|
*got_data = 0;
|
||||||
goto beach;
|
goto beach;
|
||||||
|
@ -2504,7 +2504,7 @@ gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec)
|
||||||
gint have_data, len, try = 0;
|
gint have_data, len, try = 0;
|
||||||
|
|
||||||
GST_LOG_OBJECT (ffmpegdec,
|
GST_LOG_OBJECT (ffmpegdec,
|
||||||
"codec has delay capabilities, calling until ffmpeg has drained everything");
|
"codec has delay capabilities, calling until libav has drained everything");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
@ -3021,7 +3021,7 @@ not_negotiated:
|
||||||
{
|
{
|
||||||
oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
|
oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
|
||||||
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
|
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
|
||||||
("ffdec_%s: input format was not set before data start",
|
("avdec_%s: input format was not set before data start",
|
||||||
oclass->in_plugin->name));
|
oclass->in_plugin->name));
|
||||||
gst_buffer_unref (inbuf);
|
gst_buffer_unref (inbuf);
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
|
@ -3177,14 +3177,14 @@ gst_ffmpegdec_register (GstPlugin * plugin)
|
||||||
* outside of ffmpeg. */
|
* outside of ffmpeg. */
|
||||||
if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
|
if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
|
||||||
GST_DEBUG
|
GST_DEBUG
|
||||||
("Ignoring VDPAU decoder %s. We can't handle this outside of ffmpeg",
|
("Ignoring VDPAU decoder %s. We can't handle this outside of libav",
|
||||||
in_plugin->name);
|
in_plugin->name);
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
|
if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
|
||||||
GST_DEBUG
|
GST_DEBUG
|
||||||
("Ignoring XVMC decoder %s. We can't handle this outside of ffmpeg",
|
("Ignoring XVMC decoder %s. We can't handle this outside of libav",
|
||||||
in_plugin->name);
|
in_plugin->name);
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
@ -3217,7 +3217,7 @@ gst_ffmpegdec_register (GstPlugin * plugin)
|
||||||
/* construct the type */
|
/* construct the type */
|
||||||
plugin_name = g_strdup ((gchar *) in_plugin->name);
|
plugin_name = g_strdup ((gchar *) in_plugin->name);
|
||||||
g_strdelimit (plugin_name, NULL, '_');
|
g_strdelimit (plugin_name, NULL, '_');
|
||||||
type_name = g_strdup_printf ("ffdec_%s", plugin_name);
|
type_name = g_strdup_printf ("avdec_%s", plugin_name);
|
||||||
g_free (plugin_name);
|
g_free (plugin_name);
|
||||||
|
|
||||||
type = g_type_from_name (type_name);
|
type = g_type_from_name (type_name);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
# include <avcodec.h>
|
# include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
# include <libavcodec/avcodec.h>
|
# include <libavcodec/avcodec.h>
|
||||||
|
@ -73,7 +73,7 @@ gst_ffmpegdeinterlace_modes_get_type (void)
|
||||||
|
|
||||||
if (!deinterlace_modes_type) {
|
if (!deinterlace_modes_type) {
|
||||||
deinterlace_modes_type =
|
deinterlace_modes_type =
|
||||||
g_enum_register_static ("GstFFMpegDeinterlaceModes", modes_types);
|
g_enum_register_static ("GstLibAVDeinterlaceModes", modes_types);
|
||||||
}
|
}
|
||||||
return deinterlace_modes_type;
|
return deinterlace_modes_type;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ gst_ffmpegdeinterlace_class_init (GstFFMpegDeinterlaceClass * klass)
|
||||||
gst_static_pad_template_get (&sink_factory));
|
gst_static_pad_template_get (&sink_factory));
|
||||||
|
|
||||||
gst_element_class_set_static_metadata (element_class,
|
gst_element_class_set_static_metadata (element_class,
|
||||||
"FFMPEG Deinterlace element", "Filter/Effect/Video/Deinterlace",
|
"libav Deinterlace element", "Filter/Effect/Video/Deinterlace",
|
||||||
"Deinterlace video", "Luca Ognibene <luogni@tin.it>");
|
"Deinterlace video", "Luca Ognibene <luogni@tin.it>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ gst_ffmpegdeinterlace_chain (GstPad * pad, GstObject * parent,
|
||||||
gboolean
|
gboolean
|
||||||
gst_ffmpegdeinterlace_register (GstPlugin * plugin)
|
gst_ffmpegdeinterlace_register (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
return gst_element_register (plugin, "ffdeinterlace",
|
return gst_element_register (plugin, "avdeinterlace",
|
||||||
GST_RANK_NONE, GST_TYPE_FFMPEGDEINTERLACE);
|
GST_RANK_NONE, GST_TYPE_FFMPEGDEINTERLACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avformat.h>
|
#include <avformat.h>
|
||||||
#ifdef HAVE_AVI_H
|
#ifdef HAVE_AVI_H
|
||||||
#include <avi.h>
|
#include <avi.h>
|
||||||
|
@ -142,7 +142,7 @@ gst_ffmpegdemux_send_event (GstElement * element, GstEvent * event);
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_ffmpegdemux_change_state (GstElement * element, GstStateChange transition);
|
gst_ffmpegdemux_change_state (GstElement * element, GstStateChange transition);
|
||||||
|
|
||||||
#define GST_FFDEMUX_PARAMS_QDATA g_quark_from_static_string("ffdemux-params")
|
#define GST_FFDEMUX_PARAMS_QDATA g_quark_from_static_string("avdemux-params")
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -200,8 +200,8 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* construct the element details struct */
|
/* construct the element details struct */
|
||||||
longname = g_strdup_printf ("FFmpeg %s demuxer", in_plugin->long_name);
|
longname = g_strdup_printf ("libav %s demuxer", in_plugin->long_name);
|
||||||
description = g_strdup_printf ("FFmpeg %s demuxer", in_plugin->long_name);
|
description = g_strdup_printf ("libav %s demuxer", in_plugin->long_name);
|
||||||
gst_element_class_set_metadata (element_class, longname,
|
gst_element_class_set_metadata (element_class, longname,
|
||||||
"Codec/Demuxer", description,
|
"Codec/Demuxer", description,
|
||||||
"Wim Taymans <wim@fluendo.com>, "
|
"Wim Taymans <wim@fluendo.com>, "
|
||||||
|
@ -1290,7 +1290,7 @@ gst_ffmpegdemux_type_find (GstTypeFind * tf, gpointer priv)
|
||||||
|
|
||||||
sinkcaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
|
sinkcaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
|
||||||
|
|
||||||
GST_LOG ("ffmpeg typefinder '%s' suggests %" GST_PTR_FORMAT ", p=%u%%",
|
GST_LOG ("libav typefinder '%s' suggests %" GST_PTR_FORMAT ", p=%u%%",
|
||||||
in_plugin->name, sinkcaps, res);
|
in_plugin->name, sinkcaps, res);
|
||||||
|
|
||||||
gst_type_find_suggest (tf, res, sinkcaps);
|
gst_type_find_suggest (tf, res, sinkcaps);
|
||||||
|
@ -1873,7 +1873,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
||||||
gint rank;
|
gint rank;
|
||||||
gboolean register_typefind_func = TRUE;
|
gboolean register_typefind_func = TRUE;
|
||||||
|
|
||||||
GST_LOG ("Attempting to handle ffmpeg demuxer plugin %s [%s]",
|
GST_LOG ("Attempting to handle libav demuxer plugin %s [%s]",
|
||||||
in_plugin->name, in_plugin->long_name);
|
in_plugin->name, in_plugin->long_name);
|
||||||
|
|
||||||
/* no emulators */
|
/* no emulators */
|
||||||
|
@ -1994,7 +1994,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* construct the type */
|
/* construct the type */
|
||||||
type_name = g_strdup_printf ("ffdemux_%s", name);
|
type_name = g_strdup_printf ("avdemux_%s", name);
|
||||||
|
|
||||||
/* if it's already registered, drop it */
|
/* if it's already registered, drop it */
|
||||||
if (g_type_from_name (type_name)) {
|
if (g_type_from_name (type_name)) {
|
||||||
|
@ -2002,7 +2002,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
|
||||||
typefind_name = g_strdup_printf ("fftype_%s", name);
|
typefind_name = g_strdup_printf ("avtype_%s", name);
|
||||||
|
|
||||||
/* create the type now */
|
/* create the type now */
|
||||||
type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
|
type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
|
||||||
|
@ -2018,7 +2018,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
||||||
!gst_type_find_register (plugin, typefind_name, rank,
|
!gst_type_find_register (plugin, typefind_name, rank,
|
||||||
gst_ffmpegdemux_type_find, extensions, NULL, in_plugin,
|
gst_ffmpegdemux_type_find, extensions, NULL, in_plugin,
|
||||||
NULL))) {
|
NULL))) {
|
||||||
g_warning ("Register of type ffdemux_%s failed", name);
|
g_warning ("Register of type avdemux_%s failed", name);
|
||||||
g_free (type_name);
|
g_free (type_name);
|
||||||
g_free (typefind_name);
|
g_free (typefind_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
#include <libavcodec/avcodec.h>
|
#include <libavcodec/avcodec.h>
|
||||||
|
@ -85,7 +85,7 @@ gst_ffmpegenc_me_method_get_type (void)
|
||||||
};
|
};
|
||||||
if (!ffmpegenc_me_method_type) {
|
if (!ffmpegenc_me_method_type) {
|
||||||
ffmpegenc_me_method_type =
|
ffmpegenc_me_method_type =
|
||||||
g_enum_register_static ("GstFFMpegEncMeMethod", ffmpegenc_me_methods);
|
g_enum_register_static ("GstLibAVEncMeMethod", ffmpegenc_me_methods);
|
||||||
}
|
}
|
||||||
return ffmpegenc_me_method_type;
|
return ffmpegenc_me_method_type;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ static void gst_ffmpegenc_get_property (GObject * object,
|
||||||
static GstStateChangeReturn gst_ffmpegenc_change_state (GstElement * element,
|
static GstStateChangeReturn gst_ffmpegenc_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
|
|
||||||
#define GST_FFENC_PARAMS_QDATA g_quark_from_static_string("ffenc-params")
|
#define GST_FFENC_PARAMS_QDATA g_quark_from_static_string("avenc-params")
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -139,10 +139,10 @@ gst_ffmpegenc_base_init (GstFFMpegEncClass * klass)
|
||||||
g_assert (in_plugin != NULL);
|
g_assert (in_plugin != NULL);
|
||||||
|
|
||||||
/* construct the element details struct */
|
/* construct the element details struct */
|
||||||
longname = g_strdup_printf ("FFmpeg %s encoder", in_plugin->long_name);
|
longname = g_strdup_printf ("libav %s encoder", in_plugin->long_name);
|
||||||
classification = g_strdup_printf ("Codec/Encoder/%s",
|
classification = g_strdup_printf ("Codec/Encoder/%s",
|
||||||
(in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
|
(in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
|
||||||
description = g_strdup_printf ("FFmpeg %s encoder", in_plugin->name);
|
description = g_strdup_printf ("libav %s encoder", in_plugin->name);
|
||||||
gst_element_class_set_metadata (element_class, longname,
|
gst_element_class_set_metadata (element_class, longname,
|
||||||
classification, description,
|
classification, description,
|
||||||
"Wim Taymans <wim.taymans@gmail.com>, "
|
"Wim Taymans <wim.taymans@gmail.com>, "
|
||||||
|
@ -676,7 +676,7 @@ gst_ffmpegenc_setcaps (GstFFMpegEnc * ffmpegenc, GstCaps * caps)
|
||||||
gst_ffmpeg_avcodec_close (ffmpegenc->context);
|
gst_ffmpeg_avcodec_close (ffmpegenc->context);
|
||||||
if (ffmpegenc->context->stats_in)
|
if (ffmpegenc->context->stats_in)
|
||||||
g_free (ffmpegenc->context->stats_in);
|
g_free (ffmpegenc->context->stats_in);
|
||||||
GST_DEBUG_OBJECT (ffmpegenc, "ffenc_%s: Failed to open FFMPEG codec",
|
GST_DEBUG_OBJECT (ffmpegenc, "avenc_%s: Failed to open libav codec",
|
||||||
oclass->in_plugin->name);
|
oclass->in_plugin->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ gst_ffmpegenc_setcaps (GstFFMpegEnc * ffmpegenc, GstCaps * caps)
|
||||||
if (pix_fmt != ffmpegenc->context->pix_fmt) {
|
if (pix_fmt != ffmpegenc->context->pix_fmt) {
|
||||||
gst_ffmpeg_avcodec_close (ffmpegenc->context);
|
gst_ffmpeg_avcodec_close (ffmpegenc->context);
|
||||||
GST_DEBUG_OBJECT (ffmpegenc,
|
GST_DEBUG_OBJECT (ffmpegenc,
|
||||||
"ffenc_%s: AV wants different colourspace (%d given, %d wanted)",
|
"avenc_%s: AV wants different colourspace (%d given, %d wanted)",
|
||||||
oclass->in_plugin->name, pix_fmt, ffmpegenc->context->pix_fmt);
|
oclass->in_plugin->name, pix_fmt, ffmpegenc->context->pix_fmt);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@ gst_ffmpegenc_setcaps (GstFFMpegEnc * ffmpegenc, GstCaps * caps)
|
||||||
* and quite some codecs do not make up their own mind about that
|
* and quite some codecs do not make up their own mind about that
|
||||||
* in any case, _NONE can never work out later on */
|
* in any case, _NONE can never work out later on */
|
||||||
if (oclass->in_plugin->type == AVMEDIA_TYPE_VIDEO && pix_fmt == PIX_FMT_NONE) {
|
if (oclass->in_plugin->type == AVMEDIA_TYPE_VIDEO && pix_fmt == PIX_FMT_NONE) {
|
||||||
GST_DEBUG_OBJECT (ffmpegenc, "ffenc_%s: Failed to determine input format",
|
GST_DEBUG_OBJECT (ffmpegenc, "avenc_%s: Failed to determine input format",
|
||||||
oclass->in_plugin->name);
|
oclass->in_plugin->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -822,7 +822,7 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||||
GstFFMpegEncClass *oclass =
|
GstFFMpegEncClass *oclass =
|
||||||
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
|
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
|
||||||
GST_ERROR_OBJECT (ffmpegenc,
|
GST_ERROR_OBJECT (ffmpegenc,
|
||||||
"ffenc_%s: failed to encode buffer", oclass->in_plugin->name);
|
"avenc_%s: failed to encode buffer", oclass->in_plugin->name);
|
||||||
#endif /* GST_DISABLE_GST_DEBUG */
|
#endif /* GST_DISABLE_GST_DEBUG */
|
||||||
gst_buffer_unref (inbuf);
|
gst_buffer_unref (inbuf);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
@ -1135,7 +1135,7 @@ gst_ffmpegenc_flush_buffers (GstFFMpegEnc * ffmpegenc, gboolean send)
|
||||||
GstFFMpegEncClass *oclass =
|
GstFFMpegEncClass *oclass =
|
||||||
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
|
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
|
||||||
GST_WARNING_OBJECT (ffmpegenc,
|
GST_WARNING_OBJECT (ffmpegenc,
|
||||||
"ffenc_%s: failed to flush buffer", oclass->in_plugin->name);
|
"avenc_%s: failed to flush buffer", oclass->in_plugin->name);
|
||||||
#endif /* GST_DISABLE_GST_DEBUG */
|
#endif /* GST_DISABLE_GST_DEBUG */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1446,7 +1446,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* construct the type */
|
/* construct the type */
|
||||||
type_name = g_strdup_printf ("ffenc_%s", in_plugin->name);
|
type_name = g_strdup_printf ("avenc_%s", in_plugin->name);
|
||||||
|
|
||||||
type = g_type_from_name (type_name);
|
type = g_type_from_name (type_name);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avformat.h>
|
#include <avformat.h>
|
||||||
#else
|
#else
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
|
@ -132,7 +132,7 @@ static GstCaps *gst_ffmpegmux_get_id_caps (enum CodecID *id_list);
|
||||||
static void gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps,
|
static void gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps,
|
||||||
const gchar * field, guint num, const gint * values);
|
const gchar * field, guint num, const gint * values);
|
||||||
|
|
||||||
#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("ffmux-params")
|
#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("avmux-params")
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
|
|
||||||
|
@ -216,17 +216,17 @@ gst_ffmpegmux_base_init (gpointer g_class)
|
||||||
is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
|
is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
|
||||||
if (replacement != NULL) {
|
if (replacement != NULL) {
|
||||||
longname =
|
longname =
|
||||||
g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
|
g_strdup_printf ("libav %s %s (not recommended, use %s instead)",
|
||||||
in_plugin->long_name, is_formatter ? "formatter" : "muxer",
|
in_plugin->long_name, is_formatter ? "formatter" : "muxer",
|
||||||
replacement);
|
replacement);
|
||||||
description =
|
description =
|
||||||
g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
|
g_strdup_printf ("libav %s %s (not recommended, use %s instead)",
|
||||||
in_plugin->long_name, is_formatter ? "formatter" : "muxer",
|
in_plugin->long_name, is_formatter ? "formatter" : "muxer",
|
||||||
replacement);
|
replacement);
|
||||||
} else {
|
} else {
|
||||||
longname = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
|
longname = g_strdup_printf ("libav %s %s", in_plugin->long_name,
|
||||||
is_formatter ? "formatter" : "muxer");
|
is_formatter ? "formatter" : "muxer");
|
||||||
description = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
|
description = g_strdup_printf ("libav %s %s", in_plugin->long_name,
|
||||||
is_formatter ? "formatter" : "muxer");
|
is_formatter ? "formatter" : "muxer");
|
||||||
}
|
}
|
||||||
gst_element_class_set_metadata (element_class, longname,
|
gst_element_class_set_metadata (element_class, longname,
|
||||||
|
@ -430,7 +430,7 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
|
||||||
type = AVMEDIA_TYPE_AUDIO;
|
type = AVMEDIA_TYPE_AUDIO;
|
||||||
bitrate = 285 * 1024;
|
bitrate = 285 * 1024;
|
||||||
} else {
|
} else {
|
||||||
g_warning ("ffmux: unknown pad template!");
|
g_warning ("avmux: unknown pad template!");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
|
||||||
/* we fill in codec during capsnego */
|
/* we fill in codec during capsnego */
|
||||||
|
|
||||||
/* we love debug output (c) (tm) (r) */
|
/* we love debug output (c) (tm) (r) */
|
||||||
GST_DEBUG ("Created %s pad for ffmux_%s element",
|
GST_DEBUG ("Created %s pad for avmux_%s element",
|
||||||
padname, ((GstFFMpegMuxClass *) klass)->in_plugin->name);
|
padname, ((GstFFMpegMuxClass *) klass)->in_plugin->name);
|
||||||
g_free (padname);
|
g_free (padname);
|
||||||
|
|
||||||
|
@ -655,7 +655,7 @@ gst_ffmpegmux_collected (GstCollectPads2 * pads, gpointer user_data)
|
||||||
if (url_fopen (&ffmpegmux->context->pb,
|
if (url_fopen (&ffmpegmux->context->pb,
|
||||||
ffmpegmux->context->filename, open_flags) < 0) {
|
ffmpegmux->context->filename, open_flags) < 0) {
|
||||||
GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
|
GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
|
||||||
("Failed to open stream context in ffmux"));
|
("Failed to open stream context in avmux"));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -947,7 +947,7 @@ gst_ffmpegmux_register (GstPlugin * plugin)
|
||||||
* muxer type. */
|
* muxer type. */
|
||||||
|
|
||||||
/* construct the type */
|
/* construct the type */
|
||||||
type_name = g_strdup_printf ("ffmux_%s", in_plugin->name);
|
type_name = g_strdup_printf ("avmux_%s", in_plugin->name);
|
||||||
|
|
||||||
p = type_name;
|
p = type_name;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avformat.h>
|
#include <avformat.h>
|
||||||
#else
|
#else
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
#include <ffmpeg/avcodec.h>
|
#include <ffmpeg/avcodec.h>
|
||||||
|
@ -105,7 +105,7 @@ gst_ffmpegscale_base_init (gpointer g_class)
|
||||||
|
|
||||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
||||||
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
||||||
gst_element_class_set_static_metadata (element_class, "FFMPEG Scale element",
|
gst_element_class_set_static_metadata (element_class, "libav Scale element",
|
||||||
"Filter/Converter/Video/Scaler",
|
"Filter/Converter/Video/Scaler",
|
||||||
"Converts video from one resolution to another",
|
"Converts video from one resolution to another",
|
||||||
"Luca Ognibene <luogni@tin.it>");
|
"Luca Ognibene <luogni@tin.it>");
|
||||||
|
@ -398,6 +398,6 @@ gst_ffmpegscale_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
gboolean
|
gboolean
|
||||||
gst_ffmpegscale_register (GstPlugin * plugin)
|
gst_ffmpegscale_register (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
return gst_element_register (plugin, "ffvideoscale",
|
return gst_element_register (plugin, "avvideoscale",
|
||||||
GST_RANK_NONE, GST_TYPE_FFMPEGSCALE);
|
GST_RANK_NONE, GST_TYPE_FFMPEGSCALE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <mathematics.h>
|
#include <mathematics.h>
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <orc/orc.h>
|
#include <orc/orc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <avcodec.h>
|
#include <avcodec.h>
|
||||||
#include <postprocess.h>
|
#include <postprocess.h>
|
||||||
#else
|
#else
|
||||||
|
@ -902,6 +902,5 @@ plugin_init (GstPlugin * plugin)
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
postproc,
|
postproc,
|
||||||
"postprocessing elements (" FFMPEG_SOURCE ")",
|
"postprocessing elements (" LIBAV_SOURCE ")",
|
||||||
plugin_init,
|
plugin_init, PACKAGE_VERSION, "GPL", "libav", "http://www.libav.org")
|
||||||
PACKAGE_VERSION, "GPL", "FFMpeg", "http://ffmpeg.sourceforge.net/")
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
plugin_LTLIBRARIES = libgstffmpegscale.la
|
plugin_LTLIBRARIES = libgstavscale.la
|
||||||
|
|
||||||
libgstffmpegscale_la_SOURCES = gstffmpegscale.c
|
libgstavscale_la_SOURCES = gstffmpegscale.c
|
||||||
|
|
||||||
libgstffmpegscale_la_CFLAGS = $(SWSCALE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
|
libgstavscale_la_CFLAGS = $(SWSCALE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
|
||||||
$(ORC_CFLAGS)
|
$(ORC_CFLAGS)
|
||||||
libgstffmpegscale_la_LIBADD = $(SWSCALE_LIBS) \
|
libgstavscale_la_LIBADD = $(SWSCALE_LIBS) \
|
||||||
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
|
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \
|
||||||
$(GST_BASE_LIBS) $(ORC_LIBS) $(LIBM) -lz
|
$(GST_BASE_LIBS) $(ORC_LIBS) $(LIBM) -lz
|
||||||
libgstffmpegscale_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
|
libgstavscale_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
|
||||||
libgstffmpegscale_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstavscale_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
if HAVE_FFMPEG_UNINSTALLED
|
if HAVE_LIBAV_UNINSTALLED
|
||||||
libgstffmpegscale_la_DEPENDENCIES = $(SWSCALE_LIBS)
|
libgstavscale_la_DEPENDENCIES = $(SWSCALE_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
#ifdef HAVE_LIBAV_UNINSTALLED
|
||||||
#include <swscale.h>
|
#include <swscale.h>
|
||||||
#else
|
#else
|
||||||
#include <libswscale/swscale.h>
|
#include <libswscale/swscale.h>
|
||||||
|
@ -135,7 +135,7 @@ gst_ffmpegscale_method_get_type (void)
|
||||||
|
|
||||||
if (!ffmpegscale_method_type) {
|
if (!ffmpegscale_method_type) {
|
||||||
ffmpegscale_method_type =
|
ffmpegscale_method_type =
|
||||||
g_enum_register_static ("GstFFMpegVideoScaleMethod",
|
g_enum_register_static ("GstLibAVVideoScaleMethod",
|
||||||
ffmpegscale_methods);
|
ffmpegscale_methods);
|
||||||
}
|
}
|
||||||
return ffmpegscale_method_type;
|
return ffmpegscale_method_type;
|
||||||
|
@ -196,7 +196,7 @@ gst_ffmpegscale_class_init (GstFFMpegScaleClass * klass)
|
||||||
gst_static_pad_template_get (&sink_factory));
|
gst_static_pad_template_get (&sink_factory));
|
||||||
|
|
||||||
gst_element_class_set_static_metadata (gstelement_class,
|
gst_element_class_set_static_metadata (gstelement_class,
|
||||||
"FFMPEG Scale element", "Filter/Converter/Video",
|
"libav Scale element", "Filter/Converter/Video",
|
||||||
"Converts video from one resolution to another",
|
"Converts video from one resolution to another",
|
||||||
"Luca Ognibene <luogni@tin.it>, Mark Nauwelaerts <mnauw@users.sf.net>");
|
"Luca Ognibene <luogni@tin.it>, Mark Nauwelaerts <mnauw@users.sf.net>");
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ gst_ffmpeg_log_callback (void *ptr, int level, const char *fmt, va_list vl)
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (ffmpegscale_debug, "ffvideoscale", 0,
|
GST_DEBUG_CATEGORY_INIT (ffmpegscale_debug, "avvideoscale", 0,
|
||||||
"video scaling element");
|
"video scaling element");
|
||||||
|
|
||||||
#ifdef HAVE_ORC
|
#ifdef HAVE_ORC
|
||||||
|
@ -767,17 +767,18 @@ plugin_init (GstPlugin * plugin)
|
||||||
av_log_set_callback (gst_ffmpeg_log_callback);
|
av_log_set_callback (gst_ffmpeg_log_callback);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return gst_element_register (plugin, "ffvideoscale",
|
return gst_element_register (plugin, "avvideoscale",
|
||||||
GST_RANK_NONE, GST_TYPE_FFMPEGSCALE);
|
GST_RANK_NONE, GST_TYPE_FFMPEGSCALE);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
ffvideoscale,
|
avvideoscale,
|
||||||
"videoscaling element (" FFMPEG_SOURCE ")", plugin_init, PACKAGE_VERSION,
|
"libav videoscaling element (" LIBAV_SOURCE ")", plugin_init,
|
||||||
#ifdef GST_FFMPEG_ENABLE_LGPL
|
PACKAGE_VERSION,
|
||||||
|
#ifdef GST_LIBAV_ENABLE_LGPL
|
||||||
"LGPL",
|
"LGPL",
|
||||||
#else
|
#else
|
||||||
"GPL",
|
"GPL",
|
||||||
#endif
|
#endif
|
||||||
"FFMpeg", "http://ffmpeg.sourceforge.net/")
|
"libav", "http://www.libav.org/")
|
||||||
|
|
|
@ -19,14 +19,14 @@ clean-local: clean-local-check
|
||||||
check_PROGRAMS = \
|
check_PROGRAMS = \
|
||||||
generic/plugin-test \
|
generic/plugin-test \
|
||||||
generic/libavcodec-locking \
|
generic/libavcodec-locking \
|
||||||
elements/ffdec_adpcm \
|
elements/avdec_adpcm \
|
||||||
elements/ffdemux_ape \
|
elements/avdemux_ape \
|
||||||
elements/postproc
|
elements/postproc
|
||||||
|
|
||||||
VALGRIND_TO_FIX = \
|
VALGRIND_TO_FIX = \
|
||||||
generic/plugin-test \
|
generic/plugin-test \
|
||||||
generic/libavcodec-locking \
|
generic/libavcodec-locking \
|
||||||
elements/ffdemux_ape
|
elements/avdemux_ape
|
||||||
|
|
||||||
TESTS = $(check_PROGRAMS)
|
TESTS = $(check_PROGRAMS)
|
||||||
|
|
||||||
|
@ -42,6 +42,6 @@ LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
|
||||||
# valgrind testing
|
# valgrind testing
|
||||||
VALGRIND_TESTS_DISABLE = $(VALGRIND_TO_FIX)
|
VALGRIND_TESTS_DISABLE = $(VALGRIND_TO_FIX)
|
||||||
|
|
||||||
SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-ffmpeg.supp
|
SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-libav.supp
|
||||||
|
|
||||||
EXTRA_DIST = gst-ffmpeg.supp
|
EXTRA_DIST = gst-libav.supp
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* GStreamer unit tests for ffdec_adpcm
|
/* GStreamer unit tests for avdec_adpcm
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Tim-Philipp Müller <tim centricular net>
|
* Copyright (C) 2009 Tim-Philipp Müller <tim centricular net>
|
||||||
*
|
*
|
||||||
|
@ -154,9 +154,9 @@ GST_START_TEST (test_low_sample_rate_adpcm)
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static Suite *
|
static Suite *
|
||||||
ffdec_adpcm_suite (void)
|
avdec_adpcm_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("ffdec_adpcm");
|
Suite *s = suite_create ("avdec_adpcm");
|
||||||
TCase *tc_chain = tcase_create ("general");
|
TCase *tc_chain = tcase_create ("general");
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
|
@ -165,4 +165,4 @@ ffdec_adpcm_suite (void)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_CHECK_MAIN (ffdec_adpcm)
|
GST_CHECK_MAIN (avdec_adpcm)
|
|
@ -1,4 +1,4 @@
|
||||||
/* GStreamer unit tests for ffdemux_ape
|
/* GStreamer unit tests for avdemux_ape
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Tim-Philipp Müller <tim centricular net>
|
* Copyright (C) 2009 Tim-Philipp Müller <tim centricular net>
|
||||||
*
|
*
|
||||||
|
@ -109,7 +109,7 @@ read_tags_from_file (const gchar * file, gboolean push_mode)
|
||||||
/* can't link uridecodebin and sink yet, do that later */
|
/* can't link uridecodebin and sink yet, do that later */
|
||||||
g_signal_connect (dec, "pad-added", G_CALLBACK (pad_added_cb), pipeline);
|
g_signal_connect (dec, "pad-added", G_CALLBACK (pad_added_cb), pipeline);
|
||||||
|
|
||||||
/* we want to make sure there's a tag event coming out of ffdemux_ape
|
/* we want to make sure there's a tag event coming out of avdemux_ape
|
||||||
* (ie. the one apedemux generated) */
|
* (ie. the one apedemux generated) */
|
||||||
pad = gst_element_get_static_pad (sink, "sink");
|
pad = gst_element_get_static_pad (sink, "sink");
|
||||||
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, event_probe,
|
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, event_probe,
|
||||||
|
@ -156,7 +156,7 @@ run_check_for_file (const gchar * filename, CheckTagsFunc * check_func)
|
||||||
#define tag_list_has_tag(taglist,tag) \
|
#define tag_list_has_tag(taglist,tag) \
|
||||||
(gst_tag_list_get_value_index((taglist),(tag),0) != NULL)
|
(gst_tag_list_get_value_index((taglist),(tag),0) != NULL)
|
||||||
|
|
||||||
/* just make sure ffdemux_ape forwarded the tags extracted by apedemux
|
/* just make sure avdemux_ape forwarded the tags extracted by apedemux
|
||||||
* (should be the first tag list / tag event too) */
|
* (should be the first tag list / tag event too) */
|
||||||
static void
|
static void
|
||||||
check_for_apedemux_tags (const GstTagList * tags, const gchar * file)
|
check_for_apedemux_tags (const GstTagList * tags, const gchar * file)
|
||||||
|
@ -192,9 +192,9 @@ GST_START_TEST (test_tag_caching)
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static Suite *
|
static Suite *
|
||||||
ffdemux_ape_suite (void)
|
avdemux_ape_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("ffdemux_ape");
|
Suite *s = suite_create ("avdemux_ape");
|
||||||
TCase *tc_chain = tcase_create ("general");
|
TCase *tc_chain = tcase_create ("general");
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
|
@ -203,4 +203,4 @@ ffdemux_ape_suite (void)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_CHECK_MAIN (ffdemux_ape)
|
GST_CHECK_MAIN (avdemux_ape)
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (C) 2005 Luca Ognibene <luogni@tin.it>
|
* Copyright (C) 2005 Luca Ognibene <luogni@tin.it>
|
||||||
* Based (copied) on simple_launch_lines.c
|
* Based (copied) on simple_launch_lines.c
|
||||||
*
|
*
|
||||||
* ffmpeg-lock.c: Unit test for libavcodec's locks
|
* libavcodec-locking.c: Unit test for libavcodec's locks
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
@ -103,7 +103,7 @@ GST_START_TEST (test_libavcodec_locks)
|
||||||
for (i = 0; i < NUM_SINKS; i++)
|
for (i = 0; i < NUM_SINKS; i++)
|
||||||
sink[i] =
|
sink[i] =
|
||||||
g_strdup_printf
|
g_strdup_printf
|
||||||
(" t.src_%u ! queue ! ffenc_mpeg4 ! ffdec_mpeg4 ! fakesink sync=true",
|
(" t.src_%u ! queue ! avenc_mpeg4 ! avdec_mpeg4 ! fakesink sync=true",
|
||||||
i);
|
i);
|
||||||
|
|
||||||
sink[NUM_SINKS] = NULL;
|
sink[NUM_SINKS] = NULL;
|
||||||
|
@ -147,7 +147,7 @@ simple_launch_lines_suite (void)
|
||||||
|
|
||||||
#ifndef GST_DISABLE_PARSE
|
#ifndef GST_DISABLE_PARSE
|
||||||
/* only run this if we haven't been configured with --disable-encoders */
|
/* only run this if we haven't been configured with --disable-encoders */
|
||||||
if (gst_registry_check_feature_version (gst_registry_get (), "ffenc_mpeg4",
|
if (gst_registry_check_feature_version (gst_registry_get (), "avenc_mpeg4",
|
||||||
GST_VERSION_MAJOR, GST_VERSION_MINOR, 0)) {
|
GST_VERSION_MAJOR, GST_VERSION_MINOR, 0)) {
|
||||||
tcase_add_test (tc_chain, test_libavcodec_locks);
|
tcase_add_test (tc_chain, test_libavcodec_locks);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
GST_START_TEST (test_ffmpeg_plugin)
|
GST_START_TEST (test_libav_plugin)
|
||||||
{
|
{
|
||||||
GstPlugin *plugin = gst_plugin_load_by_name ("ffmpeg");
|
GstPlugin *plugin = gst_plugin_load_by_name ("libav");
|
||||||
|
|
||||||
fail_if (plugin == NULL, "Could not load FFmpeg plugin");
|
fail_if (plugin == NULL, "Could not load FFmpeg plugin");
|
||||||
|
|
||||||
|
@ -36,21 +36,21 @@ GST_START_TEST (test_ffmpeg_plugin)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST (test_ffmpeg_update_reg)
|
GST_START_TEST (test_libav_update_reg)
|
||||||
{
|
{
|
||||||
GstElement *encoder, *muxer, *decoder;
|
GstElement *encoder, *muxer, *decoder;
|
||||||
|
|
||||||
/* Ask for elements the first time */
|
/* Ask for elements the first time */
|
||||||
encoder = gst_element_factory_make ("ffenc_mpeg2video", "sink");
|
encoder = gst_element_factory_make ("avenc_mpeg2video", "sink");
|
||||||
GST_DEBUG ("Creating element ffenc_mpeg2video %p", encoder);
|
GST_DEBUG ("Creating element avenc_mpeg2video %p", encoder);
|
||||||
fail_unless (encoder != NULL);
|
fail_unless (encoder != NULL);
|
||||||
|
|
||||||
decoder = gst_element_factory_make ("ffdec_mpeg2video", "sink");
|
decoder = gst_element_factory_make ("avdec_mpeg2video", "sink");
|
||||||
GST_DEBUG ("Creating element ffdec_mpeg2video %p", decoder);
|
GST_DEBUG ("Creating element avdec_mpeg2video %p", decoder);
|
||||||
fail_unless (decoder != NULL);
|
fail_unless (decoder != NULL);
|
||||||
|
|
||||||
muxer = gst_element_factory_make ("ffmux_dvd", "sink");
|
muxer = gst_element_factory_make ("avmux_dvd", "sink");
|
||||||
GST_DEBUG ("Creating element ffmux_dvd %p", muxer);
|
GST_DEBUG ("Creating element avmux_dvd %p", muxer);
|
||||||
fail_unless (muxer != NULL);
|
fail_unless (muxer != NULL);
|
||||||
|
|
||||||
gst_object_unref (encoder);
|
gst_object_unref (encoder);
|
||||||
|
@ -62,16 +62,16 @@ GST_START_TEST (test_ffmpeg_update_reg)
|
||||||
|
|
||||||
/* Ask for elements the second time */
|
/* Ask for elements the second time */
|
||||||
|
|
||||||
encoder = gst_element_factory_make ("ffenc_mpeg2video", "sink");
|
encoder = gst_element_factory_make ("avenc_mpeg2video", "sink");
|
||||||
GST_DEBUG ("Creating element ffenc_mpeg2video %p", encoder);
|
GST_DEBUG ("Creating element avenc_mpeg2video %p", encoder);
|
||||||
fail_unless (encoder != NULL);
|
fail_unless (encoder != NULL);
|
||||||
|
|
||||||
decoder = gst_element_factory_make ("ffdec_mpeg2video", "sink");
|
decoder = gst_element_factory_make ("avdec_mpeg2video", "sink");
|
||||||
GST_DEBUG ("Creating element ffdec_mpeg2video %p", decoder);
|
GST_DEBUG ("Creating element avdec_mpeg2video %p", decoder);
|
||||||
fail_unless (decoder != NULL);
|
fail_unless (decoder != NULL);
|
||||||
|
|
||||||
muxer = gst_element_factory_make ("ffmux_dvd", "sink");
|
muxer = gst_element_factory_make ("avmux_dvd", "sink");
|
||||||
GST_DEBUG ("Creating element ffmux_dvd %p", muxer);
|
GST_DEBUG ("Creating element avmux_dvd %p", muxer);
|
||||||
fail_unless (muxer != NULL);
|
fail_unless (muxer != NULL);
|
||||||
|
|
||||||
gst_object_unref (encoder);
|
gst_object_unref (encoder);
|
||||||
|
@ -89,8 +89,8 @@ plugin_test_suite (void)
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
|
|
||||||
tcase_add_test (tc_chain, test_ffmpeg_plugin);
|
tcase_add_test (tc_chain, test_libav_plugin);
|
||||||
tcase_add_test (tc_chain, test_ffmpeg_update_reg);
|
tcase_add_test (tc_chain, test_libav_update_reg);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue