class

V4cr::Device

Inherits Reference < Object

Main class for interacting with V4L2 devices

Constructors

new(device_path : String)
Source

Instance methods

buffer_manager
Source
capability
Source
capture_frame

Capture a single frame (convenience method)

Source
close

Close the device

Source
current_format
Source
current_input

Get current input

Source
dequeue_buffer

Dequeue a buffer (get captured data)

Source
device_path
Source
finalize
Source
format

Get current format

Source
framerate=(fps : UInt32)

Set framerate

Source
input=(index : Int32)

Set input

Source
inputs

Get inputs available on the device

Source
jpeg_quality=(quality : Int32)

Set JPEG compression quality

Source
open

Open the device

Source
open?

Check if device is open

Source
query_capability

Query device capabilities

Source
queue_buffer(buffer : Buffer)

Queue a buffer for capture

Source
request_buffers(count : UInt32, memory_type : UInt32 = LibV4L2::V4L2_MEMORY_MMAP) : BufferManager

Request buffers for streaming

Source
set_format(width : UInt32, height : UInt32, pixelformat : UInt32) : Format

Set format

Source
start_streaming

Start streaming

Source
stop_streaming

Stop streaming

Source
supported_formats

Get all supported formats

Source
supported_framerates(pixelformat : UInt32, width : UInt32, height : UInt32)

Returns an array of discrete framerates (as {numerator, denominator}), or a single stepwise/continuous range (as a NamedTuple)

Source
supported_resolutions(pixelformat : UInt32)
Source
to_s(io)
Source