class

V4L2::AllocatedBuffer

Inherits Reference < Object

Represents a buffer allocated and controlled by the application, which the V4L2 kernel API will write data into.

Constructors

malloc(length : UInt32) : AllocatedBuffer

Mallocs a new buffer of the given length.

Source
mmap(fd : Int32, offset : UInt32, length : UInt32) : AllocatedBuffer

Memory-maps a new buffer using the given file descriptor, offset, and length.

Source
new(memory : Memory, pointer : Pointer(UInt8), length : UInt32)

Initializes an allocated buffer, with the specified memory type, pointer, and length.

Source

Instance methods

finalize

De-allocates the buffer.

Source
length

The length of the allocated buffer.

Source
memory

The memory type of the allocated buffer.

Source
pointer

The raw pointer to the allocated buffer.

Source
to_slice

Returns a slice to the allocated buffer.

Source
to_unsafe

Returns a raw pointer to the allocated buffer.

Source

Nested types