Gst.Buffer.prototype.copy_region

function copy_region(flags:Gst.BufferCopyFlags, offset:gsize, size:gsize):Gst.Buffer {
    // Gjs wrapper for gst_buffer_copy_region()
}

Creates a sub-buffer from parent at offset and size. This sub-buffer uses the actual memory space of the parent buffer. This function will copy the offset and timestamp fields when the offset is 0. If not, they will be set to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE. If offset equals 0 and size equals the total size of @buffer, the duration and offset end fields are also copied. If not they will be set to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE.

MT safe.

flags

the Gst.BufferCopyFlags

offset

the offset into parent Gst.Buffer at which the new sub-buffer begins.

size

the size of the new Gst.Buffer sub-buffer, in bytes.

Returns

the new Gst.Buffer or NULL if the arguments were invalid.