Pad.allocBufferAndSetCaps

In addition to the function gst_pad_alloc_buffer(), this function automatically calls gst_pad_set_caps() when the caps of the newly allocated buffer are different from the pad caps.

class Pad
allocBufferAndSetCaps
(
ulong offset
,
int size
,,)

Parameters

offset ulong

the offset of the new buffer in the stream

size int

the size of the new buffer

caps Caps

the caps of the new buffer

buf Buffer

a newly allocated buffer

Return Value

a result code indicating success of the operation. Any result code other than GST_FLOW_OK is an error and buf should not be used. An error can occur if the pad is not connected or when the downstream peer elements cannot provide an acceptable buffer. MT safe.

Meta