gst-editing-services: ges: Add a track-object-added signal to GESTimelineObject

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


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

Author: Mathieu Duponchelle <seeed at laposte.net>
Date:   Sun Aug 28 06:25:37 2011 +0200

ges: Add a track-object-added signal to GESTimelineObject

API: GESTimelineObject::track-object-added signal

---

 ges/ges-timeline-object.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c
index 9ab8df3..1cb375c 100644
--- a/ges/ges-timeline-object.c
+++ b/ges/ges-timeline-object.c
@@ -100,6 +100,7 @@ enum
 {
   EFFECT_ADDED,
   EFFECT_REMOVED,
+  TRACK_OBJECT_ADDED,
   LAST_SIGNAL
 };
 
@@ -333,6 +334,20 @@ ges_timeline_object_class_init (GESTimelineObjectClass * klass)
       G_SIGNAL_RUN_FIRST, 0, NULL, NULL, ges_marshal_VOID__OBJECT,
       G_TYPE_NONE, 1, GES_TYPE_TRACK_EFFECT);
 
+  /**
+   * GESTimelineObject::track-object-added
+   * @object: the #GESTimelineObject
+   * @effect: the #GESTrackObject that was added.
+   *
+   * Will be emitted after a track object was added to the object.
+   *
+   * Since: 0.10.2
+   */
+  ges_timeline_object_signals[TRACK_OBJECT_ADDED] =
+      g_signal_new ("track-object-added", G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_FIRST, 0, NULL, NULL, ges_marshal_VOID__OBJECT,
+      G_TYPE_NONE, 1, GES_TYPE_TRACK_OBJECT);
+
   klass->need_fill_track = TRUE;
 }
 
@@ -408,7 +423,6 @@ ges_timeline_object_create_track_objects (GESTimelineObject * object,
     GST_WARNING ("no GESTimelineObject::create_track_objects implentation");
     return FALSE;
   }
-
   return klass->create_track_objects (object, track);
 }
 
@@ -537,7 +551,10 @@ ges_timeline_object_add_track_object (GESTimelineObject * object, GESTrackObject
       + mapping->priority_offset);
 
   GST_DEBUG ("Returning trobj:%p", trobj);
-
+  if (!GES_IS_TRACK_PARSE_LAUNCH_EFFECT (trobj)) {
+    g_signal_emit (object, ges_timeline_object_signals[TRACK_OBJECT_ADDED], 0,
+        GES_TRACK_OBJECT (trobj));
+  }
   return TRUE;
 }
 



More information about the gstreamer-commits mailing list