- * gst_controlled_property_new:
- * @object: for which object the controlled property should be set up
- * @name: the name of the property to be controlled
- *
- * Private method which initializes the fields of a new controlled property
- * structure.
- *
- * Returns: a freshly allocated structure or %NULL
- */
-static GstControlledProperty *
-gst_controlled_property_new (GstObject * object, const gchar * name)
-{
- GstControlledProperty *prop = NULL;
- GParamSpec *pspec;
-
- GST_INFO ("trying to put property '%s' under control", name);
-
- /* check if the object has a property of that name */
- if ((pspec =
- g_object_class_find_property (G_OBJECT_GET_CLASS (object), name))) {
- GST_DEBUG (" psec->flags : 0x%08x", pspec->flags);
-
- /* check if this param is witable && controlable && !construct-only */
- g_return_val_if_fail ((pspec->flags & (G_PARAM_WRITABLE |
- GST_PARAM_CONTROLLABLE | G_PARAM_CONSTRUCT_ONLY)) ==
- (G_PARAM_WRITABLE | GST_PARAM_CONTROLLABLE), NULL);
-
- if ((prop = g_slice_new (GstControlledProperty))) {
- prop->pspec = pspec;
- prop->name = pspec->name;
- prop->csource = NULL;
- prop->disabled = FALSE;
- memset (&prop->last_value, 0, sizeof (GValue));
- g_value_init (&prop->last_value, G_PARAM_SPEC_VALUE_TYPE (prop->pspec));
- }
- } else {
- GST_WARNING ("class '%s' has no property '%s'", G_OBJECT_TYPE_NAME (object),
- name);
- }
- return prop;
-}
-
-/*
- * gst_controlled_property_free:
- * @prop: the object to free
- *
- * Private method which frees all data allocated by a #GstControlledProperty
- * instance.
- */
-static void
-gst_controlled_property_free (GstControlledProperty * prop)
-{
- if (prop->csource)
- g_object_unref (prop->csource);
- g_value_unset (&prop->last_value);
- g_slice_free (GstControlledProperty, prop);
-}
-
-/*
- * gst_object_find_controlled_property: