class V4L2::Stream(TYPE, FORMAT)

Overview

Represents a "stream", defined by a V4L2::Buffer::Type and V4L2::Format.

See V4L2::Streams for all supported streams.

Direct Known Subclasses

Defined in:

v4l2/stream.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(device : Device) #

Initializes the stream for the V4L2 device.


[View source]

Instance Method Detail

def buffers : Array(AllocatedBuffer) #

Returns the allocated buffers for the stream. Raises an UninitializedError if the buffers have not been allocated.


[View source]
def crop : Rect #

Queries the current set crop.


[View source]
def crop=(rect : Rect) #

Sets the current crop.


[View source]
def crop_capabilities : CropCapability #

Queries the crop capabilities of the stream.


[View source]
def each_format(&block : FmtDesc -> ) #

Enumerates over each format supported by the stream.


[View source]
def format : FORMAT #

Returns the current format.


[View source]
def format(&block : FORMAT -> ) #

Yields a new format and sets the current format.


[View source]
def format=(new_format : FORMAT) #

Sets the current format.


[View source]
def malloc_buffers!(count : UInt32, length : UInt32) : self #

Requests user malloced buffers of the given count and length for the stream.


[View source]
def mmap_buffers!(count : UInt32) : self #

Requests memory-mapped buffers of the given count for the stream.


[View source]
def queue : BufferQueue #

Returns the buffer queue for the stream. Raises an UninitializedError if the buffer queue has not been initialized.


[View source]