2.5.53 IDeckLinkVideoBuffer Interface¶
The IDeckLinkVideoBuffer
interface represents a video frame buffer.
Note
macOS sandboxed apps communicate via XPC and require special handling of buffer memory. If this interface is caller-implemented, to enable sandboxing IDeckLinkMacVideoBuffer
should be implemented too.
Note
The final release of this interface should resolve all outstanding calls to EndAccess.
Interface |
Interface ID |
Description |
---|---|---|
IID_IDeckLinkVideoBufferAllocator |
|
|
IID_IDeckLinkOutput |
An |
|
IID_IDeckLinkVideoFrame |
An |
|
IID_IDeckLinkVideoConversion |
An |
2.5.53.1 IDeckLinkVideoBuffer::GetBytes method¶
-
HRESULT IDeckLinkVideoBuffer::GetBytes(void **buffer);¶
The GetBytes method allows a CPU to directly access to the image data buffer of a video frame.
- Parameters:
buffer – Pointer to raw frame buffer - only valid while object remains valid.
- Return values:
E_ACCESSDENIED – StartAccess must be used first
E_FAIL – Failure
S_OK – Success
2.5.53.2 IDeckLinkVideoBuffer::StartAccess method¶
-
HRESULT IDeckLinkVideoBuffer::StartAccess(BMDBufferAccessFlags flags);¶
If not already, prepare the buffer to be directly accessible by a CPU-bound program that calls GetBytes.
The number of calls to this function and flagged intent of access should match the number of times EndAccess has been called with the same access flags.
Tip
BMDBufferAccessFlags
signals intent of use of the buffer access. Implementers of this class can use it to make access more efficient or secure.- Parameters:
flags – Buffer access flags
- Return values:
E_FAIL – Failure
S_OK – Success
2.5.53.3 IDeckLinkVideoBuffer::EndAccess method¶
-
HRESULT IDeckLinkVideoBuffer::EndAccess(BMDBufferAccessFlags flags);¶
Releases access to the buffer.
The number of calls to this function and flagged intent of access should match the number of times StartAccess has been called with the same access flags.
- Parameters:
flags – Form of access that is no longer required
- Return values:
E_INVALIDARG – StartAccess has not been called prior with the same access flags
E_FAIL – Failure
S_OK – Success