This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Functions for buffer allocation
static MediaBufferAllocator media_buffer_allocator = { AllocateBuffers, FreeBuffers, AcquireBuffer, ReleaseBuffer }
The Multimedia library implements a MediaBufferAllocator that your filters can use.
This interface defines custom buffer allocation and manipulation. You can implement buffer allocating, locking, and unlocking using this interface.
int32_t (*AllocateBuffers)(MmChannel_t *channel, const MmFormat_t *format);
This function should allocate buffers for a given channel with the given format specifications.
If successful, this function should return 0.
int32_t (*FreeBuffers)(MmChannel_t *channel);
This function should free the buffers for the channel.
If successful, this function should return 0.
MmBuffer_t *(*AcquireBuffer)(MmChannel_t *channel, uint32_t unused);
This function should acquire a buffer for a channel with a minimum size of the min_buffersize field of the MmFormat_t structure filled in at format negotiation time, and return a pointer to it, or NULL if it can't acquire a buffer.
int32_t (*ReleaseBuffer)(MmChannel_t *channel, MmBuffer_t *buffer);
This function should release the given buffer from the channel for subsequent use.
If successful, this function should return 0.
Neutrino
Extending the Multimedia Framework.