2.5.22 IDeckLinkAncillaryPacket Interface¶
The IDeckLinkAncillaryPacket interface represents an ancillary data packet within a video frame. A reference to an IDeckLinkAncillaryPacket interface can either be obtained with a known DID/SDID by calling GetFirstPacketByID on a IDeckLinkVideoFrameAncillaryPackets or via the IDeckLinkAncillaryPacketIterator interface.
Tip
Developers may subclass IDeckLinkAncillaryPacket to implement a specific VANC data packet type.
Interface |
Interface ID |
Description |
|---|---|---|
IID_IDeckLinkAncillaryPacketIterator |
|
|
IID_IDeckLinkVideoFrameAncillaryPackets |
|
|
IID_IDeckLinkVideoFrameAncillaryPackets |
An |
|
IID_IDeckLinkVideoFrameAncillaryPackets |
An |
2.5.22.1 IDeckLinkAncillaryPacket::GetBytes method¶
-
HRESULT IDeckLinkAncillaryPacket::GetBytes(BMDAncillaryPacketFormat format, const void **data, uint32_t *size);¶
The GetBytes method allows direct access to the data buffer of the ancillary packet.
Tip
When subclassing
IDeckLinkAncillaryPacket, implement GetBytes with support of at least one type ofBMDAncillaryPacketFormat. Specify NULL for either output parameter if unwanted.- Parameters:
format – Requested format of data buffer output (
BMDAncillaryPacketFormat)data – Pointer to ancillary packet data buffer. The pointer is valid while
IDeckLinkAncillaryPacketobject remains valid.size – Number of elements in the data buffer. When the requested format is
bmdAncillaryPacketFormatYCbCr10, this value will be the size in pixels. For other ancillary packet formats, it will be the length of the buffer in units of the format’s type size.
- Return values:
E_NOTIMPL – Format not implemented.
E_FAIL – Failure
S_OK – Success
2.5.22.2 IDeckLinkAncillaryPacket::GetDID method¶
-
uint8_t IDeckLinkAncillaryPacket::GetDID();¶
The GetDID method returns the Data ID (DID) of the ancillary packet.
- Returns:
Data ID (DID) of the ancillary packet
2.5.22.3 IDeckLinkAncillaryPacket::GetSDID method¶
-
uint8_t IDeckLinkAncillaryPacket::GetSDID();¶
The GetSDID method returns the SecondaryData ID (SDID) of the ancillary packet.
- Returns:
Secondary Data ID (SDID) of the ancillary packet
2.5.22.4 IDeckLinkAncillaryPacket::GetLineNumber method¶
-
uint32_t IDeckLinkAncillaryPacket::GetLineNumber();¶
The GetLineNumber method returns the video frame line number of an ancillary packet. When subclassing
IDeckLinkAncillaryPacketfor VANC output, if GetLineNumber returns 0, the ancillary packet will be assigned a line automatically.- Returns:
Video frame line number of the ancillary packet
2.5.22.5 IDeckLinkAncillaryPacket::GetDataStreamIndex method¶
-
uint8_t IDeckLinkAncillaryPacket::GetDataStreamIndex();¶
The GetDataStreamIndex method returns a data stream index of the ancillary packet.
This function should only return 0 for SD modes. In HD and above, this function will normally return 0 to output the ancillary packet in luma color channel. However this function can return 1 to encode a second data stream in the chroma color channel, but this should only occur when the first data stream is completely full.
- Returns:
Data stream index for the ancillary packet
2.5.22.6 IDeckLinkAncillaryPacket::GetDataSpace method¶
-
BMDAncillaryDataSpace IDeckLinkAncillaryPacket::GetDataSpace();¶
The GetDataSpace returns the data space of the ancillary packet.
- Returns:
Data space for the ancillary packet