diff --git a/ChangeLog b/ChangeLog index 0e9d3b1a02..08b1b11cf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-11 Edward Hervey + + * libs/gst/controller/gstcontroller.c: (gst_controller_remove_properties_list): + * libs/gst/controller/gstcontroller.h: + Added GList* version of _remove_properties() in order to be able to wrap + it in bindings. + 2005-10-11 Wim Taymans * docs/design/part-states.txt: diff --git a/common b/common index 221ccc0dc8..54920e38c6 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 221ccc0dc85b2d38bc5e2fc3f21cd80971777791 +Subproject commit 54920e38c65eaf03ea52c21b14a6d104a56581a9 diff --git a/libs/gst/controller/gstcontroller.c b/libs/gst/controller/gstcontroller.c index e55aba7c26..bf16ed39d3 100644 --- a/libs/gst/controller/gstcontroller.c +++ b/libs/gst/controller/gstcontroller.c @@ -556,6 +556,44 @@ gst_controller_remove_properties_valist (GstController * self, va_list var_args) return (res); } +/** + * gst_controller_remove_properties_list: + * @self: the controller object from which some properties should be removed + * @list: #GList of property names that should be removed + * + * Removes the given object properties from the controller + * + * Returns: %FALSE if one of the given property isn't handled by the controller, %TRUE otherwise + * Since: 0.9 + */ +gboolean +gst_controller_remove_properties_list (GstController * self, GList * list) +{ + gboolean res = TRUE; + GstControlledProperty *prop; + gchar *name; + GList *tmp; + + g_return_val_if_fail (GST_IS_CONTROLLER (self), FALSE); + + for (tmp = list; tmp; tmp = g_list_next (tmp)) { + name = (gchar *) tmp->data; + + /* find the property in the properties list of the controller, remove and free it */ + g_mutex_lock (self->lock); + if ((prop = gst_controller_find_controlled_property (self, name))) { + self->properties = g_list_remove (self->properties, prop); + g_signal_handler_disconnect (self->object, prop->notify_handler_id); + gst_controlled_property_free (prop); + } else { + res = FALSE; + } + g_mutex_unlock (self->lock); + } + + return (res); +} + /** * gst_controller_remove_properties: * @self: the controller object from which some properties should be removed diff --git a/libs/gst/controller/gstcontroller.h b/libs/gst/controller/gstcontroller.h index 44cec197f5..b3964e583f 100644 --- a/libs/gst/controller/gstcontroller.h +++ b/libs/gst/controller/gstcontroller.h @@ -207,6 +207,8 @@ GstController *gst_controller_new (GObject * object, ...); gboolean gst_controller_remove_properties_valist (GstController * self, va_list var_args); +gboolean gst_controller_remove_properties_list (GstController * self, + GList *list); gboolean gst_controller_remove_properties (GstController * self, ...); gboolean gst_controller_set (GstController * self, gchar * property_name,