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 770282 - decklinkvideosink: "Failed to schedule frame" and Decklink Duo 2
decklinkvideosink: "Failed to schedule frame" and Decklink Duo 2
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.9.1
Other Linux
: Normal major
: 1.8.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-23 15:15 UTC by Mark Kennedy
Modified: 2016-09-12 10:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mark Kennedy 2016-08-23 15:15:44 UTC
I'm doing a very simple playout test with my shiny new Decklink Duo 2 card (4 x bidirectional SDI ports).

```
gst-launch-1.0 \
  videotestsrc pattern=smpte100 is-live=true do-timestamp=true \
  ! video/x-raw, width=1280, height=720, framerate=60/1, interlace-mode=progressive \
  ! decklinkvideosink mode=720p60 device-number=3
```

On earlier decklink models (e.g. Decklink Quad or Mini monitor) and Gstreamer (+plugins-bad) 1.6.4, this would output 720p60 video on the correct SDI port, which I could monitor using any auto format detecting SDI monitor (such as BM Video Assist).

With the Duo 2 I get a fatal 'Failed to schedule frame 0x80000008' error which appears to be the result of the BMD SDK's ScheduleVideoFrame returning FAIL.

I do appear to get a single frame on the output before the pipeline bombs.

See GST_DEBUG=decklink*:6 output here:

https://gist.github.com/mrmonkington/cf16fc4f5ed6a490c948f108074d63d5

I'm on Ubuntu 16.04 (Linux 4.4.0-34-generic x86_64). I have two Duo 2 cards installed. I have the cards configured using the BMD tools as 4 unlinked ports each, though linking the ports makes no difference.

I've tried Gstreamer (+plugins-bad) 1.9.1 (from ricotz Ubuntu Experimental PPA build 1.9.1.1+git20160821.89554f66-0ubuntu1~16.04~ricotz0) and building gst-plugins-bad master myself today from source. 1.8.2 gives the same error on completely vanilla install. I haven't built gstreamer in entirety from master.

The Blackmagic SDK Samples can drive the outputs correctly with test patterns. bmdplay from bmdtools also works built against the current SDK.

I have tried building gst-plugins-bad against the latest Blackmagic SDK drivers which results in an identical schedule error (after making some tweaks to DeckLinkAPIDispatch.cpp to get it to build).
Comment 1 Sebastian Dröge (slomo) 2016-08-23 15:56:05 UTC
This error usually means that we schedule too many frames too fast, and the internal queue of the hardware/driver overflows.
Comment 2 Sebastian Dröge (slomo) 2016-08-26 11:36:14 UTC
I can reproduce this here unfortunately. Kernel log mentions "BlackmagicIO: WARNING: Ran out of free frames"
Comment 3 Sebastian Dröge (slomo) 2016-08-26 12:50:16 UTC
commit 3b7e0d7de32f0728259d601daa13b9eeec3dd3ce
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Aug 26 15:48:36 2016 +0300

    decklinkvideosink: Scale down scheduled frame times to milliseconds
    
    Scale down to milliseconds, otherwise at least some hardware has problems
    scheduling the frames (or schedules them too slow) and we run out of available
    frames.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770282
Comment 4 Sebastian Dröge (slomo) 2016-09-12 10:20:50 UTC
Reverted because:

commit 95eb492c32fc30e9969f8d738a1d30f709582fbb
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Sep 12 12:19:50 2016 +0200

    Revert "decklinkvideosink: Scale down scheduled frame times to milliseconds"
    
    This reverts commit 3b7e0d7de32f0728259d601daa13b9eeec3dd3ce.
    
    It was a bug in the driver and is supposed to be fixed with 10.8 and newer.