VideoInputFormatChanged is called WAY TOO OFTEN

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

thomaspontal

  • Posts: 8
  • Joined: Mon Jun 10, 2013 1:41 pm

VideoInputFormatChanged is called WAY TOO OFTEN

PostThu Jul 08, 2021 11:07 am

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.
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 442
  • Joined: Mon Sep 04, 2017 4:05 am

Re: VideoInputFormatChanged is called WAY TOO OFTEN

PostMon Jul 19, 2021 4:12 am

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
Offline

Joe Bay

  • Posts: 3
  • Joined: Mon Nov 17, 2014 12:01 am

Re: VideoInputFormatChanged is called WAY TOO OFTEN

PostMon May 02, 2022 8:16 pm

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
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 442
  • Joined: Mon Sep 04, 2017 4:05 am

Re: VideoInputFormatChanged is called WAY TOO OFTEN

PostFri May 06, 2022 6:34 am

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

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 21 guests