mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
layer: don't set timeline when moving clip
If a clip is moving we should not unset its timeline when it is removed from the layer. Logic has been moved to ges_timeline_add_clip and ges_timeline_remove_clip. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/169>
This commit is contained in:
parent
343e8581f2
commit
36223e25b9
2 changed files with 5 additions and 6 deletions
|
@ -508,10 +508,8 @@ ges_layer_remove_clip_internal (GESLayer * layer, GESClip * clip,
|
||||||
/* inform the clip it's no longer in a layer */
|
/* inform the clip it's no longer in a layer */
|
||||||
ges_clip_set_layer (clip, NULL);
|
ges_clip_set_layer (clip, NULL);
|
||||||
/* so neither in a timeline */
|
/* so neither in a timeline */
|
||||||
if (timeline) {
|
if (timeline)
|
||||||
ges_timeline_remove_clip (timeline, clip);
|
ges_timeline_remove_clip (timeline, clip);
|
||||||
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (tmp = GES_CONTAINER_CHILDREN (clip); tmp; tmp = tmp->next)
|
for (tmp = GES_CONTAINER_CHILDREN (clip); tmp; tmp = tmp->next)
|
||||||
ges_track_element_set_layer_active (tmp->data, TRUE);
|
ges_track_element_set_layer_active (tmp->data, TRUE);
|
||||||
|
@ -780,9 +778,6 @@ ges_layer_add_clip (GESLayer * layer, GESClip * clip)
|
||||||
|
|
||||||
ges_layer_resync_priorities (layer);
|
ges_layer_resync_priorities (layer);
|
||||||
|
|
||||||
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip),
|
|
||||||
layer->timeline);
|
|
||||||
|
|
||||||
/* FIXME: ideally we would only emit if we are going to return TRUE.
|
/* FIXME: ideally we would only emit if we are going to return TRUE.
|
||||||
* However, for backward-compatibility, we ensure the "clip-added"
|
* However, for backward-compatibility, we ensure the "clip-added"
|
||||||
* signal is released before the clip's "child-added" signal, which is
|
* signal is released before the clip's "child-added" signal, which is
|
||||||
|
|
|
@ -1681,6 +1681,8 @@ ges_timeline_add_clip (GESTimeline * timeline, GESClip * clip)
|
||||||
/* TODO: extend with GError ** argument, which is accepted by
|
/* TODO: extend with GError ** argument, which is accepted by
|
||||||
* ges_clip_add_child_to_track */
|
* ges_clip_add_child_to_track */
|
||||||
|
|
||||||
|
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip), timeline);
|
||||||
|
|
||||||
/* We make sure not to be connected twice */
|
/* We make sure not to be connected twice */
|
||||||
g_signal_handlers_disconnect_by_func (clip, clip_track_element_added_cb,
|
g_signal_handlers_disconnect_by_func (clip, clip_track_element_added_cb,
|
||||||
timeline);
|
timeline);
|
||||||
|
@ -1748,6 +1750,8 @@ ges_timeline_remove_clip (GESTimeline * timeline, GESClip * clip)
|
||||||
g_signal_handlers_disconnect_by_func (clip, clip_track_element_removed_cb,
|
g_signal_handlers_disconnect_by_func (clip, clip_track_element_removed_cb,
|
||||||
timeline);
|
timeline);
|
||||||
|
|
||||||
|
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip), NULL);
|
||||||
|
|
||||||
GST_DEBUG ("Done");
|
GST_DEBUG ("Done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue