Buffer.tryNewAndAlloc

Tries to create a newly allocated buffer with data of the given size. If the requested amount of memory can't be allocated, NULL will be returned. The buffer memory is not cleared. Note that when size == 0, the buffer data pointer will be NULL. MT safe.

class Buffer
static
tryNewAndAlloc
(
uint size
)

Parameters

size uint

the size of the new buffer's data.

Return Value

Type: Buffer

a new GstBuffer, or NULL if the memory couldn't be allocated. Since 0.10.13

Meta