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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Радомир Хаџић
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.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

bbc82b81-e43f-485c-9c2b-6c08eda3b54c.jpeg (84K) Download Attachment
main.c (16K) Download Attachment