Adapter.getBuffer

gst.buffer.Buffer getBuffer(size_t nbytes)

Returns a #GstBuffer containing the first nbytes of the adapter, but does not flush them from the adapter. See [gstbase.adapter.Adapter.takeBuffer] for details.

Caller owns a reference to the returned buffer. gst_buffer_unref() after usage.

Free-function: gst_buffer_unref

Parameters

nbytesthe number of bytes to get

Returns

a #GstBuffer containing the first

nbytes of the adapter, or null if nbytes bytes are not available. gst_buffer_unref() when no longer needed.