2.5.54 IDeckLinkVideoBufferAllocatorProvider Interface

The IDeckLinkVideoBufferAllocatorProvider interface is a callback class to provide custom video frame buffer allocations for capture. An object that implements the IDeckLinkVideoBufferAllocatorProvider interface is passed to IDeckLinkInput::EnableVideoInputWithAllocatorProvider() when enabling input.

Related Interfaces

Interface

Interface ID

Description

IDeckLinkVideoBufferAllocator

IID_IDeckLinkVideoBufferAllocator

IDeckLinkVideoBufferAllocatorProvider::GetVideoBufferAllocator() outputs an IDeckLinkVideoBufferAllocator object interface

IDeckLinkInput

IID_IDeckLinkInput

An IDeckLinkVideoBufferAllocatorProvider object interface is registered with IDeckLinkInput::EnableVideoInputWithAllocatorProvider()

2.5.54.1 IDeckLinkVideoBufferAllocatorProvider::GetVideoBufferAllocator method

HRESULT IDeckLinkVideoBufferAllocatorProvider::GetVideoBufferAllocator(uint32_t bufferSize, uint32_t width, uint32_t height, uint32_t rowBytes, BMDPixelFormat pixelFormat, IDeckLinkVideoBufferAllocator **allocator);

The GetVideoBufferAllocator method is called by IDeckLinkInput::EnableVideoInputWithAllocatorProvider() to obtain and retain allocators for video buffers that are alike. This method is abstract in the base interface and must be implemented by the application developer if using IDeckLinkInput::EnableVideoInputWithAllocatorProvider().

Parameters:
  • bufferSize – Size of buffer in bytes. This may be larger than rowBytes x height.

  • width – Frame width in pixels

  • height – Frame height in pixels

  • rowBytes – Bytes per row

  • pixelFormat – Pixel format used by the allocator.

  • allocator – An allocator that can provide buffers that match the preceding parameters. This object must be released by the caller when no longer required.

Return values:
  • E_OUTOFMEMORY – There is insufficient memory to allocate a buffer of the requested size.

  • S_OK – Success