Commit 20e44c6f authored by Wim Taymans's avatar Wim Taymans
Browse files

Use full object path string in default error/notify handlers.

Original commit message from CVS:
Use full object path string in default error/notify handlers.
parent 08b7de80
......@@ -216,7 +216,9 @@ gst_element_real_get_property (GObject *object, guint prop_id, GValue *value, GP
void
gst_element_default_error (GObject *object, GstObject *orig, gchar *error)
{
g_print ("ERROR: %s: %s\n", GST_OBJECT_NAME (orig), error);
gchar *name = gst_object_get_path_string (orig);
g_print ("ERROR: %s: %s\n", name, error);
g_free (name);
}
typedef struct {
......
......@@ -329,6 +329,7 @@ gst_object_default_deep_notify (GObject *object, GstObject *orig,
{
GValue value = { 0, }; /* the important thing is that value.type = 0 */
gchar *str = 0;
gchar *name = NULL;
if (pspec->flags & G_PARAM_READABLE) {
/* let's not print these out for excluded properties... */
......@@ -351,12 +352,16 @@ gst_object_default_deep_notify (GObject *object, GstObject *orig,
else {
str = g_strdup_value_contents (&value);
}
g_print ("%s: %s = %s\n", GST_OBJECT_NAME (orig), pspec->name, str);
name = gst_object_get_path_string (orig);
g_print ("%s: %s = %s\n", name, pspec->name, str);
g_free (name);
g_free (str);
g_value_unset (&value);
} else {
name = gst_object_get_path_string (orig);
g_warning ("Parameter %s not readable in %s.",
pspec->name, GST_OBJECT_NAME (orig));
pspec->name, name);
g_free (name);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment