pad_removed_cb (GstElement * element, GstPad * pad, GESTrack * track);
static void composition_duration_cb (GstElement * composition, GParamSpec * arg
G_GNUC_UNUSED, GESTrack * obj);
+static void
+sort_track_objects_cb (GESTrackObject * child,
+ GParamSpec * arg G_GNUC_UNUSED, GESTrack * track);
static void
ges_track_get_property (GObject * object, guint property_id,
g_signal_emit (track, ges_track_signals[TRACK_OBJECT_ADDED], 0,
GES_TRACK_OBJECT (object));
+ g_signal_connect (GES_TRACK_OBJECT (object), "notify::start",
+ G_CALLBACK (sort_track_objects_cb), track);
+
+ g_signal_connect (GES_TRACK_OBJECT (object), "notify::priority",
+ G_CALLBACK (sort_track_objects_cb), track);
+
return TRUE;
}
}
}
+static void
+sort_track_objects_cb (GESTrackObject * child,
+ GParamSpec * arg G_GNUC_UNUSED, GESTrack * track)
+{
+ track->priv->trackobjects =
+ g_list_sort (track->priv->trackobjects,
+ (GCompareFunc) objects_start_compare);
+}
+
/**
* ges_track_get_caps:
* @track: a #GESTrack