Buffer.span

Creates a new buffer that consists of part of buf1 and buf2. Logically, buf1 and buf2 are concatenated into a single larger buffer, and a new buffer is created at the given offset inside this space, with a given length. If the two source buffers are children of the same larger buffer, and are contiguous, the new buffer will be a child of the shared parent, and thus no copying is necessary. you can use gst_buffer_is_span_fast() to determine if a memcpy will be needed. MT safe.

class Buffer
span
(
uint offset
,,
uint len
)

Parameters

offset uint

the offset in the first buffer from where the new buffer should start.

buf2 Buffer

the second source GstBuffer to merge.

len uint

the total length of the new buffer.

Return Value

Type: Buffer

the new GstBuffer that spans the two source buffers. NULL if the arguments are invalid.

Meta