mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 20:25:25 +00:00
GESSimpleTimelineLayer: Recalculate positions when object duration change
This ensures that if someone changes the duration, the clips still remain contiguous and in the proper order.
This commit is contained in:
parent
6753d176d7
commit
2df711cd60
1 changed files with 3 additions and 0 deletions
|
@ -148,6 +148,7 @@ ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer * layer,
|
|||
layer->adding_object = FALSE;
|
||||
|
||||
GST_DEBUG ("Adding object %p to the list", object);
|
||||
|
||||
layer->objects = g_list_insert (layer->objects, object, position);
|
||||
|
||||
/* recalculate positions */
|
||||
|
@ -243,4 +244,6 @@ ges_simple_timeline_layer_object_added (GESTimelineLayer * layer,
|
|||
sl->objects = g_list_append (sl->objects, object);
|
||||
gstl_recalculate (sl);
|
||||
}
|
||||
g_signal_connect_swapped (object, "notify::duration",
|
||||
G_CALLBACK (gstl_recalculate), layer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue