ges: launcher: Make +effect stack effects from source to last effect added

Until now when doing `+test-clip blue +effect effect1 + effect effect2`
leaded to the following pseudo pipeline

   videotestsrc ! effect2 ! effect1

given the `ges-launch` syntax this is quite unexpected and this needed
fixing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5735>
This commit is contained in:
Thibault Saunier 2023-06-20 16:36:38 -04:00 committed by GStreamer Marge Bot
parent 8cf17e5d0d
commit 5575d9cb02

View file

@ -987,9 +987,23 @@ _ges_container_add_child_from_struct (GESTimeline * timeline,
}
res = ges_container_add (container, child);
if (GES_IS_CLIP (container) && GES_IS_BASE_EFFECT (child)) {
GList *effects = ges_clip_get_top_effects (GES_CLIP (container));
res =
ges_clip_add_top_effect (GES_CLIP (container), GES_BASE_EFFECT (child),
0, error);
g_list_free_full (effects, gst_object_unref);
} else {
res = ges_container_add (container, child);
}
if (res == FALSE) {
g_error_new (GES_ERROR, 0, "Could not add child to container");
if (!*error)
*error = g_error_new (GES_ERROR, 0, "Could not add child to container");
goto beach;
} else {
g_object_set_qdata (G_OBJECT (timeline), LAST_CHILD_QDATA, child);
}