<div dir="ltr">Hello,<div><br></div><div>Usually, the usual way is to wait for a seek you send to be executed (by waiting for ASYNC_DONE message on the bus), meanwhile the seek should not be pushed to the pipeline (usually we just keep the last one, and send it when previous one is done).</div><div><br></div><div>BR,</div><div><br></div><div>Thibault</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 25, 2020 at 8:51 PM Nelu <<a href="mailto:NeluCociag@gmail.com">NeluCociag@gmail.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">Hello,<br>
I use the timeline editing functions and I have problems when inserting a<br>
high-resolution audio-video clip, and in a portion over the video, I insert<br>
2-3 png images. Problems occur when I seek over the portion where the images<br>
are placed, then there is a delay of 2-3 seconds and after that, the last<br>
images from the seek operation comes on. Has anyone encountered a similar<br>
problem? Looks like seek operations are stored in a cache ... is there a<br>
possibility to clear this cache?<br>
The code used to insert the video file and the images are as below:<br>
<br>
        timeline = ges_timeline_new();<br>
        tracka = GES_TRACK(ges_audio_track_new());<br>
        trackv = GES_TRACK(ges_video_track_new());<br>
<br>
        /* We are only going to be doing one layer of clips */<br>
        layer1 = ges_layer_new();<br>
        layerImg1 = ges_layer_new();<br>
        layerImg2 = ges_layer_new();<br>
        layerImg3 = ges_layer_new();<br>
<br>
        g_object_set(layerImg1, "priority", 1, NULL);<br>
        g_object_set(layerImg2, "priority", 2, NULL);<br>
        g_object_set(layerImg3, "priority", 3, NULL);<br>
        g_object_set(layer1, "priority", 4, NULL);<br>
<br>
<br>
        /* Add the tracks and the layer to the timeline */<br>
        if (!ges_timeline_add_layer(timeline, layer1))  return -1;<br>
        if (!ges_timeline_add_layer(timeline, layerImg1)) return -1;<br>
        if (!ges_timeline_add_layer(timeline, layerImg2)) return -1;<br>
        if (!ges_timeline_add_layer(timeline, layerImg3)) return -1;<br>
<br>
        if (!ges_timeline_add_track(timeline, tracka))          return -1;<br>
        if (!ges_timeline_add_track(timeline, trackv))          return -1;<br>
<br>
        //Insert first video file there<br>
        gchar *uri1 = gst_filename_to_uri("C:\\KSV1\\GuitarChops.mp4", NULL);<br>
        GESUriClip *src1 = ges_uri_clip_new(uri1);<br>
        g_assert(src1);<br>
        g_free(uri1);<br>
        g_object_set(src1, "start", 0, "duration", 30 * GST_SECOND, NULL);<br>
        ges_layer_add_clip(layer1, (GESClip *)src1);<br>
<br>
<br>
        //Insert some png image on top of the video<br>
        gchar *uri_png = gst_filename_to_uri("C:\\KSV1\\overlay1.png", NULL);<br>
        GESUriClip *src_png = ges_uri_clip_new(uri_png);<br>
        ges_uri_clip_set_is_image(src_png, true);<br>
        g_free(uri_png);<br>
        g_object_set(src_png, "start", 10 * GST_SECOND + 1, "in-point", 0,<br>
                "duration", 8 * GST_SECOND + 1, NULL);<br>
        ges_layer_add_clip(layerImg1, GES_CLIP(src_png));<br>
        uri_png = gst_filename_to_uri("C:\\KSV1\\overlay2.png", NULL);<br>
        src_png = ges_uri_clip_new(uri_png);<br>
        ges_uri_clip_set_is_image(src_png, true);<br>
        g_free(uri_png);<br>
        g_object_set(src_png, "start", 10 * GST_SECOND + 1, "in-point", 0,<br>
                "duration", 8 * GST_SECOND + 1, NULL);<br>
        ges_layer_add_clip(layerImg2, GES_CLIP(src_png));<br>
        uri_png = gst_filename_to_uri("C:\\KSV1\\overlay3.png", NULL);<br>
        src_png = ges_uri_clip_new(uri_png);<br>
        ges_uri_clip_set_is_image(src_png, true);<br>
        g_free(uri_png);<br>
        g_object_set(src_png, "start", 10 * GST_SECOND + 1, "in-point", 0,<br>
                "duration", 8 * GST_SECOND + 1, NULL);<br>
        ges_layer_add_clip(layerImg3, GES_CLIP(src_png));<br>
<br>
and the seeking operation is done with:<br>
                gst_element_seek(GST_ELEMENT(gesPipeline), 1.0, GST_FORMAT_TIME,<br>
GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_NONE, 0);<br>
<br>
Thanks,<br>
Nelu<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>