ges_timeline_object_create_track_objects_func (GESTimelineObject
* object, GESTrack * track);
+static void
+track_object_priority_offset_changed_cb (GESTrackObject * child,
+ GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * obj);
+
G_DEFINE_TYPE (GESTimelineObject, ges_timeline_object, G_TYPE_OBJECT);
enum
GST_DEBUG ("Returning trobj:%p", trobj);
+ g_signal_connect (G_OBJECT (trobj), "notify::priority-offset", G_CALLBACK
+ (track_object_priority_offset_changed_cb), object);
+
return TRUE;
}
return ret;
}
+
+static void
+track_object_priority_offset_changed_cb (GESTrackObject * child,
+ GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * obj)
+{
+ guint new, old;
+
+ /* all track objects have height 1 */
+ new = GES_TRACK_OBJECT_PRIORITY_OFFSET (child) + 1;
+ old = GES_TIMELINE_OBJECT_HEIGHT (obj);
+
+ GST_LOG ("object %p, new=%d, old=%d", obj, new, old);
+
+ if (new > old) {
+ obj->height = new;
+ GST_LOG ("emitting notify signal");
+ g_object_notify ((GObject *) obj, "height");
+ }
+}