Types

Buffers are the basic unit of data transfer in GStreamer. The
Buffer type provides all the state necessary to define a
region of memory as part of a stream. Sub-buffers are also
supported, allowing a smaller region of a Buffer to become its
own Buffer, with mechansims in place to ensure that neither
memory space goes away prematurely.

Get a raw pointer to the internal data area for the current
buffer. The pointer may be used to write into the data area if
desired. This function is unsafe in that the pointer should not
be used once the Buffer is returned.

Create a sub-buffer from an existing Buffer with the given offset
and size. This sub-buffer uses the actual memory space of the
parent buffer. Thus function will copy the offset and timestamp
fields when the offset is 0. Otherwise, they will both be set to
Nothing. If the offset is 0 and the size is the total size of
the parent, the duration and offset end fields are also
copied. Otherwise they will be set to Nothing.

Create a new Buffer that consists of a span across the given
buffers. Logically, the buffers are concatenated to make a larger
buffer, and a new buffer is created at the given offset and with
the given size.

If the two buffers are children of the same larger buffer, and
are contiguous, no copying is necessary. You can use
bufferIsSpanFast to determine if copying is needed.