2.5.5 IDeckLinkVideoFrame Interface

The IDeckLinkVideoFrame interface represents a video frame.

The GetWidth, GetHeight methods may be used to determine the pixel dimensions of the frame buffer. Pixels on a given row are packed according to the pixel format returned by GetPixelFormat (see BMDPixelFormat for details).

Note

in some formats (HD720 formats, for example), there is padding between rows always use GetRowBytes to account for the row length, including padding.

Tip

Developers may sub-class IDeckLinkVideoFrame to provide an implementation which fits well with their application’s structure.

Related Interfaces

Interface

Interface ID

Description

IDeckLinkVideoOutputCallback

IID_IDeckLinkVideoOutputCallback

An IDeckLinkVideoFrame object interface is passed to IDeckLinkVideoOutputCallback::ScheduledFrameCompleted()

IDeckLinkOutput

IID_IDeckLinkOutput

An IDeckLinkVideoFrame object interface is displayed synchronously with IDeckLinkOutput::DisplayVideoFrameSync()

IDeckLinkOutput

IID_IDeckLinkOutput

An IDeckLinkVideoFrame object interface is scheduled for playback with IDeckLinkOutput::ScheduleVideoFrame()

IDeckLinkTimecode

IID_IDeckLinkTimecode

IDeckLinkVideoFrame::GetTimecode() outputs an IDeckLinkTimecode object interface

IDeckLinkVideoFrameAncillary

IID_IDeckLinkVideoFrameAncillary

IDeckLinkVideoFrame::GetAncillaryData() outputs an IDeckLinkVideoFrameAncillary object interface

IDeckLinkVideoFrameAncillaryPackets

IID_IDeckLinkVideoFrameAncillaryPackets

An IDeckLinkVideoFrameAncillaryPackets object interface may be obtained from IDeckLinkVideoFrame using QueryInterface

IDeckLinkVideoFrame3DExtensions

IID_IDeckLinkVideoFrame3DExtensions

An IDeckLinkVideoFrame3DExtensions object interface may be obtained from IDeckLinkVideoFrame using QueryInterface

IDeckLinkVideoFrameMetadataExtensions

IID_IDeckLinkVideoFrameMetadataExtensions

An IDeckLinkVideoFrameMetadataExtensions object interface may be obtained from IDeckLinkVideoFrame using QueryInterface

IDeckLinkVideoFrameMutableMetadataExtensions

IID_IDeckLinkVideoFrameMutableMetadataExtensions

An IDeckLinkVideoFrameMutableMetadataExtensions object interface may be obtained from IDeckLinkVideoFrame using QueryInterface

IDeckLinkVideoBuffer

IID_IDeckLinkVideoBuffer

An IDeckLinkVideoBuffer object interface may be obtained from IDeckLinkVideoFrame using QueryInterface

IDeckLinkMacVideoBuffer

IID_IDeckLinkMacVideoBuffer

An IDeckLinkMacVideoBuffer object interface may be obtained from IDeckLinkVideoFrame using QueryInterface

IDeckLinkMutableVideoFrame

IID_IDeckLinkMutableVideoFrame

IDeckLinkMutableVideoFrame subclasses IDeckLinkVideoFrame

IDeckLinkVideoInputFrame

IID_IDeckLinkVideoInputFrame

IDeckLinkVideoInputFrame subclasses IDeckLinkVideoFrame

IDeckLinkScreenPreviewCallback

IID_IDeckLinkScreenPreviewCallback

An IDeckLinkVideoFrame object interface is provided for rendering by IDeckLinkScreenPreviewCallback::DrawFrame()

IDeckLinkGLScreenPreviewHelper

IID_IDeckLinkGLScreenPreviewHelper

An IDeckLinkVideoFrame object interface is set for OpenGL preview with IDeckLinkGLScreenPreviewHelper::SetFrame()

IDeckLinkMetalScreenPreviewHelper

IID_IDeckLinkMetalScreenPreviewHelper

An IDeckLinkVideoFrame object interface is set for Metal preview with IDeckLinkMetalScreenPreviewHelper::SetFrame()

IDeckLinkDX9ScreenPreviewHelper

IID_IDeckLinkDX9ScreenPreviewHelper

An IDeckLinkVideoFrame object interface is set for DirectX preview with IDeckLinkDX9ScreenPreviewHelper::SetFrame()

IDeckLinkWPFDX9ScreenPreviewHelper

IID_IDeckLinkWPFDX9ScreenPreviewHelper

An IDeckLinkVideoFrame object interface is set for DirectX preview with IDeckLinkWPFDX9ScreenPreviewHelper::SetFrame()

IDeckLinkVideoConversion

IID_IDeckLinkVideoConversion

An IDeckLinkVideoFrame object interface is the source video frame for IDeckLinkVideoConversion::ConvertFrame()

IDeckLinkVideoConversion

IID_IDeckLinkVideoConversion

An IDeckLinkVideoFrame object interface is the destination video frame for IDeckLinkVideoConversion::ConvertFrame()

IDeckLinkVideoConversion

IID_IDeckLinkVideoConversion

IDeckLinkVideoConversion::ConvertNewFrame() outputs an IDeckLinkVideoFrame object interface

2.5.5.1 IDeckLinkVideoFrame::GetWidth method

long IDeckLinkVideoFrame::GetWidth();

The GetWidth method returns the width of a video frame.

Returns:

Video frame width in pixels

2.5.5.2 IDeckLinkVideoFrame::GetHeight method

long IDeckLinkVideoFrame::GetHeight();

The GetHeight method returns the height of a video frame.

Returns:

Video frame height in pixels

2.5.5.3 IDeckLinkVideoFrame::GetRowBytes method

long IDeckLinkVideoFrame::GetRowBytes();

The GetRowBytes method returns the number of bytes per row of a video frame.

Returns:

Number of bytes per row of video frame

2.5.5.4 IDeckLinkVideoFrame::GetPixelFormat method

BMDPixelFormat IDeckLinkVideoFrame::GetPixelFormat();

The GetPixelFormat method returns the pixel format of a video frame.

Returns:

Pixel format of video frame (BMDPixelFormat)

2.5.5.5 IDeckLinkVideoFrame::GetFlags method

BMDFrameFlags IDeckLinkVideoFrame::GetFlags();

The GetFlags method returns status flags associated with a video frame.

Returns:

Video frame flags (BMDFrameFlags)

2.5.5.6 IDeckLinkVideoFrame::GetTimecode method

HRESULT IDeckLinkVideoFrame::GetTimecode(BMDTimecodeFormat format, IDeckLinkTimecode **timecode);

The GetTimecode method returns the value specified in the ancillary data for the specified timecode type.

Parameters:
  • formatBMDTimecodeFormat to query

  • timecode – Pointer to IDeckLinkTimecode interface object containing the requested timecode or NULL if requested timecode is not available. This object must be released by the caller when no longer required.

Return values:
  • E_INVALIDARG – Either parameter format has an invalid value or parameter timecode variable is NULL

  • S_FALSE – The requested timecode format was not present in the ancillary data or was invalid.

  • S_OK – Success

2.5.5.7 IDeckLinkVideoFrame::GetAncillaryData method

HRESULT IDeckLinkVideoFrame::GetAncillaryData(IDeckLinkVideoFrameAncillary **ancillary);

The GetAncillaryData method returns a pointer to a video frame’s ancillary data.

Parameters:

ancillary – Pointer to a new IDeckLinkVideoFrameAncillary object. This object must be released by the caller when no longer required.

Return values:
  • S_FALSE – No ancillary data present.

  • S_OK – Success