GNOME Bugzilla – Bug 760594
decklinkvideosrc: does not support capture in RGB mode
Last modified: 2016-01-22 15:29:38 UTC
When capturing in auto mode, the capture card will indicate when the video mode changes. Additionally to the video mode it also provide some flags indicating if the new video format is RGB or YUV. The API user should configure the input video feed using those parameters and on Infinity Pro 4K, configuring the capture to use YUV when the API indicated that the format was RGB is just going to fail. To support this case we need to add support for RGB capture and proper configuration of the input source based not only on the mode but also the format.
Created attachment 318986 [details] [review] Implement RGB support for capture.
Review of attachment 318986 [details] [review]: Looks good in general, just some comments about (currently) unused code :) ::: sys/decklink/gstdecklink.cpp @@ +332,3 @@ + break; + case bmdFormat10BitYUV: /* 'v210' */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", NULL); v210 is "v210" and not UYVY @@ +341,3 @@ + break; + case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", NULL); "r210" @@ +344,3 @@ + break; + case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", NULL); We don't support this currently @@ +347,3 @@ + break; + case bmdFormat12BitRGBLE: /* 'R12L' Little-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", NULL); and neither this @@ +353,3 @@ + break; + case bmdFormat10BitRGBX: /* 'R10b' Big-endian 10-bit RGB with SMPTE video levels (64-940) */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", NULL); These two would be with GST_VIDEO_COLOR_RANGE_16_235 in the colorimetry probably (the naming is for the 8 bits range). And otherwise probably r210 for the BE one, and unsupported for the LE one
Created attachment 318987 [details] [review] Implement RGB support for capture.
You are absolutely right, looks like I sent an old patch without noticing. Here is a more recent one.
Comment on attachment 318987 [details] [review] Implement RGB support for capture. Great, go ahead :)
Commit: 3ea431c5b5425806b7139025b6f233999563594d Author: Julien Moutte <julien@ctondemand.com> Date: 13 January 2016 at 22:05:49 GMT+1 decklinkvideosrc: implement RGB capture support Combine mode and format to generate caps and support the flags from VideoChanged callback to support RGB capture. https://bugzilla.gnome.org/show_bug.cgi?id=760594