How to pause and stop pipeline that records audio and video, while also showing preview of the video?

Радомир Хаџић radomirhadzic46 at gmail.com
Sat Jun 29 12:43:00 UTC 2019


I have a pipeline that looks like attached JPEG. The purpose of the
pipeline is to record video and audio and save that recording to a
file.
I have also included the example program so you can see the pipeline
in action and also test all problems I have encountered. The example
program also contains GTK GUI that allows you to pause and stop the
recording. Pausing is achieved by closing both valve elements, while
stopping is achieved by sending EOS to the pipeline (including
matroskamux seperately in case valves are closed).

There are 4 problems:
1. If you just start the program and click "Stop" the produced file is
corrupted.
2. If you pause the program by clicking "Pause" the preview will also
pause, which is not something that I want.
3. If you click "Pause" and then "Stop" the program will freeze.
4. Whenever the recording was paused there will be errors in the saved file.
Notice that 4 does not refer to frozen frames, I know why that happens
and that's not an error.
Use video player MPV to test for these errors, others that I tried
(Parole and Totem) don't display these errors, at least not by
default.

Please, help if you can. Also,  if you comment audio parts so the
pipeline just records video no problems at all are present.

Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbc82b81-e43f-485c-9c2b-6c08eda3b54c.jpeg
Type: image/jpeg
Size: 63371 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190629/5b9a20d5/attachment-0001.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 12260 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190629/5b9a20d5/attachment-0001.c>


More information about the gstreamer-devel mailing list