mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-28 23:02:22 +00:00
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.
This commit is contained in:
parent
08b7de807c
commit
20e44c6f57
2 changed files with 10 additions and 3 deletions
|
@ -216,7 +216,9 @@ gst_element_real_get_property (GObject *object, guint prop_id, GValue *value, GP
|
||||||
void
|
void
|
||||||
gst_element_default_error (GObject *object, GstObject *orig, gchar *error)
|
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 {
|
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 */
|
GValue value = { 0, }; /* the important thing is that value.type = 0 */
|
||||||
gchar *str = 0;
|
gchar *str = 0;
|
||||||
|
gchar *name = NULL;
|
||||||
|
|
||||||
if (pspec->flags & G_PARAM_READABLE) {
|
if (pspec->flags & G_PARAM_READABLE) {
|
||||||
/* let's not print these out for excluded properties... */
|
/* let's not print these out for excluded properties... */
|
||||||
|
@ -351,12 +352,16 @@ gst_object_default_deep_notify (GObject *object, GstObject *orig,
|
||||||
else {
|
else {
|
||||||
str = g_strdup_value_contents (&value);
|
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_free (str);
|
||||||
g_value_unset (&value);
|
g_value_unset (&value);
|
||||||
} else {
|
} else {
|
||||||
|
name = gst_object_get_path_string (orig);
|
||||||
g_warning ("Parameter %s not readable in %s.",
|
g_warning ("Parameter %s not readable in %s.",
|
||||||
pspec->name, GST_OBJECT_NAME (orig));
|
pspec->name, name);
|
||||||
|
g_free (name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue