2.5.43 IDeckLinkVideoConversion Interface¶
The IDeckLinkVideoConversion
interface provides the capability to copy an image from a source frame into a destination frame converting between the formats as required.
A reference to an IDeckLinkVideoConversion
interface may be obtained from CoCreateInstance()
on platforms with native COM support or from CreateVideoConversionInstance()
on other platforms.
Interface |
Interface ID |
Description |
---|---|---|
IID_IDeckLinkVideoFrame |
An |
|
IID_IDeckLinkVideoFrame |
An |
|
IID_IDeckLinkVideoFrame |
|
|
IID_IDeckLinkVideoBuffer |
An |
2.5.43.1 IDeckLinkVideoConversion::ConvertFrame method¶
-
HRESULT IDeckLinkVideoConversion::ConvertFrame(IDeckLinkVideoFrame *srcFrame, IDeckLinkVideoFrame *dstFrame);¶
The ConvertFrame method copies the source frame (srcFrame) to the destination frame (dstFrame). The pixel format of the video frame will be converted if possible. The return value for this method should be checked to ensure that the desired conversion is supported.
The
IDeckLinkVideoFrame
object for the destination frame, with the desired properties, can be created usingIDeckLinkOutput::CreateVideoFrame()
. Alternatively the destination frame can be created by subclassingIDeckLinkVideoFrame
and setting properties directly in the subclassed object.- Parameters:
srcFrame – The properties of the source frame
dstFrame – The properties of the destination frame
- Return values:
E_NOTIMPL – Conversion not currently supported
E_OUTOFMEMORY – The provided buffer is too small
E_FAIL – Failure
S_OK – Success
2.5.43.2 IDeckLinkVideoConversion::ConvertNewFrame method¶
-
HRESULT IDeckLinkVideoConversion::ConvertNewFrame(IDeckLinkVideoFrame *srcFrame, BMDPixelFormat dstPixelFormat, BMDColorspace dstColorspace, IDeckLinkVideoBuffer *dstBuffer, IDeckLinkVideoFrame **dstFrame);¶
Create a new frame and convert the source frame into it. Optionally provide a buffer for the frame, otherwise one will be allocated with the default allocator.
- Parameters:
srcFrame – The properties of the source frame
dstPixelFormat – Destination pixel format
dstColorspace – Destination colorspace.
bmdColorspaceUnknown
means use same as srcFramedstBuffer – Supply custom buffer for dstFrame, or nullptr for default allocation.
dstFrame – New converted destination frame
- Return values:
E_NOTIMPL – Conversion not currently supported
E_OUTOFMEMORY – The provided buffer is too small, or destination buffer/frame could not be allocated
E_FAIL – Failure
S_OK – Success