[gstreamermm/devel-other-plugins: 10/10] build: make wrap plugins more convenient
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm/devel-other-plugins: 10/10] build: make wrap plugins more convenient
- Date: Wed, 29 Jul 2015 10:23:47 +0000 (UTC)
commit 8fb11643c7e44726233a641bc02bc9020b72d0dd
Author: Marcin Kolny <marcin kolny flytronic pl>
Date: Mon Jul 27 14:10:28 2015 +0200
build: make wrap plugins more convenient
* .gitignore: add autogenerated file with plugins to ignore list
* autogen.sh: create plugins file before autoreconf (if doesn't
exist).
* build/gstreamermm.m4: add macro for generating plugins .am file.
* configure.ac: split plugins definitions to "core" and "base". Move
plugins existence verification to .m4 file.
* gst-plugins-bad/gstreamermm-plugins-bad/Makefile.am: add gstreamer's
CFLAGS to plugins-bad's cppflags.
* gstreamer/gstreamermm/Makefile.am: include autogenerated file with
plugins list.
* gstreamer/src/filelist.am: remove plugin_hg variable. This variable
is autogenerated now.
* gstreamer/src/gst_enums.defs: add missing enum's definition.
.gitignore | 3 +
autogen.sh | 1 +
build/gstreamermm.m4 | 48 +++++++++++++
configure.ac | 75 ++++++--------------
.../gstreamermm-plugins-bad/Makefile.am | 2 +-
gstreamer/gstreamermm/Makefile.am | 2 +-
gstreamer/src/Makefile.am | 8 ++-
gstreamer/src/filelist.am | 60 +---------------
gstreamer/src/gst_enums.defs | 12 +++
9 files changed, 95 insertions(+), 116 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c5851e1..6067323 100644
--- a/.gitignore
+++ b/.gitignore
@@ -360,6 +360,9 @@ gstreamer/gstreamermm/ximagesink.h
gstreamer/gstreamermm/xvimagesink.cc
gstreamer/gstreamermm/xvimagesink.h
+# Generated plugin's filelist
+gstreamer/src/plugin_filelist.am
+
# Generated plug-in .hg and .ccg files (not included in commits).
gstreamer/src/adder.ccg
gstreamer/src/adder.hg
diff --git a/autogen.sh b/autogen.sh
index 497c64c..e0e6302 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,5 +3,6 @@ test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
mm-common-prepare --force --copy "$srcdir"
+touch gstreamer/src/plugin_filelist.am
autoreconf --force --install --verbose "$srcdir"
test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
diff --git a/build/gstreamermm.m4 b/build/gstreamermm.m4
index 601518d..3d8035a 100644
--- a/build/gstreamermm.m4
+++ b/build/gstreamermm.m4
@@ -53,3 +53,51 @@ AC_DEFUN([ADD_MODULE_CONDITIONALLY],
])
])
+## Arguments:
+## * $1 - output file
+## * $2 - plugins list
+## Generates list of plug-ins. If USE_MAINTAINER_MODE defined, macro also
+## checks for the existence of the plug-ins. Note that this check doesn't
+## work when cross-compiling. That isn't much of a problem though since
+## it only applies in maintainer-mode.
+AC_DEFUN([GENERATE_PLUGINS_LIST_FILE],
+[
+ # clear plugins file once per file
+ m4_ifndef([$1], [
+ printf "plugins_hg = \n" > $1
+ m4_define([$1], [yes])
+ ])
+
+ printf "plugins_hg += " >> $1
+
+ AS_IF([test "x$USE_MAINTAINER_MODE" != xno],
+ [
+ gstmm_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-1.0 2>&AS_MESSAGE_LOG_FD`
+ AC_PATH_PROGS([GST_INSPECT], [gst-inspect-1.0],,
+ [$gstmm_toolsdir$PATH_SEPARATOR$PATH])
+
+ AC_MSG_CHECKING([the existance of required plug-ins.])
+ ])
+ for gstmm_plugin_def in $2
+ do
+ gstmm_hg_name=`[expr "X$gstmm_plugin_def" : 'X\(.*\)|.*|.*$' 2>&]AS_MESSAGE_LOG_FD`
+ printf "$gstmm_hg_name.hg " >> $1
+ AS_IF([test "x$USE_MAINTAINER_MODE" != xno],
+ [
+ # Extract plugin name and run gst-inspect to check whether the plugin
+ # is installed on the build system.
+ gstmm_plugin_name=`[expr "X$gstmm_plugin_def" : 'X.*|\(.*\)|.*$' 2>&]AS_MESSAGE_LOG_FD`
+ AS_IF([$GST_INSPECT "$gstmm_plugin_name" >/dev/null 2>&AS_MESSAGE_LOG_FD],,
+ [AC_MSG_FAILURE([[The gstreamer plug-in '$gstmm_plugin_name' does not exist.
+If you built gst-plugins-base from source code then you might need to
+install the appropriate -dev or -devel packages or enable experimental
+plugins before rebuilding gst-plugins-base.]])])
+ ])
+ done
+ AS_IF([test "x$USE_MAINTAINER_MODE" != xno],
+ [
+ AC_MSG_RESULT([All required plug-ins found.])
+ ])
+ printf "\n" >> $1
+])
+
diff --git a/configure.ac b/configure.ac
index 639d363..7ef603a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,15 +109,27 @@ MM_ARG_WITH_TAGFILE_DOC([pangomm-1.4.tag], [pangomm-1.4])
# 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).
+AC_SUBST([GSTREAMERMM_CORE_PLUGIN_DEFS], ["\
+capsfilter|capsfilter|CapsFilter \
+fakesink|fakesink|FakeSink \
+fakesrc|fakesrc|FakeSrc \
+fdsink|fdsink|FdSink \
+fdsrc|fdsrc|FdSrc \
+filesink|filesink|FileSink \
+filesrc|filesrc|FileSrc \
+funnel|funnel|Funnel \
+identity|identity|Identity \
+inputselector|input-selector|InputSelector \
+multiqueue|multiqueue|MultiQueue \
+outputselector|output-selector|OutputSelector \
+queue|queue|Queue \
+queue2|queue2|Queue2 \
+tee|tee|Tee \
+typefindelement|typefind|TypeFindElement \
+valve|valve|Valve
+"])
-
-# todo
-# audioresample|audioresample|AudioResample
-# multisocketsink|multisocketsink|MultiSocketSink
-# videoconvert|videoconvert|VideoConvert
-
-
-AC_SUBST([GSTREAMERMM_PLUGIN_DEFS], ["\
+AC_SUBST([GSTREAMERMM_BASE_PLUGIN_DEFS], ["\
adder|adder|Adder \
alsasink|alsasink|AlsaSink \
alsasrc|alsasrc|AlsaSrc \
@@ -126,46 +138,24 @@ appsrc|appsrc|AppSrc \
audioconvert|audioconvert|AudioConvert \
audiorate|audiorate|AudioRate \
audiotestsrc|audiotestsrc|AudioTestSrc \
-capsfilter|capsfilter|CapsFilter \
cdparanoiasrc|cdparanoiasrc|CdParanoiaSrc \
clockoverlay|clockoverlay|ClockOverlay \
decodebin|decodebin|DecodeBin \
-fakesink|fakesink|FakeSink \
-fakesrc|fakesrc|FakeSrc \
-fdsink|fdsink|FdSink \
-fdsrc|fdsrc|FdSrc \
-filesink|filesink|FileSink \
-filesrc|filesrc|FileSrc \
-funnel|funnel|Funnel \
giosink|giosink|GioSink \
giosrc|giosrc|GioSrc \
giostreamsink|giostreamsink|GioStreamSink \
giostreamsrc|giostreamsrc|GioStreamSrc \
-identity|identity|Identity \
-inputselector|input-selector|InputSelector \
-multifdsink|multifdsink|MultiFdSink \
-multiqueue|multiqueue|MultiQueue \
oggdemux|oggdemux|OggDemux \
oggmux|oggmux|OggMux \
-outputselector|output-selector|OutputSelector \
playbin|playbin|PlayBin \
-queue|queue|Queue \
-queue2|queue2|Queue2 \
subtitleoverlay|subtitleoverlay|SubtitleOverlay \
-tcpclientsink|tcpclientsink|TCPClientSink \
-tcpclientsrc|tcpclientsrc|TCPClientSrc \
-tcpserversink|tcpserversink|TcpServerSink \
-tcpserversrc|tcpserversrc|TCPServerSrc \
-tee|tee|Tee \
textoverlay|textoverlay|TextOverlay \
textrender|textrender|TextRender \
theoradec|theoradec|TheoraDec \
theoraenc|theoraenc|TheoraEnc \
theoraparse|theoraparse|TheoraParse \
timeoverlay|timeoverlay|TimeOverlay \
-typefindelement|typefind|TypeFindElement \
uridecodebin|uridecodebin|UriDecodeBin \
-valve|valve|Valve \
videorate|videorate|VideoRate \
videoscale|videoscale|VideoScale \
videotestsrc|videotestsrc|VideoTestSrc \
@@ -178,29 +168,8 @@ ximagesink|ximagesink|XImageSink \
xvimagesink|xvimagesink|XvImageSink
"])
-# Check for the existence of the plug-ins. Note that this check doesn't
-# work when cross-compiling. That isn't much of a problem though since
-# it only applies in maintainer-mode.
-AS_IF([test "x$USE_MAINTAINER_MODE" != xno],
-[
- gstmm_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-1.0 2>&AS_MESSAGE_LOG_FD`
- AC_PATH_PROGS([GST_INSPECT], [gst-inspect-1.0],,
- [$gstmm_toolsdir$PATH_SEPARATOR$PATH])
-
- AC_MSG_CHECKING([the existance of required plug-ins.])
- for gstmm_plugin_def in $GSTREAMERMM_PLUGIN_DEFS
- do
- # Extract plugin name and run gst-inspect to check whether the plugin
- # is installed on the build system.
- gstmm_plugin_name=`[expr "X$gstmm_plugin_def" : 'X.*|\(.*\)|.*$' 2>&]AS_MESSAGE_LOG_FD`
- AS_IF([$GST_INSPECT "$gstmm_plugin_name" >/dev/null 2>&AS_MESSAGE_LOG_FD],,
- [AC_MSG_FAILURE([[The gstreamer plug-in '$gstmm_plugin_name' does not exist.
-If you built gst-plugins-base from source code then you might need to
-install the appropriate -dev or -devel packages or enable experimental
-plugins before rebuilding gst-plugins-base.]])])
- done
- AC_MSG_RESULT([All required plug-ins found.])
-])
+GENERATE_PLUGINS_LIST_FILE([gstreamer/src/plugin_filelist.am], $GSTREAMERMM_CORE_PLUGIN_DEFS)
+GENERATE_PLUGINS_LIST_FILE([gstreamer/src/plugin_filelist.am], $GSTREAMERMM_BASE_PLUGIN_DEFS)
#########################################################################
diff --git a/gst-plugins-bad/gstreamermm-plugins-bad/Makefile.am
b/gst-plugins-bad/gstreamermm-plugins-bad/Makefile.am
index 5e6552d..eb46188 100644
--- a/gst-plugins-bad/gstreamermm-plugins-bad/Makefile.am
+++ b/gst-plugins-bad/gstreamermm-plugins-bad/Makefile.am
@@ -23,7 +23,7 @@ include $(top_srcdir)/build/compile-binding.am
local_includes = -I$(top_builddir)/gstreamer $(if $(srcdir:.=),-I$(top_srcdir)/gstreamer)
local_cppflags = $(binding_includes) $(local_includes) $(binding_cppflags) -DGSTREAMERMM_PLUGINS_BAD_BUILD=1
-AM_CPPFLAGS = $(local_cppflags) $(GSTREAMERMM_PLUGINS_BAD_CFLAGS)
+AM_CPPFLAGS = $(local_cppflags) $(GSTREAMERMM_PLUGINS_BAD_CFLAGS) $(GSTREAMERMM_CFLAGS)
AM_CXXFLAGS = $(GSTREAMERMM_WXXFLAGS)
local_libadd = $(top_builddir)/gstreamer/gstreamermm/libgstreamermm-$(GSTREAMERMM_API_VERSION).la
diff --git a/gstreamer/gstreamermm/Makefile.am b/gstreamer/gstreamermm/Makefile.am
index fc11c86..38f75e5 100644
--- a/gstreamer/gstreamermm/Makefile.am
+++ b/gstreamer/gstreamermm/Makefile.am
@@ -14,7 +14,7 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
lib_LTLIBRARIES = libgstreamermm- GSTREAMERMM_API_VERSION@.la
-
+include $(srcdir)/../src/plugin_filelist.am
include $(srcdir)/../src/filelist.am
include $(srcdir)/filelist.am
include $(top_srcdir)/build/compile-binding.am
diff --git a/gstreamer/src/Makefile.am b/gstreamer/src/Makefile.am
index eaff37b..4b11668 100644
--- a/gstreamer/src/Makefile.am
+++ b/gstreamer/src/Makefile.am
@@ -17,6 +17,9 @@ binding_name = gstreamermm
wrap_init_flags = --namespace=Gst --parent_dir=gstreamermm
codegen_srcdir = $(top_srcdir)/tools
+include $(srcdir)/plugin_filelist.am
+plugins_ccg = $(plugins_hg:.hg=.ccg)
+
include $(srcdir)/filelist.am
include $(top_srcdir)/tools/m4/filelist.am
include $(top_srcdir)/build/generate-binding.am
@@ -34,8 +37,9 @@ generate_plugin_dependencies = \
$(addprefix $(codegen_m4_srcdir)/,$(files_plugin_m4))
target_hg_basename = $(basename $(notdir $@))
-target_plugin_and_classname = $(wordlist 2,3,$(subst |, ,$(filter
$(target_hg_basename)|%,$(GSTREAMERMM_PLUGIN_DEFS))))
-
+plugin_list = $(GSTREAMERMM_CORE_PLUGIN_DEFS) $(GSTREAMERMM_BASE_PLUGIN_DEFS)
+target_plugin_and_classname = $(wordlist 2,3,$(subst |, ,$(filter $(target_hg_basename)|%,$(plugin_list))))
+
# 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.
diff --git a/gstreamer/src/filelist.am b/gstreamer/src/filelist.am
index 7706607..06b6a37 100644
--- a/gstreamer/src/filelist.am
+++ b/gstreamer/src/filelist.am
@@ -24,64 +24,6 @@ files_defs = \
# TODO: enable audioresample.hg
-plugins_hg = \
- adder.hg \
- alsasink.hg \
- alsasrc.hg \
- appsink.hg \
- appsrc.hg \
- audioconvert.hg \
- audiorate.hg \
- audiotestsrc.hg \
- capsfilter.hg \
- cdparanoiasrc.hg \
- clockoverlay.hg \
- decodebin.hg \
- fakesink.hg \
- fakesrc.hg \
- fdsink.hg \
- fdsrc.hg \
- filesink.hg \
- filesrc.hg \
- funnel.hg \
- giosink.hg \
- giosrc.hg \
- giostreamsink.hg \
- giostreamsrc.hg \
- identity.hg \
- inputselector.hg \
- multiqueue.hg \
- oggdemux.hg \
- oggmux.hg \
- outputselector.hg \
- playbin.hg \
- queue.hg \
- queue2.hg \
- subtitleoverlay.hg \
- tcpclientsink.hg \
- tcpclientsrc.hg \
- tcpserversrc.hg \
- tee.hg \
- textoverlay.hg \
- textrender.hg \
- theoradec.hg \
- theoraenc.hg \
- theoraparse.hg \
- timeoverlay.hg \
- typefindelement.hg \
- uridecodebin.hg \
- valve.hg \
- videorate.hg \
- videoscale.hg \
- videotestsrc.hg \
- vorbisdec.hg \
- vorbisenc.hg \
- vorbisparse.hg \
- vorbistag.hg \
- ximagesink.hg
-
-plugins_ccg = $(plugins_hg:.hg=.ccg)
-
files_hg = \
allocator.hg \
audiobasesink.hg \
@@ -156,6 +98,6 @@ files_hg = \
videoorientation.hg \
videosink.hg \
videooverlay.hg \
- $(plugins_hg)
+ $(plugins_hg)
files_ccg = $(files_hg:.hg=.ccg)
diff --git a/gstreamer/src/gst_enums.defs b/gstreamer/src/gst_enums.defs
index 5725103..2db51cd 100644
--- a/gstreamer/src/gst_enums.defs
+++ b/gstreamer/src/gst_enums.defs
@@ -6673,3 +6673,15 @@
'("active" "GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_ACTIVE" "2")
)
)
+
+;; Handwritten for MultiFdSink plugin (values taken from output of
+;; `gst-inspect output-selector' -- "pad-negotiation-mode" property information)
+(define-enum-extended OutputSelectorPadNegotiationMode
+ (in-module "Gst")
+ (c-name "GstOutputSelectorPadNegotiationMode")
+ (values
+ '("none" "GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_NONE" "0")
+ '("all" "GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_ALL" "1")
+ '("active" "GST_OUTPUT_SELECTOR_PAD_NEGOTIATION_MODE_ACTIVE" "2")
+ )
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]