[gstreamermm] Remove GSTREAMERMM_PLUGIN_* defines.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gstreamermm] Remove GSTREAMERMM_PLUGIN_* defines.
- Date: Thu, 14 May 2009 17:27:15 -0400 (EDT)
commit 55e0c96ae7e8c15aad94063e7c50e34140dce025
Author: Murray Cumming <murrayc murrayc com>
Date: Thu May 14 23:18:33 2009 +0200
Remove GSTREAMERMM_PLUGIN_* defines.
* configure.ac: Do not AC_DEFINE_UNQUOTED() GSTREAMERMM_PLUGIN_
preprocessor macros. Plugin presence should be checked at runtime only.
* gstreamer/gstreamermmconfig.h.in: Remove the GSTREAMERMM_PLUGIN_*
undefs because these are no longer used.
* tools/generate_wrap_init.pl.in: Remove code that adds
GSTREAMERMM_PLUGIN_* ifdefs. We want to provide C++ API for all base
gstreamer plugins always, but fail gracefully at runtime when trying to
instantiate or use that API.
---
ChangeLog | 13 ++++++++
configure.ac | 22 +++++++-------
gstreamer/gstreamermm/gst_wrap_init.h | 4 +-
gstreamer/gstreamermmconfig.h.in | 52 ---------------------------------
tools/generate_wrap_init.pl.in | 48 ------------------------------
5 files changed, 26 insertions(+), 113 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 144d4da..63b9b7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-05-14 Murray Cumming <murrayc murrayc-x61>
+
+ Remove GSTREAMERMM_PLUGIN_* defines.
+
+ * configure.ac: Do not AC_DEFINE_UNQUOTED() GSTREAMERMM_PLUGIN_
+ preprocessor macros. Plugin presence should be checked at runtime only.
+ * gstreamer/gstreamermmconfig.h.in: Remove the GSTREAMERMM_PLUGIN_*
+ undefs because these are no longer used.
+ * tools/generate_wrap_init.pl.in: Remove code that adds
+ GSTREAMERMM_PLUGIN_* ifdefs. We want to provide C++ API for all base
+ gstreamer plugins always, but fail gracefully at runtime when trying to
+ instantiate or use that API.
+
2009-05-14 José Alburquerque <jaalburqu svn gnome org>
* configure.ac:
diff --git a/configure.ac b/configure.ac
index 08126bd..ae6c2b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,15 +180,14 @@ AC_ARG_VAR([GST_INSPECT], [Variable to store gst-inspect executable])
AC_SUBST(GST_INSPECT)
# To add a plugin, add the plugin definition, in the form of
-# "plugin=CppClassName" (where "plugin" is the plugin name as recognized by
-# gst-inspect and "CppClassName" is the desired name of the C++ class), to the
-# space separated list of definitions below. Also add the target .hg file name
-# (which must be the same as "CppClassName" all in lowercase with a .hg
-# extension) to the files_all_plugin_hg variable in the
-# gstreamer/src/Makefile_list_of_hg.am_fragment file. Finally, be sure to
-# include an #undef in the form of "#undef GSTREAMERMM_PLUGIN_name" in the
-# gstreamermmconfig.h.in file (where "name" is the plugin name all in caps).
-
+# "plugin=CppClassName" to the space-separated list of definitions below.
+# (@here "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 files_all_plugin_hg variable in the
+# gstreamer/src/Makefile_list_of_hg.am_fragment file.
+# (That must be the same as "CppClassName" - all in lowercase with a .hg
+# extension)
GSTREAMERMM_ALL_PLUGIN_DEFS="capsfilter=CapsFilter fakesrc=FakeSrc \
fakesink=FakeSink fdsink=FdSink fdsrc=FdSrc filesrc=FileSrc filesink=FileSink \
identity=Identity multiqueue=MultiQueue queue=Queue tee=Tee \
@@ -212,14 +211,15 @@ vorbistag=VorbisTag ximagesink=XImageSink xvimagesink=XvImageSink"
# wrapped in glibmm first: DecodeBin2, MultiFdSink, PlayBin, TcpServerSink,
# TheoraParse, UriDecodeBin.
+# TODO: Document this:
for plugin_def in $GSTREAMERMM_ALL_PLUGIN_DEFS; do
plugin_name=[`echo $plugin_def | cut -d'=' -f 1`]
cppname=[`echo $plugin_def | cut -d'=' -f 2`]
GSTREAMERMM_ALL_PLUGIN_CPPNAMES="$GSTREAMERMM_ALL_PLUGIN_CPPNAMES $cppname"
GSTREAMERMM_ALL_PLUGIN_HG=["$GSTREAMERMM_ALL_PLUGIN_HG `echo $cppname | tr [:upper:] [:lower:]`.hg"]
if test -z "`$GST_INSPECT $plugin_name | $HEAD -n 1 | $GREP "No such element"`"; then
- plugin_define=["GSTREAMERMM_PLUGIN_`echo $plugin_name | tr [:lower:] [:upper:]`"]
- AC_DEFINE_UNQUOTED($plugin_define)
+ GSTREAMERMM_EXISTING_PLUGIN_CPPNAMES="$GSTREAMERMM_EXISTING_PLUGIN_CPPNAMES $cppname"
+ GSTREAMERMM_EXISTING_PLUGIN_HG=["$GSTREAMERMM_EXISTING_PLUGIN_HG `echo $cppname | tr [:upper:] [:lower:]`.hg"]
fi
done
AC_SUBST(GSTREAMERMM_ALL_PLUGIN_DEFS)
diff --git a/gstreamer/gstreamermm/gst_wrap_init.h b/gstreamer/gstreamermm/gst_wrap_init.h
index 6924bb5..1f75581 100644
--- a/gstreamer/gstreamermm/gst_wrap_init.h
+++ b/gstreamer/gstreamermm/gst_wrap_init.h
@@ -26,8 +26,8 @@
namespace Gst
{
- /** Initializes wrapping system of Gst::MiniObject derrived classes. There
- * is no need to use this function directly; instead use Gst::init() or
+ /** Initializes the wrapping system of Gst::MiniObject-derived classes. There
+ * is no need to use this function directly. Instead use Gst::init() or
* Gst::init_check().
*/
void gst_wrap_init();
diff --git a/gstreamer/gstreamermmconfig.h.in b/gstreamer/gstreamermmconfig.h.in
index 639e1ac..9a6ef65 100644
--- a/gstreamer/gstreamermmconfig.h.in
+++ b/gstreamer/gstreamermmconfig.h.in
@@ -8,57 +8,5 @@
#undef GSTREAMERMM_MINOR_VERSION
#undef GSTREAMERMM_MICRO_VERSION
-/* core plug-in defines */
-#undef GSTREAMERMM_PLUGIN_CAPSFILTER
-#undef GSTREAMERMM_PLUGIN_FAKESRC
-#undef GSTREAMERMM_PLUGIN_FAKESINK
-#undef GSTREAMERMM_PLUGIN_FDSINK
-#undef GSTREAMERMM_PLUGIN_FDSRC
-#undef GSTREAMERMM_PLUGIN_FILESRC
-#undef GSTREAMERMM_PLUGIN_FILESINK
-#undef GSTREAMERMM_PLUGIN_IDENTITY
-#undef GSTREAMERMM_PLUGIN_MULTIQUEUE
-#undef GSTREAMERMM_PLUGIN_QUEUE
-#undef GSTREAMERMM_PLUGIN_TEE
-#undef GSTREAMERMM_PLUGIN_TYPEFIND
-
-/* base plug-in defines */
-#undef GSTREAMERMM_PLUGIN_ADDER
-#undef GSTREAMERMM_PLUGIN_ALSAMIXER
-#undef GSTREAMERMM_PLUGIN_ALSASINK
-#undef GSTREAMERMM_PLUGIN_ALSASRC
-#undef GSTREAMERMM_PLUGIN_AUDIOCONVERT
-#undef GSTREAMERMM_PLUGIN_AUDIORESAMPLE
-#undef GSTREAMERMM_PLUGIN_AUDIOTESTSRC
-#undef GSTREAMERMM_PLUGIN_CDPARANOIASRC
-#undef GSTREAMERMM_PLUGIN_CLOCKOVERLAY
-#undef GSTREAMERMM_PLUGIN_DECODEBIN
-#undef GSTREAMERMM_PLUGIN_FFMPEGCOLORSPACE
-#undef GSTREAMERMM_PLUGIN_GIOSINK
-#undef GSTREAMERMM_PLUGIN_GIOSRC
-#undef GSTREAMERMM_PLUGIN_GIOSTREAMSINK
-#undef GSTREAMERMM_PLUGIN_GIOSTREAMSRC
-#undef GSTREAMERMM_PLUGIN_OGGDEMUX
-#undef GSTREAMERMM_PLUGIN_OGGMUX
-#undef GSTREAMERMM_PLUGIN_PLAYBIN2
-#undef GSTREAMERMM_PLUGIN_TCPCLIENTSRC
-#undef GSTREAMERMM_PLUGIN_TCPCLIENTSINK
-#undef GSTREAMERMM_PLUGIN_TCPSERVERSRC
-#undef GSTREAMERMM_PLUGIN_TEXTOVERLAY
-#undef GSTREAMERMM_PLUGIN_TEXTRENDER
-#undef GSTREAMERMM_PLUGIN_THEORADEC
-#undef GSTREAMERMM_PLUGIN_THEORAENC
-#undef GSTREAMERMM_PLUGIN_TIMEOVERLAY
-#undef GSTREAMERMM_PLUGIN_VIDEORATE
-#undef GSTREAMERMM_PLUGIN_VIDEOSCALE
-#undef GSTREAMERMM_PLUGIN_VIDEOTESTSRC
-#undef GSTREAMERMM_PLUGIN_VOLUME
-#undef GSTREAMERMM_PLUGIN_VORBISDEC
-#undef GSTREAMERMM_PLUGIN_VORBISENC
-#undef GSTREAMERMM_PLUGIN_VORBISPARSE
-#undef GSTREAMERMM_PLUGIN_VORBISTAG
-#undef GSTREAMERMM_PLUGIN_XIMAGESINK
-#undef GSTREAMERMM_PLUGIN_XVIMAGESINK
-
#endif /* _GSTREAMERMM_CONFIG_H */
diff --git a/tools/generate_wrap_init.pl.in b/tools/generate_wrap_init.pl.in
index fb1e717..730dede 100644
--- a/tools/generate_wrap_init.pl.in
+++ b/tools/generate_wrap_init.pl.in
@@ -204,13 +204,6 @@ foreach $i (sort keys %objects)
{
print "#ifndef G_OS_WIN32\n"
}
-
- # ifdefs are used for gstreamermm plug-ins in case they don't exist:
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifdef " . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
print "GType $basenames{$i}_get_type(void);\n";
@@ -223,11 +216,6 @@ foreach $i (sort keys %objects)
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
-
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- print "#endif //" . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
}
print "\n//Declarations of the *_error_quark() functions:\n\n";
@@ -257,13 +245,6 @@ foreach $i (sort keys %objects)
{
print "#ifndef G_OS_WIN32\n"
}
-
- # ifdefs are used for gstreamermm plug-ins in case they don't exist:
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifdef " . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
my $namespace_declarations = "";
my $namespace_close = "";
@@ -284,11 +265,6 @@ foreach $i (sort keys %objects)
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
-
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- print "#endif //" . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
}
# print "\n//Declarations of the *Error::throw_func() methods:\n\n";
@@ -353,13 +329,6 @@ foreach $i (sort keys %objects)
{
print "#ifndef G_OS_WIN32\n"
}
-
- # ifdefs are used for gstreamermm plug-ins in case they don't exist:
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifdef " . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
@@ -378,11 +347,6 @@ foreach $i (sort keys %objects)
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
-
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- print "#endif //" . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
}
print "\n";
@@ -401,13 +365,6 @@ foreach $i (sort keys %objects)
{
print "#ifndef G_OS_WIN32\n"
}
-
- # ifdefs are used for gstreamermm plug-ins in case they don't exist:
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- # The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
- print "#ifdef " . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
@@ -426,11 +383,6 @@ foreach $i (sort keys %objects)
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
-
- if( $is_gstreamermm_plugin{$i} eq 1 )
- {
- print "#endif //" . uc($parent_dir) . "_PLUGIN_" . uc($i) . "\n";
- }
}
print << "EOF";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]