Question about pipeline architecture/logic
bott.alix at outlook.fr
Thu Apr 22 20:21:34 UTC 2021
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.
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel