2.5.7 IDeckLinkMutableVideoFrame Interface

The IDeckLinkMutableVideoFrame interface represents a video frame created for output. Methods are provided to attach ancillary data and set timecodes within the frame.

IDeckLinkMutableVideoFrame is a subclass of IDeckLinkVideoFrame and inherits all its methods. It is created by the IDeckLinkOutput::CreateVideoFrame() method.

Related Interfaces

Interface

Interface ID

Description

IDeckLinkOutput

IID_IDeckLinkOutput

IDeckLinkOutput::CreateVideoFrame() outputs an IDeckLinkMutableVideoFrame object interface

IDeckLinkOutput

IID_IDeckLinkOutput

IDeckLinkOutput::CreateVideoFrameWithBuffer() outputs an IDeckLinkMutableVideoFrame object interface

IDeckLinkMacOutput

IID_IDeckLinkMacOutput

IDeckLinkMacOutput::CreateVideoFrameFromCVPixelBufferRef() outputs an IDeckLinkMutableVideoFrame object interface

IDeckLinkVideoFrame

IID_IDeckLinkVideoFrame

IDeckLinkMutableVideoFrame subclasses IDeckLinkVideoFrame

IDeckLinkTimecode

IID_IDeckLinkTimecode

An IDeckLinkTimecode object interface is set into a video frame with IDeckLinkMutableVideoFrame::SetTimecode()

IDeckLinkVideoFrameAncillary

IID_IDeckLinkVideoFrameAncillary

An IDeckLinkVideoFrameAncillary object interface is set into a video frame with IDeckLinkMutableVideoFrame::SetAncillaryData()

IDeckLinkVideoFrameMutableMetadataExtensions

IID_IDeckLinkVideoFrameMutableMetadataExtensions

An IDeckLinkVideoFrameMutableMetadataExtensions object interface may be obtained from IDeckLinkMutableVideoFrame using QueryInterface

2.5.7.1 IDeckLinkMutableVideoFrame::SetFlags method

HRESULT IDeckLinkMutableVideoFrame::SetFlags(BMDFrameFlags newFlags);

The SetFlags method sets output flags associated with a video frame.

Parameters:

newFlagsBMDFrameFlags to set see BMDFrameFlags for details.

Return values:
  • E_FAIL – Failure

  • S_OK – Success

2.5.7.2 IDeckLinkMutableVideoFrame::SetTimecode method

HRESULT IDeckLinkMutableVideoFrame::SetTimecode(BMDTimecodeFormat format, IDeckLinkTimecode *timecode);

The SetTimecode method sets the specified timecode type for the frame.

Parameters:
Return values:
  • E_INVALIDARG – The format parameter is invalid.

  • S_OK – Success

2.5.7.3 IDeckLinkMutableVideoFrame::SetTimecodeFromComponents method

HRESULT IDeckLinkMutableVideoFrame::SetTimecodeFromComponents(BMDTimecodeFormat format, uint8_t hours, uint8_t minutes, uint8_t seconds, uint8_t frames, BMDTimecodeFlags flags);

The SetTimecodeFromComponents method sets the components of the specified timecode type for the frame.

Parameters:
  • formatBMDTimecodeFormat to update

  • hours – Value of hours component of timecode

  • minutes – Value of minutes component of timecode

  • seconds – Value of seconds component of timecode

  • frames – Value of frames component of timecode

  • flags – Timecode flags (see BMDTimecodeFlags for details)

Return values:
  • E_INVALIDARG – The format parameter is invalid.

  • S_OK – Success

2.5.7.4 IDeckLinkMutableVideoFrame::SetAncillaryData method

HRESULT IDeckLinkMutableVideoFrame::SetAncillaryData(IDeckLinkVideoFrameAncillary *ancillary);

The SetAncillaryData method sets frame ancillary data. An IDeckLinkVideoFrameAncillary may be created using the IDeckLinkOutput::CreateAncillaryData() method.

Parameters:

ancillaryIDeckLinkVideoFrameAncillary data to output with the frame.

Return values:
  • E_FAIL – Failure

  • S_OK – Success

2.5.7.5 IDeckLinkMutableVideoFrame::SetTimecodeUserBits method

HRESULT IDeckLinkMutableVideoFrame::SetTimecodeUserBits(BMDTimecodeFormat format, BMDTimecodeUserBits userBits);

The SetTimecodeUserBits method sets the timecode user bits.

Parameters:
  • format – The format of the timecode.

  • userBits – The user bits to set.

Return values:
  • E_INVALIDARG – The format parameter is invalid.

  • E_UNEXPECTED – Timecode object is not present. (See IDeckLinkMutableVideoFrame::SetTimecode)

  • S_OK – Success

2.5.7.6 IDeckLinkMutableVideoFrame::SetInterfaceProvider method

HRESULT IDeckLinkMutableVideoFrame::SetInterfaceProvider(REFIID iid, IUnknown *iface);

The SetInterfaceProvider method sets a provider which allows other interfaces to be queried from the frame, until cleared by this same function by passing NULL. The Provider must not keep a reference to the specified interface such that a reference loop is encountered upon frame object destruction. If a provided interface is queried for IUnknown or, any other interface that it doesn’t implement, then the provider must query the frame for it.

Tip

User-implemented IDeckLinkVideoFrame3DExtensions is an example of an optional interface that can be attached to an existing frame object that implements the IDeckLinkMutableVideoFrame interface.

Parameters:
  • iid – The REFIID of the interface the provider can supply.

  • iface – The provider to attach, or NULL to clear.

Return values:

S_OK – Success