2.5.52 IDeckLinkMacVideoBuffer Interface¶
The optional IDeckLinkMacVideoBuffer
interface provides macOS-specific abilities supplementary to the mandatory IDeckLinkVideoBuffer
.
Interface |
Interface ID |
Description |
---|---|---|
IID_IDeckLinkVideoFrame |
An |
2.5.52.1 IDeckLinkMacVideoBuffer::CreateCVPixelBufferRef method¶
-
HRESULT IDeckLinkMacVideoBuffer::CreateCVPixelBufferRef(void **cvPixelBuffer);¶
The CreateCVPixelBufferRef method creates a new CVPixelBuffer to interface with macOS frameworks. All attributes of the CVPixelBuffer are populated. It internally carries a reference to the DeckLink video frame and its buffer, so they will only be released once the CVPixelBuffer is released.
Tip
If implementing this interface for a custom
IDeckLinkVideoBufferAllocator
, carrying a referencedIDeckLinkVideoBuffer
can be achieved by creating the CVPixelBufferRef with kCFAllocatorUseContext. If macOS sandboxing is desired to work, which communicates via XPC, the new CVPixelBuffer must be backed by an IOSurface.- Parameters:
cvPixelBuffer – Pointer to a void* that can be cast to a CVPixelBufferRef
- Return values:
E_FAIL – Failure
S_OK – Success