gst_controller_remove_properties
gst_controller_remove_properties_list
gst_controller_remove_properties_valist
+gst_controller_is_active
gst_controller_set_disabled
gst_controller_set_property_disabled
gst_controller_suggest_next_sync
gst_object_uncontrol_properties
gst_object_suggest_next_sync
gst_object_sync_values
+gst_object_has_active_automation
gst_object_set_automation_disabled
gst_object_set_property_automation_disabled
gst_object_get_control_source
}
/**
+ * gst_controller_is_active:
+ * @self: the #GstController which should be disabled
+ *
+ * Check if the controller is active. It is active if it has at least one
+ * controlled property that is not disabled.
+ *
+ * Returns: %TRUE if the controller is active
+ */
+gboolean
+gst_controller_is_active (GstController * self)
+{
+ gboolean active = FALSE;
+ GList *node;
+ GstControlledProperty *prop;
+
+ g_return_if_fail (GST_IS_CONTROLLER (self));
+
+ g_mutex_lock (self->lock);
+ for (node = self->properties; node; node = node->next) {
+ prop = node->data;
+ active |= !prop->disabled;
+ }
+ g_mutex_unlock (self->lock);
+
+ return active;
+}
+
+/**
* gst_controller_set_property_disabled:
* @self: the #GstController which should be disabled
* @property_name: property to disable
* some time, i.e. gst_controller_sync_values() will do nothing for the
* property.
*/
-
void
gst_controller_set_property_disabled (GstController * self,
const gchar * property_name, gboolean disabled)
g_mutex_unlock (self->lock);
}
-
/**
* gst_controller_set_disabled:
* @self: the #GstController which should be disabled
gboolean gst_controller_remove_properties_list (GstController * self, GList *list);
gboolean gst_controller_remove_properties (GstController * self, ...) G_GNUC_NULL_TERMINATED;
+gboolean gst_controller_is_active (GstController * self);
void gst_controller_set_disabled (GstController *self, gboolean disabled);
void gst_controller_set_property_disabled (GstController *self, const gchar * property_name, gboolean disabled);
gboolean gst_controller_set_control_source (GstController *self, const gchar * property_name, GstControlSource *csource);
return (TRUE);
}
-// FIXME: docs
+/**
+ * gst_object_has_active_automation:
+ * @object: the object that has controlled properties
+ *
+ * Check if the object has an active controller. It has one if it has at least
+ * one controlled property that is not disabled.
+ *
+ * Returns: %TRUE if the controller is active
+ */
+gboolean
+gst_object_has_active_automation (GstObject * object)
+{
+ gboolean res = FALSE;
+
+ g_return_if_fail (GST_IS_OBJECT (object));
+
+ if (object->ctrl)
+ res = gst_controller_is_active ((GstController *) object->ctrl);
+ return res;
+}
+
+/**
+ * gst_object_set_automation_disabled:
+ * @object: the object that has controlled properties
+ * @disabled: boolean that specifies whether to disable the controller
+ * or not.
+ *
+ * This function is used to disable all properties of the #GstController
+ * for some time, i.e. gst_object_sync_values() will do nothing..
+ */
void
gst_object_set_automation_disabled (GstObject * object, gboolean disabled)
{
gst_controller_set_disabled (object->ctrl, disabled);
}
-// FIXME: docs
+/**
+ * gst_object_set_property_automation_disabled:
+ * @object: the object that has controlled properties
+ * @property_name: property to disable
+ * @disabled: boolean that specifies whether to disable the controller
+ * or not.
+ *
+ * This function is used to disable the #GstController on a property for
+ * some time, i.e. gst_controller_sync_values() will do nothing for the
+ * property.
+ */
void
gst_object_set_property_automation_disabled (GstObject * object,
const gchar * property_name, gboolean disabled)
GstClockTime gst_object_suggest_next_sync (GstObject * object);
gboolean gst_object_sync_values (GstObject * object, GstClockTime timestamp);
+gboolean gst_object_has_active_automation (GstObject *object);
void gst_object_set_automation_disabled (GstObject *object, gboolean disabled);
void gst_object_set_property_automation_disabled (GstObject *object, const gchar * property_name, gboolean disabled);