[gstreamermm] Begin the transition to GStreamer-1.1.1.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Begin the transition to GStreamer-1.1.1.
- Date: Fri, 19 Jul 2013 18:33:05 +0000 (UTC)
commit 488e6fc14bdaa4f85fea9cd480b7b898fc05a9b1
Author: José Alburquerque <jaalburquerque gmail com>
Date: Mon Jun 17 20:38:32 2013 -0400
Begin the transition to GStreamer-1.1.1.
* configure.ac (AC_INIT): Change the gstreamermm version (for a future
release) to 0.11.0.
(MM_PREREQ): Require mm-common 0.9.6.
(MM_INIT_MODULE): Use 1.0 for the module version.
(GSTREAMERMM_SO_VERSION): Reset to 0.0.0.
(GSTREAMERMM_MODULES): Require glibmm-2.36. Add all the GStreamer
modules and require version 1.1.1 of those modules.
(GSTREAMERMM_PLUGIN_DEFS): Add the app[sink|src] plug-ins. Remove the
decodebin2 and playbin2 plug-ins (which are removed in GStreamer-1.0
also). Rename the ffmpegcolorspace plug-in to videoconvert because
it's been renamed. Remove plug-ins that are not found but leave TODOs
to possibly re-add the gdpdepay and gdppay plug-ins which the
GStreamer porting docs seems to suggest still exist.
(GST_INSPECT): Require version 1.0.
(Plugin Processing): Add AC_MSG_CHECKING() and AC_MSG_RESULT() macros
to report that required plug-ins are being checked for and found when
the process is successful.
* gstreamer/src/filelist.am: Add the app[sink|src] plug-ins.
* tools/extra_defs_gen/generate_defs_gst.cc: Simplify the includes
because since version 1.1.1 GStreamer has moved to single includes --
see https://bugzilla.gnome.org/show_bug.cgi?id=701812.
(gst_type_is_a_pointer): Don't test for the GST_TYPE_MINI_OBJECT
because it is now just a boxed type according to the GStreamer porting
guide.
Remove the GTypes that don't exist and rename ones that have been
changed (like the GST_TYPE_BASE_AUDIO_* types, the GST_TYPE_BASE_RTP_*
types, the GST_TYPE_RING_BUFFER type and GST_TYPE_X_OVERLAY type)
since GStreamer-1.0.
Also change the plug-ins as in the configure.ac file.
* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
(gst_type_is_a_pointer): Don't test for the GST_TYPE_MINI_OBJECT
because miniobjects are now boxed types.
(is_a_mini_object): Add this function that tests if a given C type
is a miniobject.
(get_signal_wrap_statements): When dealing with a boxed type return,
check to see if it is a miniobject (using the above function) so that
a correct Gst::wrap() function is generated. Do the same for boxed
type parameters. Also, don't check for miniobjects using
GST_TYPE_MINI_OBJECT when dealing with a Glib::RefPtr<> type any more
because miniobjects are checked for when dealing with boexed types.
* tools/m4/plugingen_gstreamermm.m4: Add translations which the
plug-ins now require and modify the GstXOverlay because GstXOverlay
has been renamed to GstVideoOverlay.
ChangeLog | 51 ++++++++++++
configure.ac | 41 ++++-----
gstreamer/src/filelist.am | 5 +-
tools/extra_defs_gen/generate_defs_gst.cc | 85 ++++----------------
.../extra_defs_gen/generate_plugin_gmmproc_file.cc | 62 ++++++++++++---
tools/m4/plugingen_gstreamermm.m4 | 6 +-
6 files changed, 142 insertions(+), 108 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8c4294f..3a2aa33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2013-06-18 José Alburquerque <jaalburquerque gmail com>
+
+ Begin the transition to GStreamer-1.1.1.
+
+ * configure.ac (AC_INIT): Change the gstreamermm version (for a future
+ release) to 0.11.0.
+ (MM_PREREQ): Require mm-common 0.9.6.
+ (MM_INIT_MODULE): Use 1.0 for the module version.
+ (GSTREAMERMM_SO_VERSION): Reset to 0.0.0.
+ (GSTREAMERMM_MODULES): Require glibmm-2.36. Add all the GStreamer
+ modules and require version 1.1.1 of those modules.
+ (GSTREAMERMM_PLUGIN_DEFS): Add the app[sink|src] plug-ins. Remove the
+ decodebin2 and playbin2 plug-ins (which are removed in GStreamer-1.0
+ also). Rename the ffmpegcolorspace plug-in to videoconvert because
+ it's been renamed. Remove plug-ins that are not found but leave TODOs
+ to possibly re-add the gdpdepay and gdppay plug-ins which the
+ GStreamer porting docs seems to suggest still exist.
+ (GST_INSPECT): Require version 1.0.
+ (Plugin Processing): Add AC_MSG_CHECKING() and AC_MSG_RESULT() macros
+ to report that required plug-ins are being checked for and found when
+ the process is successful.
+
+ * gstreamer/src/filelist.am: Add the app[sink|src] plug-ins.
+
+ * tools/extra_defs_gen/generate_defs_gst.cc: Simplify the includes
+ because since version 1.1.1 GStreamer has moved to single includes --
+ see https://bugzilla.gnome.org/show_bug.cgi?id=701812.
+ (gst_type_is_a_pointer): Don't test for the GST_TYPE_MINI_OBJECT
+ because it is now just a boxed type according to the GStreamer porting
+ guide.
+ Remove the GTypes that don't exist and rename ones that have been
+ changed (like the GST_TYPE_BASE_AUDIO_* types, the GST_TYPE_BASE_RTP_*
+ types, the GST_TYPE_RING_BUFFER type and GST_TYPE_X_OVERLAY type)
+ since GStreamer-1.0.
+ Also change the plug-ins as in the configure.ac file.
+
+ * tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+ (gst_type_is_a_pointer): Don't test for the GST_TYPE_MINI_OBJECT
+ because miniobjects are now boxed types.
+ (is_a_mini_object): Add this function that tests if a given C type
+ is a miniobject.
+ (get_signal_wrap_statements): When dealing with a boxed type return,
+ check to see if it is a miniobject (using the above function) so that
+ a correct Gst::wrap() function is generated. Do the same for boxed
+ type parameters. Also, don't check for miniobjects using
+ GST_TYPE_MINI_OBJECT when dealing with a Glib::RefPtr<> type any more
+ because miniobjects are checked for when dealing with boexed types.
+ * tools/m4/plugingen_gstreamermm.m4: Add translations which the
+ plug-ins now require and modify the GstXOverlay because GstXOverlay
+ has been renamed to GstVideoOverlay.
+
2013-06-10 José Alburquerque <jaalburquerque gmail com>
Move the generation scripts to the tools/gen_scripts directory.
diff --git a/configure.ac b/configure.ac
index c8299d5..9b47cac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
## 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/>.
-AC_INIT([gstreamermm], [0.10.11],
+AC_INIT([gstreamermm], [0.11.0],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gstreamermm],
[gstreamermm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
@@ -23,8 +23,8 @@ AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build])
AC_CONFIG_HEADERS([config.h gstreamer/gstreamermmconfig.h])
-MM_PREREQ([0.9.5])
-MM_INIT_MODULE([gstreamermm-0.10])
+MM_PREREQ([0.9.6])
+MM_INIT_MODULE([gstreamermm-1.0])
# Copy the mm-common .pl scripts into docs/,
# and use them from there,
@@ -32,7 +32,7 @@ MM_INIT_MODULE([gstreamermm-0.10])
MM_CONFIG_DOCTOOL_DIR([docs])
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
-AC_SUBST([GSTREAMERMM_SO_VERSION], [2:1:0])
+AC_SUBST([GSTREAMERMM_SO_VERSION], [0:0:0])
AM_INIT_AUTOMAKE([1.9 -Wno-portability check-news dist-bzip2 no-define nostdinc tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
@@ -57,11 +57,11 @@ AS_IF([test "x$enable_static" = xyes],
# The format below is used so that the requirements appear nicely in the .pc
# file.
AC_SUBST([GSTREAMERMM_MODULES],
- ['giomm-2.4 >= 2.28.0 libxml++-2.6 >= 2.14[]m4_foreach([gstmm_mod],
- [[], [-base], [-controller], [-dataprotocol], [-net], [-plugins-base],
- [-audio], [-cdda], [-interfaces], [-netbuffer], [-rtp], [-video],
- [-pbutils]],
- [ gstreamer[]m4_defn([gstmm_mod])[]-0.10 >= 0.10.36])'])
+ ['giomm-2.4 >= 2.36.0 libxml++-2.6 >= 2.14[]m4_foreach([gstmm_mod],
+ [[], [-allocators], [-app], [-audio], [-base], [-check],
+ [-controller], [-fft], [-net], [-pbutils], [-plugins-base],
+ [-riff], [-rtp], [-sdp], [-tag], [-video]],
+ [ gstreamer[]m4_defn([gstmm_mod])[]-1.0 >= 1.1.1])'])
PKG_CHECK_MODULES([GSTREAMERMM], [$GSTREAMERMM_MODULES])
PKG_CHECK_MODULES([GUI_EXAMPLES], [$GSTREAMERMM_MODULES gtkmm-3.0 >= 3.0],
@@ -92,16 +92,16 @@ 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).
-#
-# 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.
+
+#TODO (Add below? Plug-in is missing in 1.1.1): gdpdepay|gdpdepay|GDPDepay \
+#TODO (Add below? Plug-in is missing in 1.1.1): gdppay|gdppay|GDPPay \
AC_SUBST([GSTREAMERMM_PLUGIN_DEFS], ["\
adder|adder|Adder \
-alsamixer|alsamixer|AlsaMixer \
alsasink|alsasink|AlsaSink \
alsasrc|alsasrc|AlsaSrc \
+appsink|appsink|AppSink \
+appsrc|appsrc|AppSrc \
audioconvert|audioconvert|AudioConvert \
audiorate|audiorate|AudioRate \
audioresample|audioresample|AudioResample \
@@ -110,30 +110,23 @@ capsfilter|capsfilter|CapsFilter \
cdparanoiasrc|cdparanoiasrc|CdParanoiaSrc \
clockoverlay|clockoverlay|ClockOverlay \
decodebin|decodebin|DecodeBin \
-decodebin2|decodebin2|DecodeBin2 \
fakesink|fakesink|FakeSink \
fakesrc|fakesrc|FakeSrc \
fdsink|fdsink|FdSink \
fdsrc|fdsrc|FdSrc \
-ffmpegcolorspace|ffmpegcolorspace|FfmpegColorSpace \
filesink|filesink|FileSink \
filesrc|filesrc|FileSrc \
funnel|funnel|Funnel \
-gdpdepay|gdpdepay|GDPDepay \
-gdppay|gdppay|GDPPay \
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 \
-playbin2|playbin2|PlayBin2 \
queue|queue|Queue \
queue2|queue2|Queue2 \
subtitleoverlay|subtitleoverlay|SubtitleOverlay \
@@ -148,9 +141,9 @@ theoradec|theoradec|TheoraDec \
theoraenc|theoraenc|TheoraEnc \
theoraparse|theoraparse|TheoraParse \
timeoverlay|timeoverlay|TimeOverlay \
-typefindelement|typefind|TypeFindElement \
uridecodebin|uridecodebin|UriDecodeBin \
valve|valve|Valve \
+videoconvert|videoconvert|VideoConvert \
videorate|videorate|VideoRate \
videoscale|videoscale|VideoScale \
videotestsrc|videotestsrc|VideoTestSrc \
@@ -169,9 +162,10 @@ xvimagesink|xvimagesink|XvImageSink
AS_IF([test "x$USE_MAINTAINER_MODE" != xno],
[
gstmm_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-0.10 2>&AS_MESSAGE_LOG_FD`
- AC_PATH_PROGS([GST_INSPECT], [gst-inspect-0.10 gst-inspect],,
+ 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
@@ -183,6 +177,7 @@ 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.])
])
#########################################################################
diff --git a/gstreamer/src/filelist.am b/gstreamer/src/filelist.am
index df598bf..4b918dd 100644
--- a/gstreamer/src/filelist.am
+++ b/gstreamer/src/filelist.am
@@ -22,14 +22,13 @@ files_defs = \
# the same as "CppClassName" - all in lowercase with a .hg extension). Make
# sure that the order of both lists correspond.
-# TODO: Add appsink and appsrc plug-ins to list below if they indeed are
-# plug-ins (see gst-plugins-base docs for details) and when they don't cause
-# gstreamermm initialization errors.
plugins_hg = \
adder.hg \
alsamixer.hg \
alsasink.hg \
alsasrc.hg \
+ appsink.hg \
+ appsrc.hg \
audioconvert.hg \
audiorate.hg \
audioresample.hg \
diff --git a/tools/extra_defs_gen/generate_defs_gst.cc b/tools/extra_defs_gen/generate_defs_gst.cc
index 75e48da..d561ab4 100644
--- a/tools/extra_defs_gen/generate_defs_gst.cc
+++ b/tools/extra_defs_gen/generate_defs_gst.cc
@@ -24,52 +24,20 @@
#include <gst/gst.h>
// Core library includes
-#include <gst/base/gstbasesrc.h>
-#include <gst/base/gstbasesink.h>
-#include <gst/base/gstbasetransform.h>
-#include <gst/base/gstpushsrc.h>
-#include <gst/base/gstadapter.h>
-#include <gst/base/gstcollectpads.h>
-#include <gst/base/gstdataqueue.h>
-#include <gst/controller/gstcontroller.h>
-#include <gst/controller/gstcontrolsource.h>
-#include <gst/controller/gstinterpolationcontrolsource.h>
-#include <gst/controller/gstlfocontrolsource.h>
-#include <gst/net/gstnet.h>
+#include <gst/base/base.h>
+#include <gst/controller/controller.h>
+#include <gst/net/net.h>
// Base library includes
-#include <gst/audio/gstaudioclock.h>
-#include <gst/audio/gstaudiofilter.h>
-#include <gst/audio/gstbaseaudiosink.h>
-#include <gst/audio/gstbaseaudiosrc.h>
-#include <gst/audio/gstaudiosink.h>
-#include <gst/audio/gstaudiosrc.h>
-#include <gst/audio/gstringbuffer.h>
-#include <gst/cdda/gstcddabasesrc.h>
-#include <gst/netbuffer/gstnetbuffer.h>
+#include <gst/audio/audio.h>
#include <gst/pbutils/pbutils.h>
-#include <gst/rtp/gstbasertpaudiopayload.h>
-#include <gst/rtp/gstbasertpdepayload.h>
-#include <gst/rtp/gstbasertppayload.h>
-#include <gst/tag/gsttagdemux.h>
-#include <gst/video/gstvideosink.h>
-#include <gst/video/gstvideofilter.h>
-
-// Base interface includes
-#include <gst/interfaces/colorbalance.h>
-#include <gst/interfaces/colorbalancechannel.h>
-#include <gst/interfaces/mixer.h>
-#include <gst/interfaces/navigation.h>
-#include <gst/interfaces/propertyprobe.h>
-#include <gst/interfaces/streamvolume.h>
-#include <gst/interfaces/tuner.h>
-#include <gst/interfaces/videoorientation.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/rtp/rtp.h>
+#include <gst/tag/tag.h>
+#include <gst/video/video.h>
bool gst_type_is_a_pointer(GType gtype)
{
- return (gtype_is_a_pointer(gtype) || g_type_is_a(gtype,
-GST_TYPE_MINI_OBJECT));
+ return (gtype_is_a_pointer(gtype));
}
int main (int argc, char *argv[])
@@ -87,13 +55,8 @@ int main (int argc, char *argv[])
<< get_defs(GST_TYPE_ELEMENT_FACTORY, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_EVENT, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_FORMAT, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_G_ERROR, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_GHOST_PAD, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_IMPLEMENTS_INTERFACE, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_INDEX, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_INDEX_FACTORY, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_MESSAGE, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_MINI_OBJECT, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_OBJECT, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_PAD, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_PAD_TEMPLATE, gst_type_is_a_pointer)
@@ -111,7 +74,6 @@ int main (int argc, char *argv[])
<< get_defs(GST_TYPE_TYPE_FIND, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_TYPE_FIND_FACTORY, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_URI_HANDLER, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_XML, gst_type_is_a_pointer)
// GStreamer core library types:
<< get_defs(GST_TYPE_BASE_SRC, gst_type_is_a_pointer)
@@ -121,7 +83,6 @@ int main (int argc, char *argv[])
<< get_defs(GST_TYPE_ADAPTER, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_COLLECT_PADS, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_DATA_QUEUE, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_CONTROLLER, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_CONTROL_SOURCE, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_INTERPOLATION_CONTROL_SOURCE, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_LFO_CONTROL_SOURCE, gst_type_is_a_pointer)
@@ -149,19 +110,18 @@ int main (int argc, char *argv[])
<< get_plugin_defs("valve", gst_type_is_a_pointer)
// gst-plugins-base (GStreamer base) types:
+ << get_defs(GST_TYPE_AUDIO_BASE_SINK, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_AUDIO_BASE_SRC, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_AUDIO_CD_SRC, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_AUDIO_CLOCK, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_AUDIO_FILTER, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_AUDIO_RING_BUFFER, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_AUDIO_SINK, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_AUDIO_SRC, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_BASE_AUDIO_SINK, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_BASE_AUDIO_SRC, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_BASE_RTP_AUDIO_PAYLOAD, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_BASE_RTP_DEPAYLOAD, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_BASE_RTP_PAYLOAD, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_CDDA_BASE_SRC, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_DISCOVERER, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_NETBUFFER, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_RING_BUFFER, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_RTP_BASE_AUDIO_PAYLOAD, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_RTP_BASE_DEPAYLOAD, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_RTP_BASE_PAYLOAD, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_TAG_DEMUX, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_VIDEO_FILTER, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_VIDEO_SINK, gst_type_is_a_pointer)
@@ -169,21 +129,13 @@ int main (int argc, char *argv[])
// gst-plugins-base (GStreamer base) interfaces:
<< get_defs(GST_TYPE_COLOR_BALANCE, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_COLOR_BALANCE_CHANNEL, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_MIXER, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_MIXER_TRACK, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_MIXER_OPTIONS, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_NAVIGATION, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_PROPERTY_PROBE, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_STREAM_VOLUME, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_TUNER, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_TUNER_CHANNEL, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_TUNER_NORM, gst_type_is_a_pointer)
<< get_defs(GST_TYPE_VIDEO_ORIENTATION, gst_type_is_a_pointer)
- << get_defs(GST_TYPE_X_OVERLAY, gst_type_is_a_pointer)
+ << get_defs(GST_TYPE_VIDEO_OVERLAY, gst_type_is_a_pointer)
// gst-plugins-base (GStreamer base) plugin types:
<< get_plugin_defs("adder", gst_type_is_a_pointer)
- << get_plugin_defs("alsamixer", gst_type_is_a_pointer)
<< get_plugin_defs("alsasink", gst_type_is_a_pointer)
<< get_plugin_defs("alsasrc", gst_type_is_a_pointer)
<< get_plugin_defs("appsrc", gst_type_is_a_pointer)
@@ -195,10 +147,6 @@ int main (int argc, char *argv[])
<< get_plugin_defs("cdparanoiasrc", gst_type_is_a_pointer)
<< get_plugin_defs("clockoverlay", gst_type_is_a_pointer)
<< get_plugin_defs("decodebin", gst_type_is_a_pointer)
- << get_plugin_defs("decodebin2", gst_type_is_a_pointer)
- << get_plugin_defs("ffmpegcolorspace", gst_type_is_a_pointer)
- << get_plugin_defs("gdpdepay", gst_type_is_a_pointer)
- << get_plugin_defs("gdppay", gst_type_is_a_pointer)
<< get_plugin_defs("giosink", gst_type_is_a_pointer)
<< get_plugin_defs("giosrc", gst_type_is_a_pointer)
<< get_plugin_defs("giostreamsink", gst_type_is_a_pointer)
@@ -209,7 +157,6 @@ int main (int argc, char *argv[])
<< get_plugin_defs("oggdemux", gst_type_is_a_pointer)
<< get_plugin_defs("oggmux", gst_type_is_a_pointer)
<< get_plugin_defs("playbin", gst_type_is_a_pointer)
- << get_plugin_defs("playbin2", gst_type_is_a_pointer)
<< get_plugin_defs("subtitleoverlay", gst_type_is_a_pointer)
<< get_plugin_defs("tcpclientsrc", gst_type_is_a_pointer)
<< get_plugin_defs("tcpclientsink", gst_type_is_a_pointer)
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index b89d1f9..7eb06ca 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -16,8 +16,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gst/gst.h>
#include <glibmm.h>
+#include <gst/gst.h>
#include <algorithm>
#include <iostream>
@@ -62,8 +62,7 @@ static const char *const wrappedBaseClasses[] =
static bool gst_type_is_a_pointer(GType gtype)
{
return (g_type_is_a(gtype, G_TYPE_OBJECT) ||
- g_type_is_a(gtype, G_TYPE_BOXED) ||
- g_type_is_a(gtype, GST_TYPE_MINI_OBJECT));
+ g_type_is_a(gtype, G_TYPE_BOXED));
}
static std::string to_lowercase(const std::string& str)
@@ -255,6 +254,36 @@ static std::string get_c_enum_definition_macro(GType enumGType,
return result;
}
+static bool is_a_mini_object(const std::string& cType)
+{
+ // Add the mini object types to this array. Keep a final null member so the
+ // loop that tests for the types knows when to stop iterating through the
+ // types.
+ static const char *const mini_object_types[] =
+ {
+ "GstBuffer",
+ "GstBufferList",
+ "GstEvent",
+ "GstMessage",
+ "GstMiniObject",
+ "GstQuery",
+ 0
+ };
+
+ // Note that if the C type is a mini object, it would be a pointer so remove
+ // the last character (the '*') so the comparison with the above types works.
+ const std::string cTypeName = cType.substr(0, cType.size() - 1);
+
+ for(const char* const* type = mini_object_types; *type != 0; type++)
+ {
+ if(cTypeName == *type)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
std::string& cEnumDefinitions,
std::string& enumWrapStatements,
@@ -395,6 +424,13 @@ static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
convertMacros += "#m4 _CONVERSION(``" + returnCType + "'', _LQ()" +
returnCTypeTranslation + "_RQ(), ``Glib::wrap_taglist($3)'')\n";
}
+ else if(is_a_mini_object(returnCType))
+ {
+ // Dealing with a mini object (which are boxed types).
+ convertMacros += "#m4 _CONVERSION(``" + returnCType +
+ "'', _LQ()" + returnCTypeTranslation + "_RQ(), " +
+ "``Gst::wrap($3)'')\n";
+ }
else
{
// Dealing with a regular boxed type return.
@@ -409,9 +445,8 @@ static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
// needed in the global convert file. (An unwrapping conversion will
// already probably be included in the global convert file).
convertMacros += "#m4 _CONVERSION(``" + returnCType +
- "'', _LQ()" + returnCTypeTranslation + "_RQ(), ";
- convertMacros += g_type_is_a(returnGType, GST_TYPE_MINI_OBJECT) ?
- "``Gst::wrap($3)'')\n" : "``Glib::wrap($3)'')\n";
+ "'', _LQ()" + returnCTypeTranslation + "_RQ(), " +
+ "``Glib::wrap($3)'')\n";
}
}
@@ -508,13 +543,19 @@ static std::string get_signal_wrap_statements(std::string& includeMacroCalls,
"_LQ()" + paramCTypeTranslation + "_RQ(), "
"``Glib::wrap_taglist($3, true)'')\n";
}
+ else if(is_a_mini_object(paramCType))
+ {
+ // Dealing with a mini object (which are boxed types).
+ convertMacros += "#m4 _CONVERSION(``" + paramCType +
+ "'', _LQ()" + paramCTypeTranslation + "_RQ(), " +
+ "``Gst::wrap($3, true)'')\n";
+ }
else
{
// Dealing with reference counted parameter or a boxed type.
convertMacros += "#m4 _CONVERSION(``" + paramCType +
- "'', _LQ()" + paramCTypeTranslation + "_RQ(), ";
- convertMacros += g_type_is_a(paramGType, GST_TYPE_MINI_OBJECT) ?
- "``Gst::wrap($3, true)'')\n" : "``Glib::wrap($3, true)'')\n";
+ "'', _LQ()" + paramCTypeTranslation + "_RQ(), " +
+ "``Glib::wrap($3, true)'')\n";
}
}
@@ -795,9 +836,6 @@ int main(int argc, char** argv)
gboolean ccgFile = false;
gboolean confirmExistence = false;
- if(!Glib::thread_supported())
- Glib::thread_init();
-
static const GOptionEntry optionEntries[] =
{
{"hg", 'h', 0, G_OPTION_ARG_NONE, &hgFile, "Generate preliminary .hg file.", 0 },
diff --git a/tools/m4/plugingen_gstreamermm.m4 b/tools/m4/plugingen_gstreamermm.m4
index afb171b..f5a5238 100644
--- a/tools/m4/plugingen_gstreamermm.m4
+++ b/tools/m4/plugingen_gstreamermm.m4
@@ -20,10 +20,14 @@ _TRANSLATION(`GValueArray*',`Glib::ValueArray',`const Glib::ValueArray&',`Glib::
dnl gstreamermm
_TRANSLATION(`GstBuffer*',`Gst::Buffer',`const
Glib::RefPtr<Gst::Buffer>&',`Glib::RefPtr<Gst::Buffer>',`<gstreamermm/buffer.h>')
_TRANSLATION(`GstCaps*',`Gst::Caps',`const
Glib::RefPtr<Gst::Caps>&',`Glib::RefPtr<Gst::Caps>',`<gstreamermm/caps.h>')
+_TRANSLATION(`GstChildProxy*',`Gst::ChildProxy',`const
Glib::RefPtr<Gst::ChildProxy>&',`Glib::RefPtr<Gst::ChildProxy>',`<gstreamermm/childproxy.h>')
_TRANSLATION(`GstElement*',`Gst::Element',`const
Glib::RefPtr<Gst::Element>&',`Glib::RefPtr<Gst::Element>',`<gstreamermm/element.h>')
_TRANSLATION(`GstElementFactory*',`Gst::ElementFactory',`const
Glib::RefPtr<Gst::ElementFactory>&',`Glib::RefPtr<Gst::ElementFactory>',`<gstreamermm/elementfactory.h>')
_TRANSLATION(`GstFraction',`Gst::Fraction',`const Gst::Fraction&',`Gst::Fraction',`<gstreamermm/value.h>')
_TRANSLATION(`GstPad*',`Gst::Pad',`const
Glib::RefPtr<Gst::Pad>&',`Glib::RefPtr<Gst::Pad>',`<gstreamermm/pad.h>')
+_TRANSLATION(`GstQuery*',`Gst::Query',`const
Glib::RefPtr<Gst::Query>&',`Glib::RefPtr<Gst::Query>',`<gstreamermm/query.h>')
+_TRANSLATION(`GstSample*',`Gst::Sample',`const
Glib::RefPtr<Gst::Sample>&',`Glib::RefPtr<Gst::Sample>',`<gstreamermm/sample.h>')
+_TRANSLATION(`GstStructure*',`Gst::Structure',`const
Gst::Structure&',`Gst::Structure',`<gstreamermm/structure.h>')
_TRANSLATION(`GstTagList*',`Gst::TagList',`const Gst::TagList&',`Gst::TagList',`<gstreamermm/taglist.h>')
dnl Interfaces
@@ -36,7 +40,7 @@ _TRANSLATION(`GstPropertyProbe*',`Gst::PropertyProbe',`const Glib::RefPtr<Gst::P
_TRANSLATION(`GstStreamVolume*',`Gst::StreamVolume',`const
Glib::RefPtr<Gst::StreamVolume>&',`Glib::RefPtr<Gst::StreamVolume>',`<gstreamermm/streamvolume.h>')
_TRANSLATION(`GstTagSetter*',`Gst::TagSetter',`const
Glib::RefPtr<Gst::TagSetter>&',`Glib::RefPtr<Gst::TagSetter>',`<gstreamermm/tagsetter.h>')
_TRANSLATION(`GstURIHandler*',`Gst::URIHandler',`const
Glib::RefPtr<Gst::URIHandler>&',`Glib::RefPtr<Gst::URIHandler>',`<gstreamermm/urihandler.h>')
-_TRANSLATION(`GstXOverlay*',`Gst::XOverlay',`const
Glib::RefPtr<Gst::XOverlay>&',`Glib::RefPtr<Gst::XOverlay>',`<gstreamermm/xoverlay.h>')
+_TRANSLATION(`GstVideoOverlay*',`Gst::VideoOverlay',`const
Glib::RefPtr<Gst::VideoOverlay>&',`Glib::RefPtr<Gst::VideoOverlay>',`<gstreamermm/videooverlay.h>')
dnl Wrapped enums:
dnl One should be included for each enum wrapped outside of plug-ins so that
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]