1 /* extracted from gst-launch */
3 property_change_callback (GObject * object, GstObject * orig,
6 GValue value = { 0, }; /* the important thing is that value.type = 0 */
9 if (pspec->flags & G_PARAM_READABLE) {
10 g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
11 g_object_get_property (G_OBJECT (orig), pspec->name, &value);
12 /* fix current bug with g_strdup_value_contents not working with gint64 */
13 if (G_IS_PARAM_SPEC_INT64 (pspec))
14 str = g_strdup_printf ("%lld", g_value_get_int64 (&value));
16 str = g_strdup_value_contents (&value);
17 g_print ("%s: %s = %s\n", GST_OBJECT_NAME (orig), pspec->name, str);
19 g_value_unset (&value);
21 g_warning ("Parameter not readable. What's up with that?");