[gstreamermm] Message[Error|Warning|Info]: Fix the parse_debug() methods.



commit 1dd4c2d113d38628ab3c7c451cfc31163951ac9a
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Wed Dec 2 18:06:22 2009 -0500

    	Message[Error|Warning|Info]: Fix the parse_debug() methods.
    
    	* gstreamer/src/message.ccg (MessageError::parse_debug):
    	(MessageWarning::parse_debug):
    	(MessageInfo::parse_debug): Use a temporary GError* which the
    	gst_message_parse_[warning|info|error]() methods require to get to the
    	debug string.
    	* gstreamer/src/mixer.ccg:
    	* gstreamer/src/mixer.hg: Typos.

 ChangeLog                 |   12 ++++++++++++
 gstreamer/src/message.ccg |   25 ++++++++++++++++++++++---
 gstreamer/src/mixer.ccg   |    2 +-
 gstreamer/src/mixer.hg    |    2 +-
 4 files changed, 36 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ef78e03..a001a4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-02  José Alburquerque  <jaalburqu svn gnome org>
+
+	Message[Error|Warning|Info]: Fix the parse_debug() methods.
+
+	* gstreamer/src/message.ccg (MessageError::parse_debug):
+	(MessageWarning::parse_debug):
+	(MessageInfo::parse_debug): Use a temporary GError* which the
+	gst_message_parse_[warning|info|error]() methods require to get to the
+	debug string.
+	* gstreamer/src/mixer.ccg:
+	* gstreamer/src/mixer.hg: Typos.
+
 2009-12-01  José Alburquerque  <jaalburqu svn gnome org>
 
 	Element: Correct the release_request_pad() docs.
diff --git a/gstreamer/src/message.ccg b/gstreamer/src/message.ccg
index 0631403..61337e6 100644
--- a/gstreamer/src/message.ccg
+++ b/gstreamer/src/message.ccg
@@ -94,12 +94,18 @@ Glib::Error MessageError::parse() const
 std::string MessageError::parse_debug() const
 {
   gchar* c_debug = 0;
-  gst_message_parse_error(const_cast<GstMessage*>(gobj()), 0, &c_debug);
+  GError* c_error = 0;
+
+  gst_message_parse_error(const_cast<GstMessage*>(gobj()), &c_error, &c_debug);
 
   std::string result = c_debug;
+
   if(c_debug)
     g_free(c_debug);
 
+  if(c_error)
+    g_error_free(c_error);
+
   return result;
 }
 
@@ -138,12 +144,19 @@ Glib::Error MessageWarning::parse() const
 std::string MessageWarning::parse_debug() const
 {
   gchar* c_debug = 0;
-  gst_message_parse_warning(const_cast<GstMessage*>(gobj()), 0, &c_debug);
+  GError* c_error = 0;
+
+  gst_message_parse_warning(const_cast<GstMessage*>(gobj()), &c_error,
+    &c_debug);
 
   std::string result = c_debug;
+
   if(c_debug)
     g_free(c_debug);
 
+  if(c_error)
+    g_error_free(c_error);
+
   return result;
 }
 
@@ -183,12 +196,18 @@ Glib::Error MessageInfo::parse() const
 std::string MessageInfo::parse_debug() const
 {
   gchar* c_debug = 0;
-  gst_message_parse_info(const_cast<GstMessage*>(gobj()), 0, &c_debug);
+  GError* c_error = 0;
+
+  gst_message_parse_info(const_cast<GstMessage*>(gobj()), &c_error, &c_debug);
 
   std::string result = c_debug;
+
   if(c_debug)
     g_free(c_debug);
 
+  if(c_error)
+    g_error_free(c_error);
+
   return result;
 }
 
diff --git a/gstreamer/src/mixer.ccg b/gstreamer/src/mixer.ccg
index 51ab354..fafb550 100644
--- a/gstreamer/src/mixer.ccg
+++ b/gstreamer/src/mixer.ccg
@@ -111,7 +111,7 @@ void MessageMixerVolumeChanged::parse(Glib::RefPtr<Gst::MixerTrack>& track,
     &gst_track, &gst_volumes, &gst_num_channels);
   track = Glib::wrap(gst_track);
   //TODO: = is private for Glib::ArrayHandle:
-  //track = Glib::ArrayHandle<int>(gst_volumes, gst_num_channels, Glib::OWNERSHIP_DEEP);
+  //volumes = Glib::ArrayHandle<int>(gst_volumes, gst_num_channels, Glib::OWNERSHIP_DEEP);
 }
 */
 
diff --git a/gstreamer/src/mixer.hg b/gstreamer/src/mixer.hg
index d9f574f..ab3f8d7 100644
--- a/gstreamer/src/mixer.hg
+++ b/gstreamer/src/mixer.hg
@@ -227,7 +227,7 @@ public:
    //* Since 0.10.14.
    //*/
   //void parse(Glib::RefPtr<Gst::MixerTrack>& track,
-    //Glib::ArrayHandle<int> volumes);
+    //Glib::ArrayHandle<int>& volumes) const;
   _IGNORE(gst_mixer_message_parse_volume_changed)
 
   /** Parses a volume-changed notification message and extracts the track



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