Pad.allocBuffer

Allocates a new, empty buffer optimized to push to pad pad. This function only works if pad is a source pad and has a peer. A new, empty GstBuffer will be put in the buf argument. You need to check the caps of the buffer after performing this function and renegotiate to the format if needed.

class Pad
allocBuffer
(
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