GNOME Bugzilla – Bug 725175
Decklinksrc segfaults on Linux Mint 16
Last modified: 2014-06-22 13:08:28 UTC
On Linux Mint 16 with a Blackmagic Decklink Mini Recorder, the decklinksrc plugin segfaults instantly, even with a command as simple as: $ gst-launch-1.0 decklinksrc Setting pipeline to PAUSED ... Caught SIGSEGV Spinning. Please run 'gdb gst-launch-1.0 13694' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core. A GStreamer-based program I'm developing also segfaults when using decklinksrc. Blackmagic's Media Express program works perfectly, and can capture video from the attached HDMI camera. I installed gst-plugins-bad 1.2.3 from source and got the same error message, I've since reverted back to 1.2.0.
Backtrace: https://gist.github.com/hunternet93/118789dc80f8de9c1f17 Please let me know if more information, testing, bribes, etc are needed.
It appears my Blackmagic card may be faulty, so closing for now.
After purchasing another DeckLink, I have the same issue. Media Express (Blackmagic's capture application) works fine, decklinksrc segfaults. I installed Gstreamer and plugins from git head, which has the same issue. Backtrace: https://gist.github.com/hunternet93/6ab54c2ff79e090dba33 The problematic line seems to be gstdecklinksrc.cpp:467, which sets the DeckLink connection type. The DeckLink API docs are on Blackmagic's website, here: http://www.blackmagicdesign.com/support/detail/register?sid=3945&fid=0&did=59001&alt=true&sdk=true (unfortunately, registration is required). Please let me know if any more info or testing is needed.
Fixed! Not sure what exactly was wrong, for some reason Blackmagic's driver didn't like how the config interface was retrieved, I changed the code to reflect the method specified in the manual. Patch below, what's t diff --git a/sys/decklink/gstdecklinksrc.cpp b/sys/decklink/gstdecklinksrc.cpp index 7c2683a..2e4bdea 100644 --- a/sys/decklink/gstdecklinksrc.cpp +++ b/sys/decklink/gstdecklinksrc.cpp @@ -416,6 +416,8 @@ gst_decklink_src_start (GstElement * element) BMDVideoConnection conn; BMDAudioConnection aconn; + int64_t currentVideoInputConnection; + GST_DEBUG_OBJECT (decklinksrc, "start"); decklinksrc->decklink = gst_decklink_get_nth_device (decklinksrc->device_number); @@ -433,7 +435,7 @@ gst_decklink_src_start (GstElement * element) return FALSE; } - decklinksrc->config = gst_decklink_get_nth_config (decklinksrc->device_number); + decklinksrc->decklink->QueryInterface (IID_IDeckLinkConfiguration, (void**)&decklinksrc->config); config = decklinksrc->config; switch (decklinksrc->connection) { @@ -463,7 +465,8 @@ gst_decklink_src_start (GstElement * element) aconn = bmdAudioConnectionAnalog; break; } - + config->GetInt (bmdDeckLinkConfigVideoInputConnection, ¤tVideoInputConnection); + GST_DEBUG ("current video connection: %i", int(currentVideoInputConnection)); ret = config->SetInt (bmdDeckLinkConfigVideoInputConnection, conn); if (ret != S_OK) { GST_ERROR ("set configuration (input source)");
Thanks for tracking down the problem and posting your solution. Let's keep the bug open until a fix has actually been committed to GStreamer though :)
I tracked down the actual cause of the issue (which caused another problem as well) and created another patch, here: https://bugzilla.gnome.org/show_bug.cgi?id=727306 I'm closing this bug, this patch is now unnecessary.