class V4L2::Frame
- V4L2::Frame
- Reference
- Object
Overview
Represents an individual video frame.
Included Modules
- Indexable(UInt8)
Defined in:
v4l2/frame.crConstructors
-
.new(buffer : Buffer, data : Slice(UInt8))
Initializes the video frame.
-
.new(buffer : Buffer, allocated_buffer : AllocatedBuffer)
Initializes the video frame, with the V4L2::Buffer, containing the buffer metadata, and the V4L2::AllocatedBuffer, containing the read data.
Instance Method Summary
-
#buffer : Buffer
The underlying buffer of bytes.
-
#bytes : Slice(UInt8)
Returns the bytes of the video frame.
-
#size : Int32
Returns the size of the video frame.
-
#to_slice : Slice(UInt8)
Converts the video frame to a slice.
-
#to_unsafe : Pointer(UInt8)
Converts the video frame to a raw pointer.
-
#unsafe_fetch(index : Int) : UInt8
Fetches a byte within the video frame.
Constructor Detail
Initializes the video frame. The buffer represents the buffer metadata and the slice represents where the data was read into.
Initializes the video frame, with the V4L2::Buffer, containing the buffer metadata, and the V4L2::AllocatedBuffer, containing the read data.