From 5e176f4b0c3795d6b403fbb8dd5a040f2e9c1a18 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 5 Jun 2009 19:25:54 +0100 Subject: [PATCH] Moved 'x264enc' from -bad to -ugly --- configure.ac | 25 ++++++++++++++ docs/plugins/Makefile.am | 1 + .../gst-plugins-ugly-plugins-docs.sgml | 2 ++ .../gst-plugins-ugly-plugins-sections.txt | 14 ++++++++ docs/plugins/inspect/plugin-x264.xml | 34 +++++++++++++++++++ ext/Makefile.am | 12 +++++-- gst-plugins-ugly.spec.in | 7 ++++ tests/check/Makefile.am | 9 ++++- tests/check/elements/.gitignore | 1 + 9 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 docs/plugins/inspect/plugin-x264.xml diff --git a/configure.ac b/configure.ac index 3579b64f43..b9cefe8a45 100644 --- a/configure.ac +++ b/configure.ac @@ -377,6 +377,29 @@ AG_GST_CHECK_FEATURE(TWOLAME, [twolame], twolame, [ AC_SUBST(TWOLAME_LIBS) ]) +dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) *** +translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true) +AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [ + AG_GST_CHECK_LIBHEADER(X264, x264, x264_nal_encode, -lm, x264.h, + AC_MSG_CHECKING([for uptodate x264 API version]) + dnl _stdint not yet generated, so no compiling + AC_TRY_CPP([ + #include + #if X264_BUILD < 55 + #error "x264 build too old" + #endif + ], [ + AC_MSG_RESULT(yes) + X264_LIBS="$LDFLAGS -lx264 -lm" + X264_CFLAGS="$CFLAGS" + AC_SUBST(X264_LIBS) + AC_SUBST(X264_CFLAGS) + ], [ + AC_MSG_RESULT(no) + HAVE_X264=no + ])) +]) + else dnl not building plugins with external dependencies, @@ -393,6 +416,7 @@ AM_CONDITIONAL(USE_MAD, false) AM_CONDITIONAL(USE_MPEG2DEC, false) AM_CONDITIONAL(USE_SIDPLAY, false) AM_CONDITIONAL(USE_TWOLAME, false) +AM_CONDITIONAL(USE_X264, false) fi dnl of EXT plugins @@ -479,6 +503,7 @@ ext/mad/Makefile ext/mpeg2dec/Makefile ext/sidplay/Makefile ext/twolame/Makefile +ext/x264/Makefile docs/Makefile docs/plugins/Makefile docs/version.entities diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 094edbf355..f0be950b3e 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -93,6 +93,7 @@ EXTRA_HFILES = \ $(top_srcdir)/ext/mad/gstmad.h \ $(top_srcdir)/ext/sidplay/gstsiddec.h \ $(top_srcdir)/ext/twolame/gsttwolame.h \ + $(top_srcdir)/ext/x264/gstx264enc.h \ $(top_srcdir)/gst/asfdemux/gstrtspwms.h \ $(top_srcdir)/gst/mpegaudioparse/gstxingmux.h \ $(top_srcdir)/gst/realmedia/rademux.h \ diff --git a/docs/plugins/gst-plugins-ugly-plugins-docs.sgml b/docs/plugins/gst-plugins-ugly-plugins-docs.sgml index 5917986b7f..6b603707f3 100644 --- a/docs/plugins/gst-plugins-ugly-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-ugly-plugins-docs.sgml @@ -32,6 +32,7 @@ + @@ -56,5 +57,6 @@ + diff --git a/docs/plugins/gst-plugins-ugly-plugins-sections.txt b/docs/plugins/gst-plugins-ugly-plugins-sections.txt index 0bf6288534..26e7c509a4 100644 --- a/docs/plugins/gst-plugins-ugly-plugins-sections.txt +++ b/docs/plugins/gst-plugins-ugly-plugins-sections.txt @@ -219,6 +219,20 @@ GST_TYPE_TWO_LAME gst_two_lame_get_type + +
+element-x264enc +x264enc +GstX264Enc + +GstX264EncClass +GST_X264_ENC +GST_X264_ENC_CLASS +GST_IS_X264_ENC +GST_IS_X264_ENC_CLASS +GST_TYPE_X264_ENC +
+
element-xingmux xingmux diff --git a/docs/plugins/inspect/plugin-x264.xml b/docs/plugins/inspect/plugin-x264.xml new file mode 100644 index 0000000000..b2e5018f50 --- /dev/null +++ b/docs/plugins/inspect/plugin-x264.xml @@ -0,0 +1,34 @@ + + x264 + libx264-based H264 plugins + ../../ext/x264/.libs/libgstx264.so + libgstx264.so + 0.10.11.1 + GPL + gst-plugins-ugly + GStreamer Ugly Plug-ins git/prerelease + Unknown package origin + + + x264enc + x264enc + Codec/Encoder/Video + H264 Encoder + Josef Zlomek <josef.zlomek@itonis.tv>, Mark Nauwelaerts <mnauw@users.sf.net> + + + sink + sink + always +
video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
+
+ + src + source + always +
video/x-h264, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
+
+
+
+
+
\ No newline at end of file diff --git a/ext/Makefile.am b/ext/Makefile.am index 6634c1b891..6b2f7e1c35 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -58,6 +58,12 @@ else TWOLAME_DIR = endif +if USE_X264 +X264_DIR=x264 +else +X264_DIR= +endif + SUBDIRS = \ $(A52DEC_DIR) \ $(AMRNB_DIR) \ @@ -68,7 +74,8 @@ SUBDIRS = \ $(MAD_DIR) \ $(MPEG2DEC_DIR) \ $(SIDPLAY_DIR) \ - $(TWOLAME_DIR) + $(TWOLAME_DIR) \ + $(X264_DIR) DIST_SUBDIRS = \ a52dec \ @@ -80,4 +87,5 @@ DIST_SUBDIRS = \ mad \ mpeg2dec \ sidplay \ - twolame + twolame \ + x264 diff --git a/gst-plugins-ugly.spec.in b/gst-plugins-ugly.spec.in index 24fa6c4243..8d4dc9d82c 100644 --- a/gst-plugins-ugly.spec.in +++ b/gst-plugins-ugly.spec.in @@ -36,6 +36,8 @@ BuildRequires: gcc-c++ @USE_DVDREAD_TRUE@Provides: gstreamer-dvdread = %{version}-%{release} @USE_MPEG2DEC_TRUE@Provides: gstreamer-mpeg2dec = %{version}-%{release} +@USE_X264_TRUE@Requires: x264 + %description GStreamer is a streaming media framework, based on graphs of elements which operate on media data. @@ -111,8 +113,13 @@ rm -rf $RPM_BUILD_ROOT @USE_MPEG2DEC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmpeg2dec.so @USE_TWOLAME_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgsttwolame.so %doc %{_datadir}/gtk-doc/html/gst-plugins-ugly-plugins-%{majorminor}/* +@USE_X264_TRUE@%{_datadir}/gstreamer-%{majorminor}/presets/GstX264Enc.prs +@USE_X264_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstx264.so %changelog +* Fri Jun 5 2009 Jan Schmidt +- Move x264enc plugin from -bad + * Fri Dec 15 2006 Thomas Vander Stichele - further cleanup - add .doap file diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index c1867b90f7..522d0c57e8 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -36,11 +36,18 @@ else MPEG2DEC = endif +if USE_X264 +check_x264enc=elements/x264enc +else +check_x264enc= +endif + check_PROGRAMS = \ generic/states \ $(AMRNB) \ $(LAME) \ $(MPEG2DEC) \ + $(check_x264enc) \ elements/xingmux # these tests don't even pass @@ -52,7 +59,7 @@ AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS) # valgrind testing -VALGRIND_TESTS_DISABLE = +VALGRIND_TESTS_DISABLE = elements/x264enc SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-ugly.supp diff --git a/tests/check/elements/.gitignore b/tests/check/elements/.gitignore index ace39484c5..c2c4108e32 100644 --- a/tests/check/elements/.gitignore +++ b/tests/check/elements/.gitignore @@ -1,4 +1,5 @@ amrnbenc mpeg2dec +x264enc xingmux .dirstamp