Question about pipeline architecture/logic

Philippe Normand phil at base-art.net
Fri Apr 23 09:41:17 UTC 2021


On Thu, 2021-04-22 at 20:21 +0000, Alix Bott via gstreamer-devel wrote:
> Hi, I am new to GStreamer and I am developing a program with it, and
> I am struggling to translate my logic to the pipeline paradigm.
> My program is a screen recorder that keeps a 30s backlog of video.
> When the user presses a button, the backlog is saved to a file.
> 
> My idea to solve this was to have a pipeline like this:
> windowsrc -> videoconvert -> nvenc -> h264parse -> queue -> tee​
> The queue serves as the backlog, and I dynamically attach a
> mp4mux/filesink after the tee when the button is pressed.
> 
> This seems to work, however the video takes 30s to save since it has
> to wait until the queue spitted out 30s of video.

Ah sorry, nevermind, sync is already FALSE by default :)

> I thought about simply emptying the whole queue at once, but then I
> wouldn't be able to press the button multiple times in less than 30s.
> I looks to me as if I need to somehow copy the queue and its data
> along with it to let the copy empty all at once in the filesink while
> keeping the backlog intact.
> 
> Is it possible to do this? Do I need a different pipeline
> architecture? Or will I have to use appsinks and appsrcs and patch
> together my own ring buffer implementation?
> _______________________________________________
> 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