class V4L2::Video

Defined in:

v4l2/video.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(file : Path) #

open the device i.e. Path["/dev/video4"]


[View source]

Class Method Detail

def self.enumerate_loopback_devices : Array(Path) #

[View source]

Instance Method Detail

def allocate_mmap_buffers(count : Int, buffer_type : BufferType = BufferType::VIDEO_CAPTURE) #

[View source]
def buffer : LibV4l2::Buffer #

[View source]
def buffer_length : UInt32 #

[View source]
def buffers : Array(Pointer(Void)) | Nil #

[View source]
def cleanup_buffers(buffers, length : UInt32) #

[View source]
def close #

[View source]
def device : Path #

[View source]
def device_details #

[View source]
def finalize #

[View source]
def request_buffers(count : Int, buffer_type : BufferType = BufferType::VIDEO_CAPTURE, memory_type : Memory = Memory::MMAP) #

[View source]
def reset_buffer #

[View source]
def set_format(format_id : UInt32, width : UInt32, height : UInt32, buffer_type : BufferType = BufferType::VIDEO_CAPTURE) #

[View source]
def set_format(rate : V4L2::FrameRate, buffer_type : BufferType = BufferType::VIDEO_CAPTURE) #

[View source]
def start_stream(buffer_type : BufferType = BufferType::VIDEO_CAPTURE) #

[View source]
def stop_stream(buffer_type : BufferType = BufferType::VIDEO_CAPTURE) #

[View source]
def stream(timeout : Time::Span = 2.seconds, buffer_type : BufferType = BufferType::VIDEO_CAPTURE, & : Bytes -> ) #

[View source]
def streaming? : Bool #

[View source]
def supported_formats(buffer_type : BufferType = BufferType::VIDEO_CAPTURE) #

[View source]