Buffer.insertMemory

Insert the memory block @mem to @buffer at @idx. This function takes ownership of @mem and thus doesn't increase its refcount.

Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is added, existing memory blocks will automatically be merged to make room for the new memory.

class Buffer
void
insertMemory
(
int idx
,)

Parameters

idx int

the index to add the memory at, or -1 to append it to the end

mem Memory

a #GstMemory.

Meta