On a Decklink Duo 2, I have a channel set up for input.
DoesSupportVideoMode returns bmdDisplayModeNotSupported for bmdModeHD720p5994 with bmdFormat8BitBGRA. So this is a supported mode for video capture.
The video frame return by my VideoInputFrameArrived callback has a height of 720, width of 1280. The row bytes is 5120. So all looks good.
However, the BGR bytes are all zeros and the A bytes are all some invalid large integer.
It may take several VideoInputFrameArrived callbacks before a valid frame is detected.
I added the test for bmdFrameHasNoInputSource. It appears that when I set the input to YUV and wait a few frames I begin receiving valid frames (bmdFrameHasNoInputSource not set). However, when I set the input to BGRA I never receive valid frames (bmdFrameHasNoInputSource set). Why would that be if BGRA is a supported input pixel format?
[*] detectedSignalFlags - the detected signal flags, from this you can determine whether you are receiving YCbCr 4:2:2 or RGB 4:4:4.
For this test, you need to call IDeckLinkInput::EnableVideoInput with a display mode other than bmdModeHD720p5994 for the VideoInputFormatChanged callback to trigger.
Maybe I am misunderstanding the pixel format parameter with EnableVideoInput. The video coming in is not BGRA, but I want to access each frame as BGRA in memory. I thought that this conversion would happen automatically, but is that incorrect? Is the pixel format paramter simply specifiying what format to expect on the input?
In other words, if the video is compressed and I want to get each frame as uncompressed, do I need to convert them to uncompressed BGRA myself? Is it not possible to call EnableVideoInput with the appropriate parameters so that the frames received by VideoInputFormatChanged are uncompressed?
If the incoming stream is YUV, you will need to use the IDeckLinkVideoConversion object interface to convert it to BGRA pixel format. We have a C# sample StillsCSharp that demonstrates how to convert a captured frame to BGRA, there are also C++ samples in the pipeline.
The DeckLink SDK does not support compressed streams.
Where can I find the mentioned StillsCSharp sdk?