mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
ges: Keep the track object list sorted in track
This commit is contained in:
parent
32ce69684c
commit
9413d9f9e9
1 changed files with 18 additions and 0 deletions
|
@ -69,6 +69,9 @@ static void
|
|||
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,
|
||||
|
@ -409,6 +412,12 @@ ges_track_add_object (GESTrack * track, GESTrackObject * object)
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -534,6 +543,15 @@ composition_duration_cb (GstElement * composition,
|
|||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue