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.
Interface |
Interface ID |
Description |
---|---|---|
IID_IDeckLinkVideoOutputCallback |
An |
|
IID_IDeckLinkOutput |
An |
|
IID_IDeckLinkOutput |
An |
|
IID_IDeckLinkTimecode |
|
|
IID_IDeckLinkVideoFrameAncillary |
|
|
IID_IDeckLinkVideoFrameAncillaryPackets |
An |
|
IID_IDeckLinkVideoFrame3DExtensions |
An |
|
IID_IDeckLinkVideoFrameMetadataExtensions |
An |
|
IID_IDeckLinkVideoFrameMutableMetadataExtensions |
An |
|
IID_IDeckLinkVideoBuffer |
An |
|
IID_IDeckLinkMacVideoBuffer |
An |
|
IID_IDeckLinkMutableVideoFrame |
|
|
IID_IDeckLinkVideoInputFrame |
|
|
IID_IDeckLinkScreenPreviewCallback |
An |
|
IID_IDeckLinkGLScreenPreviewHelper |
An |
|
IID_IDeckLinkMetalScreenPreviewHelper |
An |
|
IID_IDeckLinkDX9ScreenPreviewHelper |
An |
|
IID_IDeckLinkWPFDX9ScreenPreviewHelper |
An |
|
IID_IDeckLinkVideoConversion |
An |
|
IID_IDeckLinkVideoConversion |
An |
|
IID_IDeckLinkVideoConversion |
|
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:
format –
BMDTimecodeFormat
to querytimecode – 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