gst-editing-services: ges: Add a method to TimelineObject to set contained TrackObject-s locked state

Thibault Saunier tsaunier at kemper.freedesktop.org
Wed Jan 11 07:04:33 PST 2012


Module: gst-editing-services
Branch: master
Commit: 714a7bf886e30b6e90ef0330dffa39082254999b
URL:    http://cgit.freedesktop.org/gstreamer/gst-editing-services/commit/?id=714a7bf886e30b6e90ef0330dffa39082254999b

Author: Thibault Saunier <thibault.saunier at collabora.com>
Date:   Wed Dec  7 20:36:24 2011 -0300

ges: Add a method to TimelineObject to set contained TrackObject-s locked state

API: ges_timeline_object_objects_set_locked

---

 bindings/python/ges.defs   |    8 ++++++++
 docs/libs/ges-sections.txt |    1 +
 ges/ges-timeline-object.c  |   23 +++++++++++++++++++++++
 ges/ges-timeline-object.h  |    2 ++
 4 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/bindings/python/ges.defs b/bindings/python/ges.defs
index d38d442..d397e37 100644
--- a/bindings/python/ges.defs
+++ b/bindings/python/ges.defs
@@ -1106,6 +1106,14 @@
 )
 
 
+(define-method objects_set_locked
+  (of-object "GESTimelineObject")
+  (c-name "ges_timeline_object_objects_set_locked")
+  (return-type "none")
+  (parameters
+    '("gboolean" "locked")
+  )
+)
 
 ;; From ges-timeline-operation.h
 
diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt
index 32686fc..f7e5af2 100644
--- a/docs/libs/ges-sections.txt
+++ b/docs/libs/ges-sections.txt
@@ -324,6 +324,7 @@ ges_timeline_object_get_track_objects
 ges_timeline_object_set_layer
 ges_timeline_object_set_moving_from_layer
 ges_timeline_object_set_priority
+ges_timeline_object_lock_track_objects
 GESTimelineObjectPrivate
 GES_IS_TIMELINE_OBJECT
 GES_IS_TIMELINE_OBJECT_CLASS
diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c
index dc7b693..62416d1 100644
--- a/ges/ges-timeline-object.c
+++ b/ges/ges-timeline-object.c
@@ -1342,6 +1342,29 @@ ges_timeline_object_copy (GESTimelineObject * object, gboolean * deep)
   return ret;
 }
 
+/**
+ * ges_timeline_object_objects_set_locked:
+ * @object: the #GESTimelineObject
+ * @locked: whether the #GESTrackObject contained in @object are locked to it.
+ *
+ * Set the locking status of all the #GESTrackObject contained in @object to @locked.
+ * See the ges_track_object_set_locked documentation for more details.
+ *
+ * Since: 0.10.XX
+ */
+void
+ges_timeline_object_objects_set_locked (GESTimelineObject * object,
+    gboolean locked)
+{
+  GList *tmp;
+
+  g_return_if_fail (GES_IS_TIMELINE_OBJECT (object));
+
+  for (tmp = object->priv->mappings; tmp; tmp = g_list_next (tmp)) {
+    ges_track_object_set_locked (((ObjectMapping *) tmp->data)->object, locked);
+  }
+}
+
 static void
 update_height (GESTimelineObject * object)
 {
diff --git a/ges/ges-timeline-object.h b/ges/ges-timeline-object.h
index 024b20e..3c707ff 100644
--- a/ges/ges-timeline-object.h
+++ b/ges/ges-timeline-object.h
@@ -293,6 +293,8 @@ ges_timeline_object_set_supported_formats (GESTimelineObject * self,
 GESTimelineObject *
 ges_timeline_object_split(GESTimelineObject * self, gint64 position);
 
+void
+ges_timeline_object_objects_set_locked      (GESTimelineObject * object, gboolean locked);
 G_END_DECLS
 
 #endif /* _GES_TIMELINE_OBJECT */



More information about the gstreamer-commits mailing list