Autodetect input display mode

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

Filipe Caldas

  • Posts: 3
  • Joined: Tue Nov 03, 2015 3:34 pm

Autodetect input display mode

PostTue Dec 08, 2015 3:33 pm

Hi,

I am working on an solution to analyse the output of an set-top box and since different models of this product work on different resolutions (depending on set-up options) I was wondering if there would be a way to automatically detect the input resolution that is being captured by the IntensityPro card.
Right now I pass it as a parameter to the routine that initializes the capture, but it would be good to have an automatic way to do that.

Code: Select all
   if(isFullHD){
      selectedDisplayMode = bmdModeHD1080i50;
   }else{
      selectedDisplayMode = bmdModeHD720p50;
   }
        result = deckLinkInput->EnableVideoInput(selectedDisplayMode, pixelFormat,inputFlags);



Thanks in advance,
Filipe Caldas
Offline

Nicholas Gill

Blackmagic Design

  • Posts: 169
  • Joined: Mon May 04, 2015 10:28 pm

Re: Autodetect input display mode

PostFri Dec 11, 2015 3:58 am

Hi Filipe,

The older Intensity Pro (i.e. not the 4K version) does not support Automatic Mode Detection[1].

The Intensity Pro 4K (and other 4K devices) support input format detection, the SDK manual section "Automatic Mode Detection" gives a high-level overview, while the SDK example 'AutomaticModeDetection' presents a code example.

With the Intensity Pro, it may be possible to emulate this feature by cycling through a list of expected video modes, calling EnableVideoInput, and checking for the absence of the bmdFrameHasNoInputSource[2] flag on the IDeckLinkVideoInputFrame[3] in the IDeckLinkInputCallback::VideoInputFrameArrived callback.

When video input is enabled and frames are captured with a valid input source, your application has determined the input video mode.

Cheers,

-nick

[1] 2.4.6 Automatic Mode Detection
[2] 2.7.6 Frame Flags
[3] 2.5.11 IDeckLinkVideoInputFrame Interface
[4] 2.5.10.1 IDeckLinkInputCallback::VideoInputFrameArrived method
Offline
User avatar

Fritjof Jonsson

  • Posts: 13
  • Joined: Thu Mar 28, 2013 10:47 am
  • Location: Sweden

Re: Autodetect input display mode

PostThu Jan 14, 2016 2:59 pm

Nicholas Gill wrote:Hi Filipe,

The older Intensity Pro (i.e. not the 4K version) does not support Automatic Mode Detection[1].

The Intensity Pro 4K (and other 4K devices) support input format detection, the SDK manual section "Automatic Mode Detection" gives a high-level overview, while the SDK example 'AutomaticModeDetection' presents a code example.

With the Intensity Pro, it may be possible to emulate this feature by cycling through a list of expected video modes, calling EnableVideoInput, and checking for the absence of the bmdFrameHasNoInputSource[2] flag on the IDeckLinkVideoInputFrame[3] in the IDeckLinkInputCallback::VideoInputFrameArrived callback.

When video input is enabled and frames are captured with a valid input source, your application has determined the input video mode.

Cheers,

-nick

[1] 2.4.6 Automatic Mode Detection
[2] 2.7.6 Frame Flags
[3] 2.5.11 IDeckLinkVideoInputFrame Interface
[4] 2.5.10.1 IDeckLinkInputCallback::VideoInputFrameArrived method



This is exactly how I do it, it works very well except for devices with analog inputs like the Intensity Shuttle.
There you always get valid frames on the analog connections.
Developer of LiveReplayer - livereplayer.com

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests