Ask the sinkpad pad to allocate a buffer with offset,size and caps.
The result will be stored in buf.
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
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 #GST_FLOW_OK, the buffer allocation
failed and buf does not contain valid data. If the function returns #GST_FLOW_OK and
the buf is NULL, a #GstBuffer will be created with caps,offset and size.
By default this function returns a new buffer of size and with caps containing
purely malloced data. The buffer should be freed with gst_buffer_unref()
after usage.
value means buf does not hold a valid buffer.
Ask the sinkpad
pad
to allocate a buffer withoffset,
size
andcaps
. The result will be stored inbuf
. The purpose of this function is to allocate a buffer that is optimal to be processed bypad
. 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 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 #GST_FLOW_OK, the buffer allocation failed andbuf
does not contain valid data. If the function returns #GST_FLOW_OK and thebuf
is NULL, a #GstBuffer will be created withcaps,
offset
andsize
. By default this function returns a new buffer ofsize
and withcaps
containing purely malloced data. The buffer should be freed with gst_buffer_unref() after usage. value meansbuf
does not hold a valid buffer.