After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680700 - decklinksrc: does not forward EOS events passed via send_event
decklinksrc: does not forward EOS events passed via send_event
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 1.2.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-27 12:14 UTC by rubenrua
Modified: 2013-12-16 09:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow decklinksrc to process EOS even when video isn't flowing (1.94 KB, patch)
2013-12-14 23:26 UTC, Todd Agulnick
committed Details | Review

Description rubenrua 2012-07-27 12:14:45 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.
Comment 1 Tim-Philipp Müller 2013-03-16 23:40:41 UTC
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
Comment 2 Todd Agulnick 2013-12-12 22:38:31 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2013-12-14 17:43:51 UTC
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?
Comment 4 Todd Agulnick 2013-12-14 18:59:06 UTC
That did the trick! Thanks!
Comment 5 Todd Agulnick 2013-12-14 23:26:39 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2013-12-15 09:15:54 UTC
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