gst/gstvalue.c: Transform a GstObject to a more meaningfull string that includes...
authorWim Taymans <wim.taymans@gmail.com>
Mon, 24 Mar 2008 10:29:05 +0000 (10:29 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 24 Mar 2008 10:29:05 +0000 (10:29 +0000)
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_transform_object_string):
Transform a GstObject to a more meaningfull string that includes the
object type in addition to its name.

ChangeLog
gst/gstvalue.c

index 37e1a50..3939bfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-24  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       * gst/gstvalue.c: (gst_value_transform_object_string):
+       Transform a GstObject to a more meaningfull string that includes the
+       object type in addition to its name.
+
 2008-03-23  Stefan Kost  <ensonic@users.sf.net>
 
        * ChangeLog:
index 3a694ca..9da84e5 100644 (file)
@@ -3888,9 +3888,15 @@ gst_value_transform_object_string (const GValue * src_value,
   gchar *str;
 
   obj = g_value_get_object (src_value);
-  str = obj ? GST_OBJECT_NAME (obj) : "NULL";
+  if (obj) {
+    str =
+        g_strdup_printf ("(%s) %s", G_OBJECT_TYPE_NAME (obj),
+        GST_OBJECT_NAME (obj));
+  } else {
+    str = g_strdup ("NULL");
+  }
 
-  dest_value->data[0].v_pointer = g_strdup (str);
+  dest_value->data[0].v_pointer = str;
 }
 
 static GTypeInfo _info = {