<div dir="ltr"><div>Hi,</div><div><br></div><div>You should obviously be able to have several clips on a single layer, please provide a backtrace if you get a segfault.</div><div><br></div><div>Note that you should use `ges_timeline_append_layer` and do not take care of setting layer priority which is now deprecated.</div><div><br></div><div>Transition can happen only on a single layer, also you should use the timeline `auto-transition` option so the feature is much more simple to use (and usually does the right thing).</div><div><br></div><div>If you want to create a crossfade between layers you can interpolate the `alpha` child property of the video source as explained in a previous mail.</div><div><br></div><div>- Thibault<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 1, 2020 at 10:39 AM xmufzy <<a href="mailto:xmufzy@foxmail.com">xmufzy@foxmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
I try with ges in c codes, the follow code would segmentation fault, but if<br>
I add a new layer for each clip, it'll work fine, what's the problem?<br>
And from examples/c/transition.c I find that I can only add transition for<br>
single layer, is it right?<br>
<br>
priority=2;<br>
gchar *uri = gst_filename_to_uri ("./poc_backgroup.mp4", NULL);<br>
GESUriClip *src = ges_uri_clip_new (uri);<br>
g_assert (src);<br>
g_free (uri);<br>
//g_object_set (layer, "priority",priority,NULL);<br>
g_object_set (src, "start",offset, "priority",priority,NULL);<br>
ges_layer_add_clip (layer, (GESClip *) src);<br>
<br>
//layer = ges_layer_new ();<br>
//if (!ges_timeline_add_layer (timeline, layer))<br>
// return -1;<br>
offset+=2*GST_SECOND;<br>
inpoint=3*GST_SECOND;<br>
duration=9*GST_SECOND;<br>
priority=1;<br>
uri = gst_filename_to_uri ("./poc_backgroup.mp4", NULL);<br>
src = ges_uri_clip_new (uri);<br>
g_assert (src);<br>
g_free (uri);<br>
g_object_set (src, "start",offset,"in-point", inpoint,"duration" ,<br>
duration, "priority",priority,NULL);<br>
ges_layer_add_clip (layer, (GESClip *) src);<br>
ges_timeline_element_set_child_properties (GES_TIMELINE_ELEMENT<br>
((GESClip*)src), "posx", 100, "posy", 100, "width",200,"height",200, NULL);<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>