From: <en...@ke...> - 2008-08-27 07:18:43
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: ensonic Date: Wed Aug 27 2008 07:18:54 UTC Log message: * gst/gstobject.c: Due to popular request also include ObjectType in gst_object_get_path_string(). Makes gst-launch -v bit more useful. Modified files: . : ChangeLog gst : gstobject.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.4041&r2=1.4042 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstobject.c.diff?r1=1.128&r2=1.129 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.4041 retrieving revision 1.4042 diff -u -d -r1.4041 -r1.4042 --- ChangeLog 27 Aug 2008 03:04:21 -0000 1.4041 +++ ChangeLog 27 Aug 2008 07:18:32 -0000 1.4042 @@ -1,3 +1,9 @@ +2008-08-27 Stefan Kost <en...@us...> + + * gst/gstobject.c: + Due to popular request also include ObjectType in + gst_object_get_path_string(). Makes gst-launch -v bit more useful. 2008-08-26 David Schleef <ds...@sc...> * gst/gstutils.c: Remove check in gst_pad_query_convert() that Index: gstobject.c RCS file: /cvs/gstreamer/gstreamer/gst/gstobject.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- gstobject.c 22 Mar 2008 14:56:12 -0000 1.128 +++ gstobject.c 27 Aug 2008 07:18:37 -0000 1.129 @@ -568,6 +568,7 @@ g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_object_get_property (G_OBJECT (orig), pspec->name, &value); + /* FIXME: handle flags */ if (G_IS_PARAM_SPEC_ENUM (pspec)) { GEnumValue *enum_value; @@ -1062,6 +1063,7 @@ GSList *parents; void *parent; gchar *prevpath, *path; + const gchar *typename; gchar *component; gchar *separator; @@ -1090,16 +1092,25 @@ * decrease the refcounting on each element after we handled * it. */ for (parents = parentage; parents; parents = g_slist_next (parents)) { + if (G_IS_OBJECT (parents->data)) { + typename = G_OBJECT_TYPE_NAME (parents->data); + } else { + typename = NULL; + } if (GST_IS_OBJECT (parents->data)) { GstObject *item = GST_OBJECT_CAST (parents->data); GstObjectClass *oclass = GST_OBJECT_GET_CLASS (item); - component = gst_object_get_name (item); + component = g_strdup_printf ("%s:%s", typename, GST_OBJECT_NAME (item)); separator = oclass->path_string_separator; /* and unref now */ gst_object_unref (item); } else { - component = g_strdup_printf ("%p", parents->data); + if (typename) { + component = g_strdup_printf ("%s:%p", typename, parents->data); + } else { + component = g_strdup_printf ("%p", parents->data); + } separator = "/"; } |