2.4.6 Automatic Mode Detection¶
The automatic mode detection feature will notify an application when a property of the video input signal changes. This feature is supported on certain DeckLink devices. For an example of using automatic mode detection, please refer the AutomaticModeDetection sample in the DeckLink SDK.
To use this feature please refer to the following steps:
Call
IDeckLinkProfileAttributes::GetFlag()
with theBMDDeckLinkSupportsInputFormatDetection
flag to check that the DeckLink hardware supports the automatic format detection feature.Create a callback class that subclasses from
IDeckLinkInputCallback
and implements all of its methods. TheIDeckLinkInputCallback::VideoInputFormatChanged()
method will be called when a change in the property of the video signal has been detected.Install a callback by calling
IDeckLinkInput::SetCallback()
and referencing an instance of your callback class.Call
IDeckLinkInput::EnableVideoInput()
with an initial video mode and pixel format and set thebmdVideoInputEnableFormatDetection
flag.Call
IDeckLinkInput::StartStreams()
to begin capture.
While the input streams are running:
If a change in a property of the input video signal is detected then
IDeckLinkInputCallback::VideoInputFormatChanged()
will be called in your callback object with the new video properties provided in the parameters.
If the video mode or pixel format has changed, then the following sequence could be used to restart capture with the new settings:
Call
IDeckLinkInput::EnableVideoInput()
with the detected video mode and pixel format.Call
IDeckLinkInput::StopStreams()
to stop capture.