[gstreamermm] Add the plug-ins to the build.



commit db1560c6473543db456d5d126e597e46d1261a00
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Wed Sep 9 19:02:35 2009 -0400

    	Add the plug-ins to the build.
    
    	* Makefile.am: Include tools directory in maintainer mode (typo).
    	* configure.ac: Include plug-in definitions and giomm-2.4 dependency.
    	* gstreamer/gstreamermm/Makefile.am: Patch generated .hg files only in
    	maintainer mode.  Also distribute the patch files.
    	* gstreamer/src/Makefile.am: Include rules for generating plug-in .hg
    	and .ccg files.  Remove the generated .hg and .ccg files on
    	maintainer cleans.
    	* gstreamer/src/filelist.am: Sort the list of regular and plug-ins .hg
    	file names.

 ChangeLog                         |   14 +++
 Makefile.am                       |    2 +-
 configure.ac                      |   82 +++++++++++++++++
 gstreamer/gstreamermm/Makefile.am |   12 ++-
 gstreamer/src/Makefile.am         |   62 ++++++++++++-
 gstreamer/src/filelist.am         |  178 +++++++++++++++++++------------------
 6 files changed, 256 insertions(+), 94 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c43c628..2bbb18c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2009-09-09  José Alburquerque  <jaalburqu svn gnome org>
 
+	Add the plug-ins to the build.
+
+	* Makefile.am: Include tools directory in maintainer mode (typo).
+	* configure.ac: Include plug-in definitions and giomm-2.4 dependency.
+	* gstreamer/gstreamermm/Makefile.am: Patch generated .hg files only in
+	maintainer mode.  Also distribute the patch files.
+	* gstreamer/src/Makefile.am: Include rules for generating plug-in .hg
+	and .ccg files.  Remove the generated .hg and .ccg files on
+	maintainer cleans.
+	* gstreamer/src/filelist.am: Sort the list of regular and plug-ins .hg
+	file names.
+
+2009-09-09  José Alburquerque  <jaalburqu svn gnome org>
+
 	Include the tools directory even when not in maintainer mode.
 
 	* Makefile.am: Include the tools directory even when not in maintainer
diff --git a/Makefile.am b/Makefile.am
index c54e724..dcc3f86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@ ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
 DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
 
 if MAINTAINER_MODE
-src_subdirs = gstreamer/src
+src_subdirs = tools gstreamer/src
 else
 src_subdirs = tools
 endif
diff --git a/configure.ac b/configure.ac
index 95daf0c..3ca4811 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,7 @@ min_libxmlpp_version='2.14.0'
 AC_SUBST([GSTREAMERMM_MODULES],
          ["\
 glibmm-2.4 >= $min_glibmm_version \
+giomm-2.4 >= $min_glibmm_version \
 libxml++-2.6 >= $min_libxmlpp_version \
 gstreamer-0.10 >= $min_gstreamer_version \
 gstreamer-base-0.10 >= $min_gstreamer_version \
@@ -72,6 +73,7 @@ MM_ARG_ENABLE_DOCUMENTATION
 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
 MM_ARG_WITH_TAGFILE_DOC([libsigc++-2.0.tag], [sigc++-2.0])
 MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
+MM_ARG_WITH_TAGFILE_DOC([giomm-2.4.tag], [giomm-2.4])
 
 AC_LANG([C++])
 MM_ARG_ENABLE_WARNINGS([GSTREAMERMM_WXXFLAGS],
@@ -79,6 +81,86 @@ MM_ARG_ENABLE_WARNINGS([GSTREAMERMM_WXXFLAGS],
                        [-pedantic -Wall -Wextra],
                        [G GSTREAMER])
 
+#########################################################################
+#  Plug-in definitions
+#########################################################################
+
+# To add a plugin, add the plugin definition, in the form of
+# "plugin=CppClassName" to the space-separated list of definitions below.
+# (Where "plugin" is the plugin name as recognized by gst-inspect and
+# "CppClassName" is the desired name of the C++ class.)
+#
+# Also add the target .hg file name to the plugins_hg variable in the
+# gstreamer/src/fileslist.am.  (That must be the same as "CppClassName" - all
+# in lowercase with a .hg extension).  Make sure that the order of both lists
+# correspond.
+
+# TODO: Include appsink and appsrc plug-ins in list below if they indeed are
+# plug-ins (see gst-plugins-base docs for details) and when they don't cause
+# gstreamermm initialization errors.
+GSTREAMERMM_PLUGIN_DEFS="\
+adder=Adder \
+alsamixer=AlsaMixer \
+alsasink=AlsaSink \
+alsasrc=AlsaSrc \
+audioconvert=AudioConvert \
+audioresample=AudioResample \
+audiotestsrc=AudioTestSrc \
+capsfilter=CapsFilter \
+cdparanoiasrc=CdParanoiaSrc \
+clockoverlay=ClockOverlay \
+decodebin2=DecodeBin2 \
+decodebin=DecodeBin \
+fakesink=FakeSink \
+fakesrc=FakeSrc \
+fdsink=FdSink \
+fdsrc=FdSrc \
+ffmpegcolorspace=FfmpegColorSpace \
+filesink=FileSink \
+filesrc=FileSrc \
+gdpdepay=GDPDepay \
+gdppay=GDPPay \
+giosink=GioSink \
+giosrc=GioSrc \
+giostreamsink=GioStreamSink \
+giostreamsrc=GioStreamSrc \
+identity=Identity \
+multifdsink=MultiFdSink \
+multiqueue=MultiQueue \
+oggdemux=OggDemux \
+oggmux=OggMux \
+playbin2=PlayBin2 \
+playbin=PlayBin \
+queue=Queue \
+tcpclientsink=TCPClientSink \
+tcpclientsrc=TCPClientSrc \
+tcpserversink=TcpServerSink \
+tcpserversrc=TCPServerSrc \
+tee=Tee \
+textoverlay=TextOverlay \
+textrender=TextRender \
+theoradec=TheoraDec \
+theoraenc=TheoraEnc \
+theoraparse=TheoraParse \
+timeoverlay=TimeOverlay \
+typefind=TypeFindElement \
+uridecodebin=UriDecodeBin \
+videorate=VideoRate \
+videoscale=VideoScale \
+videotestsrc=VideoTestSrc \
+volume=Volume \
+vorbisdec=VorbisDec \
+vorbisenc=VorbisEnc \
+vorbisparse=VorbisParse \
+vorbistag=VorbisTag \
+ximagesink=XImageSink \
+xvimagesink=XvImageSink \
+"
+
+AC_SUBST(GSTREAMERMM_PLUGIN_DEFS)
+
+##########################################################################
+
 AC_CONFIG_FILES([Makefile
                  tools/Makefile
                  tools/generate_gst_wrap_init.pl
diff --git a/gstreamer/gstreamermm/Makefile.am b/gstreamer/gstreamermm/Makefile.am
index 323e864..e4f5d9e 100644
--- a/gstreamer/gstreamermm/Makefile.am
+++ b/gstreamer/gstreamermm/Makefile.am
@@ -22,8 +22,6 @@ include $(top_srcdir)/build/compile-binding.am
 stampdir = $(srcdir)/.stamps
 patched_stamps = $(patched_hg:%.hg=$(stampdir)/stamp-%)
 
-BUILT_SOURCES = $(patched_stamps)
-
 generate_gst_wrap_init_in = $(top_builddir)/tools/generate_gst_wrap_init.pl.in
 generate_gst_wrap_init = $(PERL) -- $(top_builddir)/tools/generate_gst_wrap_init.pl
 generate_gst_wrap_init_flags = --namespace=Gst --parent_dir=gstreamermm
@@ -41,6 +39,16 @@ $(stampdir)/stamp-%: $(stampdir) $(srcdir)/%.h
 	rm -f $(srcdir)/$*.h.rej
 	@echo 'timestamp' > $@
 
+# Patch the generated .hg files that need to be patched but only in maintainer
+# mode
+if MAINTAINER_MODE
+BUILT_SOURCES = $(patched_stamps)
+endif
+
+# Distribute the patch files for the generated .hg files that need to be
+# patched.
+EXTRA_DIST = $(patched_hg:%.hg=%.h.patch)
+
 local_cppflags = $(binding_includes) $(binding_cppflags) -DGSTREAMERMM_BUILD=1
 
 AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(GSTREAMERMM_CFLAGS)
diff --git a/gstreamer/src/Makefile.am b/gstreamer/src/Makefile.am
index d8edbb4..d0a74d0 100644
--- a/gstreamer/src/Makefile.am
+++ b/gstreamer/src/Makefile.am
@@ -13,10 +13,66 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-binding_name    = gstreamermm
-wrap_init_flags = --namespace=Gst --parent_dir=gstreamermm
-codegen_srcdir  = $(top_srcdir)/tools
+binding_name     = gstreamermm
+wrap_init_flags  = --namespace=Gst --parent_dir=gstreamermm
+codegen_srcdir   = $(top_srcdir)/tools
+extradefs_srcdir = $(codegen_srcdir)/extra_defs_gen
+m4_srcdir  	 = $(codegen_srcdir)/m4
+
+# The generate_plugin_gmmproc_file utility
+generate_plugin_gmmproc_file_source = $(extradefs_srcdir)/generate_plugin_gmmproc_file.cc
+generate_plugin_gmmproc_file_path = $(extradefs_srcdir)/generate_plugin_gmmproc_file
+generate_plugin_gmmproc_file_args = --namespace=Gst --main-defs=gst --target=gstreamermm
+run_generate_plugin_gmmproc_file = $(generate_plugin_gmmproc_file_path) $(generate_plugin_gmmproc_file_args)
 
 include $(srcdir)/filelist.am
 include $(top_srcdir)/tools/m4/filelist.am
 include $(top_srcdir)/build/generate-binding.am
+
+if MAINTAINER_MODE
+generate_plugin_dep = $(generate_plugin_gmmproc_file_source)
+endif
+
+# The source file from which the license header may be extracted and placed in
+# plug-in generated .hg and .ccg files (use a file that probably will not
+# change because it will be a plug-in generation dependency):
+license_header_source_file = $(srcdir)/../gstreamermm/version.h
+
+# This is to generate plugin .ccg files.  The generated .ccg file is piped
+# through m4 using the macros in tools/m4/ctocpp_base.m4 which then produces
+# the final .ccg file.
+$(plugins_ccg): $(generate_plugin_dep) $(files_plugin_m4:%=$(m4_srcdir)/%) \
+	$(license_header_source_file)
+	$(eval list_delim = $$(patsubst $$@,+,$$(plugins_ccg)))
+	$(eval prev_mems = $$(shell echo "$$(list_delim)" | cut -d'+' -f 1))
+	$(eval pos = $$(shell expr `echo "$$(prev_mems)" | wc -w` + 1))
+	$(eval plugin_def = $$(word $$(pos),$$(GSTREAMERMM_PLUGIN_DEFS)))
+	$(eval plugin_name = $$(shell echo "$$(plugin_def)" | cut -d'=' -f 1))
+	$(eval cppname = $$(subst $$(plugin_name)=,,$$(plugin_def)))
+if MAINTAINER_MODE
+	@if $(run_generate_plugin_gmmproc_file) --confirm-existence \
+		$(plugin_name); then true; else \
+		echo "The $(plugin_name) gstreamer plugin is not installed.  Aborting build. If you built gst-plugins-base from source code then you might need to install the appropriate -dev or --devel packages or enable experimenal plugins before rebuilding gst-plugins-base."; \
+		false; \
+	fi
+endif
+	sed -n '1,/^$$/p' $(license_header_source_file) > $(srcdir)/$@
+	$(run_generate_plugin_gmmproc_file) --ccg $(plugin_name) \
+		$(cppname) | m4 -I $(m4_srcdir) >> $(srcdir)/$@
+
+# This is to generate plugin .hg files.  The generated .hg file is piped
+# through m4 using the macros in tools/m4/ctocpp_base.m4 which then produces
+# the final .hg file.
+$(plugins_hg): %.hg: $(generate_plugin_dep) \
+	$(files_plugin_m4:%=$(m4_srcdir)/%) $(license_header_source_file) %.ccg
+	$(eval list_delim = $$(patsubst $$@,+,$$(plugins_hg)))
+	$(eval prev_mems = $$(shell echo "$$(list_delim)" | cut -d'+' -f 1))
+	$(eval pos = $$(shell expr `echo "$$(prev_mems)" | wc -w` + 1))
+	$(eval plugin_def = $$(word $$(pos),$$(GSTREAMERMM_PLUGIN_DEFS)))
+	$(eval plugin_name = $$(shell echo "$$(plugin_def)" | cut -d'=' -f 1))
+	$(eval cppname = $$(subst $$(plugin_name)=,,$$(plugin_def)))
+	sed -n '1,/^$$/p' $(license_header_source_file) > $(srcdir)/$@
+	$(run_generate_plugin_gmmproc_file) --hg $(plugin_name) \
+		$(cppname) | m4 -I $(m4_srcdir) >> $(srcdir)/$@
+
+MAINTAINERCLEANFILES += $(plugins_hg) $(plugins_ccg)
diff --git a/gstreamer/src/filelist.am b/gstreamer/src/filelist.am
index 86e81df..31bfae0 100644
--- a/gstreamer/src/filelist.am
+++ b/gstreamer/src/filelist.am
@@ -10,81 +10,8 @@ files_defs =                    \
         gst_docs.xml            \
         gst_docs_override.xml
 
-files_hg  =                     \
-        bin.hg                  \
-        buffer.hg               \
-        bus.hg                  \
-        caps.hg                 \
-        childproxy.hg           \
-        clock.hg                \
-        element.hg              \
-        elementfactory.hg       \
-        enums.hg                \
-        error.hg                \
-        event.hg                \
-        filter.hg               \
-        format.hg               \
-        ghostpad.hg             \
-        index.hg                \
-        indexfactory.hg         \
-        interface.hg            \
-        iterator.hg             \
-        message.hg              \
-        object.hg               \
-        pad.hg                  \
-        padtemplate.hg          \
-        parse.hg                \
-        pipeline.hg             \
-        plugin.hg               \
-        pluginfeature.hg        \
-        preset.hg               \
-        query.hg                \
-        registry.hg             \
-        segment.hg              \
-        structure.hg            \
-        systemclock.hg          \
-        taglist.hg              \
-        tagsetter.hg            \
-        task.hg                 \
-        taskpool.hg             \
-        urihandler.hg           \
-        value.hg                \
-        xml.hg                  \
-        basesink.hg             \
-        basesrc.hg              \
-        basetransform.hg        \
-        pushsrc.hg              \
-        audioclock.hg           \
-        audiofilter.hg          \
-        audiosink.hg            \
-        audiosrc.hg             \
-        baseaudiosink.hg        \
-        baseaudiosrc.hg         \
-        cddabasesrc.hg          \
-        ringbuffer.hg           \
-        videosink.hg            \
-        colorbalance.hg         \
-        colorbalancechannel.hg  \
-        mixer.hg                \
-        mixeroptions.hg         \
-        mixertrack.hg           \
-        navigation.hg           \
-        propertyprobe.hg        \
-        tuner.hg                \
-        tunerchannel.hg         \
-        tunernorm.hg            \
-        typefind.hg             \
-        typefindfactory.hg      \
-        videoorientation.hg     \
-        xoverlay.hg
-
-files_ccg = $(files_hg:.hg=.ccg)
-
-patched_hg =                    \
-        taglist.hg
-
 # To add a plugin, add the plugin definition, in the form of
-# "plugin=CppClassName" to the GSTREAMERMM_ALL_PLUGIN_DEFS variable of the
+# "plugin=CppClassName" to the GSTREAMERMM_PLUGIN_DEFS variable of the
 # configure.ac file.  (Where "plugin" is the plugin name as recognized by
 # gst-inspect and "CppClassName" is the desired name of the C++ class.)
 #
@@ -96,18 +23,6 @@ patched_hg =                    \
 # plug-ins (see gst-plugins-base docs for details) and when they don't cause
 # gstreamermm initialization errors.
 plugins_hg =                    \
-        capsfilter.hg           \
-        fakesink.hg             \
-        fakesrc.hg              \
-        fdsink.hg               \
-        fdsrc.hg                \
-        filesink.hg             \
-        filesrc.hg              \
-        identity.hg             \
-        multiqueue.hg           \
-        queue.hg                \
-        tee.hg                  \
-        typefindelement.hg      \
         adder.hg                \
         alsamixer.hg            \
         alsasink.hg             \
@@ -115,32 +30,44 @@ plugins_hg =                    \
         audioconvert.hg         \
         audioresample.hg        \
         audiotestsrc.hg         \
+        capsfilter.hg           \
         cdparanoiasrc.hg        \
         clockoverlay.hg         \
-        decodebin.hg            \
         decodebin2.hg           \
+        decodebin.hg            \
+        fakesink.hg             \
+        fakesrc.hg              \
+        fdsink.hg               \
+        fdsrc.hg                \
         ffmpegcolorspace.hg     \
+        filesink.hg             \
+        filesrc.hg              \
         gdpdepay.hg             \
         gdppay.hg               \
         giosink.hg              \
         giosrc.hg               \
         giostreamsink.hg        \
         giostreamsrc.hg         \
+        identity.hg             \
         multifdsink.hg          \
+        multiqueue.hg           \
         oggdemux.hg             \
         oggmux.hg               \
-        playbin.hg              \
         playbin2.hg             \
+        playbin.hg              \
+        queue.hg                \
         tcpclientsink.hg        \
         tcpclientsrc.hg         \
         tcpserversink.hg        \
         tcpserversrc.hg         \
+        tee.hg                  \
         textoverlay.hg          \
         textrender.hg           \
         theoradec.hg            \
         theoraenc.hg            \
         theoraparse.hg          \
         timeoverlay.hg          \
+        typefindelement.hg      \
         uridecodebin.hg         \
         videorate.hg            \
         videoscale.hg           \
@@ -154,3 +81,78 @@ plugins_hg =                    \
         xvimagesink.hg
 
 plugins_ccg = $(plugins_hg:.hg=.ccg)
+
+files_hg  =                     \
+        audioclock.hg           \
+        audiofilter.hg          \
+        audiosink.hg            \
+        audiosrc.hg             \
+        baseaudiosink.hg        \
+        baseaudiosrc.hg         \
+        basesink.hg             \
+        basesrc.hg              \
+        basetransform.hg        \
+        bin.hg                  \
+        buffer.hg               \
+        bus.hg                  \
+        caps.hg                 \
+        cddabasesrc.hg          \
+        childproxy.hg           \
+        clock.hg                \
+        colorbalancechannel.hg  \
+        colorbalance.hg         \
+        elementfactory.hg       \
+        element.hg              \
+        enums.hg                \
+        error.hg                \
+        event.hg                \
+        filter.hg               \
+        format.hg               \
+        ghostpad.hg             \
+        indexfactory.hg         \
+        index.hg                \
+        interface.hg            \
+        iterator.hg             \
+        message.hg              \
+        mixer.hg                \
+        mixeroptions.hg         \
+        mixertrack.hg           \
+        navigation.hg           \
+        object.hg               \
+        pad.hg                  \
+        padtemplate.hg          \
+        parse.hg                \
+        pipeline.hg             \
+        pluginfeature.hg        \
+        plugin.hg               \
+        preset.hg               \
+        propertyprobe.hg        \
+        pushsrc.hg              \
+        query.hg                \
+        registry.hg             \
+        ringbuffer.hg           \
+        segment.hg              \
+        structure.hg            \
+        systemclock.hg          \
+        taglist.hg              \
+        tagsetter.hg            \
+        task.hg                 \
+        taskpool.hg             \
+        tunerchannel.hg         \
+        tuner.hg                \
+        tunernorm.hg            \
+        typefindfactory.hg      \
+        typefind.hg             \
+        urihandler.hg           \
+        value.hg                \
+        videoorientation.hg     \
+        videosink.hg            \
+        xml.hg                  \
+        xoverlay.hg
+
+files_hg += $(plugins_hg)
+
+files_ccg = $(files_hg:.hg=.ccg)
+
+patched_hg =                    \
+        taglist.hg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]