gnomemm r2085 - in gstreamermm/trunk: . gstreamer/src tools/m4



Author: jaalburqu
Date: Mon Mar  9 20:33:50 2009
New Revision: 2085
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2085&view=rev

Log:
2009-03-09  David King  <davidk openismus com>

	* gstreamer/src/message.ccg: Fix use of GstState references. Don't use
	NULL. Cast to State correctly. Initialise GstState to GST_STATE_NULL.
	* tools/m4/convert_gst.m4: Fix conversion from GstState* to State&.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/src/message.ccg
   gstreamermm/trunk/tools/m4/convert_gst.m4

Modified: gstreamermm/trunk/gstreamer/src/message.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/message.ccg	(original)
+++ gstreamermm/trunk/gstreamer/src/message.ccg	Mon Mar  9 20:33:50 2009
@@ -302,28 +302,28 @@
 
 State MessageStateChanged::parse() const
 {
-  GstState* new_state;
+  GstState new_state = GST_STATE_NULL;
 
-  gst_message_parse_state_changed(const_cast<GstMessage*>(gobj()), NULL,
-    new_state, NULL);
-  return (State)(*new_state);
+  gst_message_parse_state_changed(const_cast<GstMessage*>(gobj()), 0,
+    &new_state, 0);
+  return State(new_state);
 }
 
 State MessageStateChanged::parse_old() const
 {
-  GstState* old_state;
+  GstState old_state = GST_STATE_NULL;
 
-  gst_message_parse_state_changed(const_cast<GstMessage*>(gobj()), old_state,
-    NULL, NULL);
-  return (State)(*old_state);
+  gst_message_parse_state_changed(const_cast<GstMessage*>(gobj()), &old_state,
+    0, 0);
+  return State(old_state);
 }
 
 State MessageStateChanged::parse_pending() const
 {
-  GstState* pending_state;
-  gst_message_parse_state_changed(const_cast<GstMessage*>(gobj()), NULL,
-    NULL, pending_state);
-  return (State)(*pending_state);
+  GstState pending_state = GST_STATE_NULL;
+  gst_message_parse_state_changed(const_cast<GstMessage*>(gobj()), 0,
+    0, &pending_state);
+  return State(pending_state);
 }
 
 MessageStateDirty::MessageStateDirty(GstMessage* castitem)

Modified: gstreamermm/trunk/tools/m4/convert_gst.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/convert_gst.m4	(original)
+++ gstreamermm/trunk/tools/m4/convert_gst.m4	Mon Mar  9 20:33:50 2009
@@ -189,7 +189,7 @@
 _CONVERSION(`Format&',`GstFormat*',`(($2)&($3))')
 _CONVERSION(`GstClockTimeDiff*',`ClockTimeDiff&',`(ClockTimeDiff&)(*($3))')
 _CONVERSION(`const GstQueryType*',`const QueryType*',`(QueryType*)($3)')
-_CONVERSION(`GstState*',`State&',`(State&)($3)')
+_CONVERSION(`GstState*',`State&',`*reinterpret_cast<Gst::State*>($3)')
 _CONVERSION(`GstTagFlag',`TagFlag',`(TagFlag)($3)')
 _CONVERSION(`guint64',`ClockTime',`(ClockTime ($3))')
 _CONVERSION(`const URIType',`const GstURIType',`(GstURIType($3))')



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