2.5.55 IDeckLinkVideoBufferAllocator Interface¶
The IDeckLinkVideoBufferAllocator
interface is requested by the DeckLinkAPI via IDeckLinkVideoBufferAllocatorProvider::GetVideoBufferAllocator()
. During capture, calls will be made to this interface to manage memory for storing video buffers of the same parameters provided by IDeckLinkVideoBufferAllocatorProvider::GetVideoBufferAllocator()
. When the DeckLinkAPI no longer wants these buffers, it will release this interface, so it is suggested that all allocated buffers also AddRef on this allocator until all buffer retainers have released them.
Interface |
Interface ID |
Description |
---|---|---|
IID_IDeckLinkVideoBuffer |
|
|
IID_IDeckLinkVideoBufferAllocatorProvider |
|
2.5.55.1 IDeckLinkVideoBufferAllocator::AllocateVideoBuffer method¶
-
HRESULT IDeckLinkVideoBufferAllocator::AllocateVideoBuffer(IDeckLinkVideoBuffer **allocatedBuffer);¶
The AllocateVideoBuffer method allocates an
IDeckLinkVideoBuffer
for internal use by a video frame. This method is abstract in the base interface and must be implemented by the application developer if usingIDeckLinkInput::EnableVideoInputWithAllocatorProvider()
.Note
The internal address, available via
IDeckLinkVideoBuffer::GetBytes()
must be aligned on a 16-byte boundary.Note
These buffers become internal to a video frame and thus a QueryInterface on the frame for an
IDeckLinkVideoBuffer
will return an interface that is not the same as provided by AllocateVideoBuffer. If the developer wishes to access their custom implementation of a particularIDeckLinkVideoBuffer
then it is suggested that the QueryInterface function on a buffer provided by this AllocateVideoBuffer supports a custom IID.- Parameters:
allocatedBuffer – Address of newly allocated IDeckLinkVideoBufferbuffer provided by the implementation of the allocator
- Return values:
E_OUTOFMEMORY – There is insufficient memory to allocate a buffer.
S_OK – Success