Terminate pipeline after fixed time

Michael Gruner michael.gruner at ridgerun.com
Wed Jun 9 14:36:05 UTC 2021

If you don’t need buffer-level precision, you can try using g_timeout_add_seconds. That will allow you to install a callback that will be invoked after N seconds. From there you can stop the pipeline.


> On 9 Jun 2021, at 02:40, Vinayak Agarwal via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> I am trying to composite multiple videos and then filesink them in C application. I wanted to know how to terminate the pipeline after a fixed time (say 10s). I tried using the GST_MESSAGE_DURATION event and terminating from there, but the file is created but not written to. I think I need to somehow signal to the file sink element to flush the data before termination.
> Any help would be appreciated. Thanks!
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

More information about the gstreamer-devel mailing list