From 28188a3e6e8102d86b70d2634b57cce42d96f261 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 24 Mar 2008 10:29:05 +0000 Subject: [PATCH] gst/gstvalue.c: Transform a GstObject to a more meaningfull string that includes the object type in addition to its n... 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 | 6 ++++++ gst/gstvalue.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37e1a50..3939bfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-24 Wim Taymans + + * 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 * ChangeLog: diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 3a694ca..9da84e5 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -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 = { -- 2.7.4