gnomemm r2113 - in gstreamermm/trunk: . gstreamer gstreamer/src tools/extra_defs_gen tools/m4
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r2113 - in gstreamermm/trunk: . gstreamer gstreamer/src tools/extra_defs_gen tools/m4
- Date: Thu, 19 Mar 2009 00:59:00 +0000 (UTC)
Author: jaalburqu
Date: Thu Mar 19 00:59:00 2009
New Revision: 2113
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2113&view=rev
Log:
2009-03-18 Josà Alburquerque <jaalburqu svn gnome org>
* configure.ac:
* gstreamer/gstreamermmconfig.h.in:
* gstreamer/src/Makefile_list_of_hg.am_fragment: Added TCPClientSrc,
TCPClientSink, TCPServerSrc plug-ins.
* gstreamer/src/enums.ccg:
* gstreamer/src/enums.hg: Wrapped GstTCPProtocol enum here because the
tcp plug-ins (above) share the enum and if it is not wrapped, it would
be wrapped in all three of the plug-in .hg files.
* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc: Modified
get_cast_macro() to insert '_' in correct places. Added
GstTCPProtocol to list of wrapped enums.
* tools/m4/ctocpp.m4: Added C to C++ translation of GstTCPProtocol
enum.
* tools/extra_defs_gen/generate_defs_gst.cc: Added
tcp{client,server}{src,sink} plug-ins to defs generation.
* gstreamer/src/gst_signals.defs: Regenerated to include properties
and signals of tcp plug-ins.
* gstreamer/src/urihandler.hg: Wrapped GstURIType because enhancement
#575870 is implemented.
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/configure.ac
gstreamermm/trunk/gstreamer/gstreamermmconfig.h.in
gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
gstreamermm/trunk/gstreamer/src/enums.ccg
gstreamermm/trunk/gstreamer/src/enums.hg
gstreamermm/trunk/gstreamer/src/gst_signals.defs
gstreamermm/trunk/gstreamer/src/urihandler.hg
gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc
gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
gstreamermm/trunk/tools/m4/ctocpp.m4
Modified: gstreamermm/trunk/configure.ac
==============================================================================
--- gstreamermm/trunk/configure.ac (original)
+++ gstreamermm/trunk/configure.ac Thu Mar 19 00:59:00 2009
@@ -194,6 +194,8 @@
ffmpegcolorspace=FfmpegColorSpace gdpdepay=GDPDepay gdppay=GDPPay \
giosink=GioSink giosrc=GioSrc giostreamsink=GioStreamSink \
giostreamsrc=GioStreamSrc oggdemux=OggDemux oggmux=OggMux playbin2=PlayBin2 \
+tcpclientsrc=TCPClientSrc tcpclientsink=TCPClientSink \
+tcpserversrc=TCPServerSrc \
textoverlay=TextOverlay textrender=TextRender theoradec=TheoraDec \
theoraenc=TheoraEnc timeoverlay=TimeOverlay videorate=VideoRate \
videoscale=VideoScale videotestsrc=VideoTestSrc volume=Volume \
Modified: gstreamermm/trunk/gstreamer/gstreamermmconfig.h.in
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermmconfig.h.in (original)
+++ gstreamermm/trunk/gstreamer/gstreamermmconfig.h.in Thu Mar 19 00:59:00 2009
@@ -41,6 +41,9 @@
#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
Modified: gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment (original)
+++ gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment Thu Mar 19 00:59:00 2009
@@ -41,8 +41,8 @@
ffmpegcolorspace.hg gdpdepay.hg gdppay.hg giosink.hg \
giosrc.hg giostreamsink.hg giostreamsrc.hg \
oggdemux.hg oggmux.hg playbin2.hg \
- textoverlay.hg \
- textrender.hg theoradec.hg theoraenc.hg \
+ tcpclientsrc.hg tcpclientsink.hg tcpserversrc.hg \
+ textoverlay.hg textrender.hg theoradec.hg theoraenc.hg \
timeoverlay.hg videorate.hg videoscale.hg \
videotestsrc.hg volume.hg vorbisdec.hg vorbisenc.hg \
vorbisparse.hg vorbistag.hg ximagesink.hg xvimagesink.hg
Modified: gstreamermm/trunk/gstreamer/src/enums.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/enums.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/enums.ccg Thu Mar 19 00:59:00 2009
@@ -18,3 +18,15 @@
*/
#include <gst/gstenumtypes.h>
+
+extern "C"
+{
+
+// This function is needed for the TCPProtocol plug-in enum.
+static GType gst_tcp_protocol_get_type()
+{
+ static GType const type = g_type_from_name("GstTCPProtocol");
+ return type;
+}
+
+}
Modified: gstreamermm/trunk/gstreamer/src/enums.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/enums.hg (original)
+++ gstreamermm/trunk/gstreamer/src/enums.hg Thu Mar 19 00:59:00 2009
@@ -28,4 +28,7 @@
_WRAP_ENUM(MiniObjectFlags, GstMiniObjectFlags)
_WRAP_ENUM(State, GstState)
+// This enum is wrapped for tcp plug-ins (which share it).
+_WRAP_ENUM(TCPProtocol, GstTCPProtocol)
+
} //namespace Gst
Modified: gstreamermm/trunk/gstreamer/src/gst_signals.defs
==============================================================================
--- gstreamermm/trunk/gstreamer/src/gst_signals.defs (original)
+++ gstreamermm/trunk/gstreamer/src/gst_signals.defs Thu Mar 19 00:59:00 2009
@@ -6304,6 +6304,273 @@
(construct-only #f)
)
+;; From GstTCPClientSrc
+
+(define-property name
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamString")
+ (docs "The name of the object")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property blocksize
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamULong")
+ (docs "Size in bytes to read per buffer (-1 = default)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property num-buffers
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamInt")
+ (docs "Number of buffers to output before sending EOS (-1 = unlimited)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property typefind
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamBoolean")
+ (docs "Run typefind before negotiating")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property do-timestamp
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamBoolean")
+ (docs "Apply current stream time to buffers")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property host
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamString")
+ (docs "The host IP address to receive packets from")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property port
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamInt")
+ (docs "The port to receive packets from")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property protocol
+ (of-object "GstTCPClientSrc")
+ (prop-type "GParamEnum")
+ (docs "The protocol to wrap data in")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+;; From GstTCPClientSink
+
+(define-property name
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamString")
+ (docs "The name of the object")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property preroll-queue-len
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamUInt")
+ (docs "Number of buffers to queue during preroll")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property sync
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamBoolean")
+ (docs "Sync on the clock")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property max-lateness
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamInt64")
+ (docs "Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property qos
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamBoolean")
+ (docs "Generate Quality-of-Service events upstream")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property async
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamBoolean")
+ (docs "Go asynchronously to PAUSED")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property ts-offset
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamInt64")
+ (docs "Timestamp offset in nanoseconds")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property last-buffer
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamSpecMiniObject")
+ (docs "The last buffer received in the sink")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property blocksize
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamUInt")
+ (docs "Size in bytes to pull per buffer (0 = default)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property render-delay
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamUInt64")
+ (docs "Additional render delay of the sink in nanoseconds")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property host
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamString")
+ (docs "The host/IP to send the packets to")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property port
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamInt")
+ (docs "The port to send the packets to")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property protocol
+ (of-object "GstTCPClientSink")
+ (prop-type "GParamEnum")
+ (docs "The protocol to wrap data in")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+;; From GstTCPServerSrc
+
+(define-property name
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamString")
+ (docs "The name of the object")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property blocksize
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamULong")
+ (docs "Size in bytes to read per buffer (-1 = default)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property num-buffers
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamInt")
+ (docs "Number of buffers to output before sending EOS (-1 = unlimited)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property typefind
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamBoolean")
+ (docs "Run typefind before negotiating")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property do-timestamp
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamBoolean")
+ (docs "Apply current stream time to buffers")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property host
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamString")
+ (docs "The hostname to listen as")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property port
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamInt")
+ (docs "The port to listen to")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property protocol
+ (of-object "GstTCPServerSrc")
+ (prop-type "GParamEnum")
+ (docs "The protocol to wrap data in")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GstTCPServerSink
(define-property name
Modified: gstreamermm/trunk/gstreamer/src/urihandler.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/urihandler.hg (original)
+++ gstreamermm/trunk/gstreamer/src/urihandler.hg Thu Mar 19 00:59:00 2009
@@ -26,15 +26,10 @@
namespace Gst
{
-enum URIType
-{
- URI_UNKNOWN = GST_URI_UNKNOWN,
- URI_SINK = GST_URI_SINK,
- URI_SRC = GST_URI_SRC
-};
-
class Element;
+_WRAP_ENUM(URIType, GstURIType)
+
/** Gst::URIHandler - An interface to ease URI handling in plugins.
* The Gst::URIHandler is an interface that is implemented by Source and Sink
* Gst::Element to simplify then handling of URI.
Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc (original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc Thu Mar 19 00:59:00 2009
@@ -195,6 +195,9 @@
<< get_plugin_defs("oggmux")
<< get_plugin_defs("playbin")
<< get_plugin_defs("playbin2")
+ << get_plugin_defs("tcpclientsrc")
+ << get_plugin_defs("tcpclientsink")
+ << get_plugin_defs("tcpserversrc")
<< get_plugin_defs("tcpserversink")
<< get_plugin_defs("textoverlay")
<< get_plugin_defs("textrender")
Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc (original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc Thu Mar 19 00:59:00 2009
@@ -42,7 +42,7 @@
// To add an enum that is already wrapped to the list of wrapped enum, add
// alphabetically below and increment WRAPPED_ENUMS_SIZE.
-static const int WRAPPED_ENUMS_SIZE = 41;
+static const int WRAPPED_ENUMS_SIZE = 42;
static const char* wrappedEnums[WRAPPED_ENUMS_SIZE] =
{
"GstActivateMode",
@@ -82,6 +82,7 @@
"GstState",
"GstStateChange",
"GstStateChangeReturn",
+ "GstTCPProtocol",
"GstTagFlag",
"GstTagMergeMode",
"GstTaskState",
@@ -113,27 +114,41 @@
{
Glib::ustring result;
- Glib::ustring::const_iterator iter = typeName.begin();
+ Glib::ustring::const_iterator iter = typeName.end();
- if (iter != typeName.end())
- result.push_back(*iter);
+ bool prev_is_upper = false;
+ bool prev_is_lower = true; // Going backwards so last char should be lower.
+ int underscore_char_count = 0; // Used to count characters between underscores.
- int encountered_upper = 1; // The first char (above) should be upper
-
- for (++iter; iter != typeName.end(); ++iter)
+ for (--iter; iter != typeName.begin(); --iter, ++underscore_char_count)
{
if (g_unichar_isupper(*iter))
{
- if (!encountered_upper || encountered_upper > 1)
- result.push_back('_');
- ++encountered_upper;
+ result.insert(0, 1, *iter);
+ if (prev_is_lower && underscore_char_count > 1)
+ {
+ result.insert(0, 1, '_');
+ underscore_char_count = 0;
+ }
+ prev_is_upper = true;
+ prev_is_lower = false;
}
else
- encountered_upper = 0;
-
- result.push_back(g_unichar_toupper(*iter));
+ {
+ if (prev_is_upper && underscore_char_count > 1)
+ {
+ result.insert(0, 1, '_');
+ underscore_char_count = 0;
+ }
+ result.insert(0, 1, g_unichar_toupper(*iter));
+ prev_is_upper = false;
+ prev_is_lower = true;
+ }
}
+ // Insert first character (not included in the for loop).
+ result.insert(0, 1, g_unichar_toupper(*iter));
+
return result;
}
Modified: gstreamermm/trunk/tools/m4/ctocpp.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/ctocpp.m4 (original)
+++ gstreamermm/trunk/tools/m4/ctocpp.m4 Thu Mar 19 00:59:00 2009
@@ -1,5 +1,6 @@
#Enums
_CCONVERSION(`GstFormat',`Gst::Format',`Gst::Format')
+_CCONVERSION(`GstTCPProtocol',`Gst::TCPProtocol',`Gst::TCPProtocol')
#giomm
_CCONVERSION(`GFile*',`Gio::File',`const Glib::RefPtr<Gio::File>&',`Glib::RefPtr<Gio::File>',`<giomm/file.h>')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]