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