property->name);
/* get base type */
base = property->value_type;
- while ((parent = g_type_parent (base))) {
+ while ((parent = g_type_parent (base)))
base = parent;
- }
+
switch (base) {
case G_TYPE_INT:
case G_TYPE_UINT:
/* get base type */
base = property->value_type;
- while ((parent = g_type_parent (base))) {
+ while ((parent = g_type_parent (base)))
base = parent;
- }
/* get value and serialize */
GST_INFO (" storing property: %s (type is %s)", property->name,
g_type_name (base));
+
switch (base) {
case G_TYPE_BOOLEAN:
case G_TYPE_ENUM:
{
GParamSpec **properties, *property;
guint i, number_of_properties;
- GType param_type, base_type;
+ GType base, parent;
if ((properties =
g_object_class_list_properties (G_OBJECT_CLASS (GST_OBJECT_GET_CLASS
}
*/
- GST_INFO ("property '%s' (GType=%lu)", property->name,
- property->value_type);
+ rnd = ((gdouble) rand ()) / (RAND_MAX + 1.0);
- param_type = property->value_type;
- while ((base_type = g_type_parent (param_type)))
- param_type = base_type;
+ /* get base type */
+ base = property->value_type;
+ while ((parent = g_type_parent (base)))
+ base = parent;
+ GST_INFO ("set random value for property: %s (type is %s)",
+ property->name, g_type_name (base));
- rnd = ((gdouble) rand ()) / (RAND_MAX + 1.0);
- switch (param_type) {
+ switch (base) {
case G_TYPE_BOOLEAN:{
g_object_set (self, property->name, (gboolean) (2.0 * rnd), NULL);
}
enum_class->minimum) * rnd)), NULL);
} break;
default:
- GST_WARNING ("unhandled GType=%lu", param_type);
+ GST_WARNING ("incomplete implementation for GParamSpec type '%s'",
+ G_PARAM_SPEC_TYPE_NAME (property));
}
}
/* @todo: handle childproxy properties as well */