Page 1 of 1

VideoInputFormatChanged is called WAY TOO OFTEN

PostPosted: Thu Jul 08, 2021 11:07 am
by thomaspontal
Hello Blackmagic Design team,

I think I have found a problem with the latest version of Desktop Video (v12.1): the function VideoInputFormatChanged is called every 3 or 4 frames whereas the input format has not changed.

This was not the case with previous versions of Desktop Video.

I found this problem on 2 devices I tested: Intensity Shuttle 3.0 and DeckLink Quad HDMI Recorder

Hope you can fix that in the next version of Desktop Video.

Hope you will also offer a new external HDMI capture device that we can plug via USB (like the discontinued Intensity Shuttle 3.0) because that's very convenient (and it enables to use laptop PCs)

Regards,

Thomas.

Re: VideoInputFormatChanged is called WAY TOO OFTEN

PostPosted: Mon Jul 19, 2021 4:12 am
by Cameron Nichols
Hi Thomas,

Please be aware there was change in 11.6 that introduced new video input format changed flags for color depth (refer to DeckLink SDK Manual, section 3.26 - Detected Video Input Format Flags):
  • bmdDetectedVideoInput12BitDepth
  • bmdDetectedVideoInput10BitDepth
  • bmdDetectedVideoInput8BitDepth
This change has impact on IDeckLinkInputCallback::VideoInputFormatChanged as an event will occur if the enabled pixel format does not match the bit depth on the wire. You can work around this by maintaining a local member of type BMDPixelFormat, and only calling IDeckLinkInput::EnableVideoInput on colorspace change, not on depth change. Please refer to samples FileCapture (Win/Mac) or Capture (Linux) for examples how to handle new detection flags when the required pixel format has depth different to input.

Applications built against Desktop Video SDK versions earlier than 11.6 will continue to operate without change necessary.

Regards
Cameron

Re: VideoInputFormatChanged is called WAY TOO OFTEN

PostPosted: Mon May 02, 2022 8:16 pm
by Joe Bay
Hi Cameron,

Is there any sample code that can be provided for this? I'm trying to figure out why I'm getting these useless calls with no success. The format flags aren't changing for the different flags in the callback.

Shouldn't the callback only be fired if the flags changed? The name of the function is `VideoInputFormatChanged`.

Some example code on how to bypass these functions would be useful.

Thanks,
Joe

Cameron Nichols wrote:Hi Thomas,

Please be aware there was change in 11.6 that introduced new video input format changed flags for color depth (refer to DeckLink SDK Manual, section 3.26 - Detected Video Input Format Flags):
  • bmdDetectedVideoInput12BitDepth
  • bmdDetectedVideoInput10BitDepth
  • bmdDetectedVideoInput8BitDepth
This change has impact on IDeckLinkInputCallback::VideoInputFormatChanged as an event will occur if the enabled pixel format does not match the bit depth on the wire. You can work around this by maintaining a local member of type BMDPixelFormat, and only calling IDeckLinkInput::EnableVideoInput on colorspace change, not on depth change. Please refer to samples FileCapture (Win/Mac) or Capture (Linux) for examples how to handle new detection flags when the required pixel format has depth different to input.

Applications built against Desktop Video SDK versions earlier than 11.6 will continue to operate without change necessary.

Regards
Cameron

Re: VideoInputFormatChanged is called WAY TOO OFTEN

PostPosted: Fri May 06, 2022 6:34 am
by Cameron Nichols
Hi Joe,

You can find examples of IDeckLinkInputCallback::VideoInputFormatChanged in CapturePreview and FileCapture SDK samples.

CapturePreview demonstrates selecting input pixel format based on colorspace and bit depth of the detected signal.

FileCapture uses 2 pixel formats for each colorspace (one for YCbCr 4:2:2, the other for RGB 4:4:4) and uses member variable (m_pixelFormat) to detect change in colorspace and ignore change in bit depth.

Regards
Cameron