( has_target = false
) ]public delegate FlowReturn PadBufferAllocFunction
caps, out Buffer
Ask the sinkpad
pad to allocate a buffer with
The result will be stored in
The purpose of this function is to allocate a buffer that is optimal to be processed by
pad. The function is mostly overridden by
elements that can provide a hardware buffer in order to avoid additional memcpy operations.
The function can return a buffer that has caps different from the requested
caps, in which case the upstream element requests a
format change to this new caps. If a format change was requested, the returned buffer will be one to hold the data of said new caps, so its size
might be different from the requested
When this function returns anything else than OK, the buffer allocation
buf does not contain valid data. If the function returns
OK and the
buf is NULL, a
Buffer will be created with
By default this function returns a new buffer of
size and with
caps containing purely malloced data. The buffer
should be freed with unref after usage.
||a sink Pad
||the desired offset of the buffer
||the desired size of the buffer
||the desired caps of the buffer
||pointer to hold the allocated buffer.
buf contains a valid buffer, any other return
buf does not hold a valid buffer.