2.5.10 IDeckLinkInputCallback Interface

The IDeckLinkInputCallback interface is a callback class which is called for each captured frame.An object with an IDeckLinkInputCallback interface may be registered as a callback with the IDeckLinkInput interface.

Related Interfaces

Interface

Interface ID

Description

IDeckLinkDisplayMode

IID_IDeckLinkDisplayMode

An IDeckLinkDisplayMode object interface is passed to IDeckLinkInputCallback::VideoInputFormatChanged()

IDeckLinkVideoInputFrame

IID_IDeckLinkVideoInputFrame

An IDeckLinkVideoInputFrame object interface is passed to IDeckLinkInputCallback::VideoInputFrameArrived()

IDeckLinkAudioInputPacket

IID_IDeckLinkAudioInputPacket

An IDeckLinkAudioInputPacket object interface is passed to IDeckLinkInputCallback::VideoInputFrameArrived()

IDeckLinkInput

IID_IDeckLinkInput

An IDeckLinkInputCallback object interface is registered with IDeckLinkInput::SetCallback()

2.5.10.1 IDeckLinkInputCallback::VideoInputFormatChanged method

HRESULT IDeckLinkInputCallback::VideoInputFormatChanged(BMDVideoInputFormatChangedEvents notificationEvents, IDeckLinkDisplayMode *newDisplayMode, BMDDetectedVideoInputFormatFlags detectedSignalFlags);

The VideoInputFormatChanged method is called when a video input format change has been detected by the hardware. This method is abstract in the base interface and must be implemented by the application developer. The result parameter (required by COM) is ignored by the caller.

To enable this feature, the bmdVideoInputEnableFormatDetection flag must set when calling IDeckLinkInput::EnableVideoInput().

Note

The video format change detection feature is not currently supported on all hardware. Check the BMDDeckLinkSupportsInputFormatDetection attribute to determine if this feature is supported for a given device and driver (see IDeckLinkProfileAttributes interface for details).

Parameters:
  • notificationEvents – The notification events that indicate the aspects of the incoming signal that have changed

  • newDisplayMode – The new display mode

  • detectedSignalFlags – The detected signal flags

2.5.10.2 IDeckLinkInputCallback::VideoInputFrameArrived method

HRESULT IDeckLinkInputCallback::VideoInputFrameArrived(IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioPacket);

The VideoInputFrameArrived method is called when a video input frame or an audio input packet has arrived.

This method is abstract in the base interface and must be implemented by the application developer. The result parameter (required by COM) is ignored by the caller.

Parameters:
  • videoFrame

    The video frame that has arrived. The video frame is only valid for the duration of the callback.

    To hold on to the video frame beyond the callback call IDeckLinkVideoInputFrame::AddRef, and to release the video frame when it is no longer required call IDeckLinkVideoInputFrame::Release.

    The video frame will be NULL under the following circumstances:

    • On Intensity Pro with progressive NTSC only, every video frame will have two audio packets.

    • With 3:2 pulldown there are five audio packets for each four video frames.

    • If video processing is not fast enough, audio will still be delivered.

  • audioPacket

    New audio packet - only valid if audio capture has been enabled with IDeckLinkInput::EnableAudioInput().

    The audio packet will be NULL under the following circumstances:

    • Audio input is not enabled.

    • If video processing is sufficiently delayed old video may be received with no audio.