Skip to content

decklink: Auto-detect 10-bit YUV

Eric Knapp requested to merge emkman99/gstreamer:decklink-detect-format into main

This fixes playback of 10-bit YUV sources since 34c60637.

The decklink API was updated from version 11.2 to 12.2.2 in 34c60637. Bit depth was added to the detected input format flags in version 11.6. decklinkvideosrc currently only auto-detects RGB vs YUV (always 8-bit), which results in 10-bit YUV input being set as 8-bit YUV. This results in Decklink repeatedly calling VideoInputFormatChanged, trying to set 10-bit. decklinkaudiosrc drops audio packets due to the constant input format changes.

This demonstrates the issue using a 10-bit YUV source (1080p60, 1080p59.94, 720p60, 720p59.94):

GST_DEBUG=4 gst-launch-1.0 decklinkvideosrc mode=auto drop-no-signal-frames=true ! videoconvert ! queue ! autovideosink decklinkaudiosrc ! queue ! autoaudiosink

After 34c60637, audio packets are frequently dropped and this message is repeatedly logged: "decklink gstdecklink.cpp:1095:VideoInputFormatChanged: Video input format changed."

Merge request reports