GNOME Bugzilla – Bug 680700
decklinksrc: does not forward EOS events passed via send_event
Last modified: 2013-12-16 09:07:30 UTC
Force an EOS event on decklink source to shutting the pipeline down does not work. If you execute in CLI: $ gst-launch-0.10 -e decklinksrc ! fakesik The pipeline does not stop when you shut down forcefully via Control-C.
Should be fixed in git master now, please re-open if it still doesn't work right, thanks! commit 5dfc7c4bce583f7d2012290cd4d8d8eac9afe926 Author: Tim-Philipp Müller <tim@centricular.net> Date: Sat Mar 16 21:39:20 2013 +0000 decklinksrc: add send_event handler so application can inject EOS event This is needed to shut down a recording pipeline cleanly. https://bugzilla.gnome.org/show_bug.cgi?id=680700
This still seems to be a problem, testing against master and the 1.2 branch -- unclear whether it has regressed since the fix back in March. $ gst-launch-1.0 -e decklinksrc ! fakesink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ^Chandling interrupt. Interrupt: Stopping pipeline ... EOS on shutdown enabled -- Forcing EOS on the pipeline Waiting for EOS... [... pipeline continues running, so press ^C again... ] ^Chandling interrupt. Interrupt: Stopping pipeline ... Interrupt while waiting for EOS - stopping pipeline... Execution ended after 0:00:10.511435574 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... My very cursory investigation suggests that gst_decklink_src_send_event is not actually getting called with the EOS event.
This should fix it: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=234f3c73dc4ded22de9e5650865c45c5be4a0873 Can you confirm? If it still does not work, can you get a debug log with GST_DEBUG=6 and attach it here?
That did the trick! Thanks!
Created attachment 264207 [details] [review] Allow decklinksrc to process EOS even when video isn't flowing If video isn't flowing (because the camera isn't attached or the correct mode hasn't been specified, for example), decklinksrc won't process an EOS signal because it's stuck in a g_cond_wait waiting for the next video frame. The patch makes two changes: it signals on receipt of the EOS event, and it handles the processing of EOS in the main task before it tries to process the video frame. This is allows a clean shutdown. The cost here is that if there was a valid final video frame to process, it will be dropped on EOS. But that seems better than hanging dropping the EOS.
commit 44b94295161c2433b7f45ac882bc6c85b4c518de Author: Todd Agulnick <todd@agulnick.com> Date: Sat Dec 14 18:12:53 2013 -0500 decklinksrc: Process EOS even when there are no incoming video frames. https://bugzilla.gnome.org/show_bug.cgi?id=680700