class V4L2::BufferQueue

Included Modules

Defined in:

v4l2/buffer_queue.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(device : Device, type : Buffer::Type, memory : Buffer::Memory, count : UInt32) #

[View source]

Instance Method Detail

def count : UInt32 #

[View source]
def dequeue(&block : Buffer -> ) : Bool #

[View source]
def each(&block : Buffer -> ) #
Description copied from module Enumerable(V4L2::Buffer)

Must yield this collection's elements to the block.


[View source]
def enqueue(buffer : Buffer) #

[View source]
def memory : Buffer::Memory #

[View source]
def query(index : UInt32) : Buffer #

[View source]
def size : UInt32 #
Description copied from module Enumerable(V4L2::Buffer)

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4

[View source]
def type : Buffer::Type #

[View source]
def unsafe_fetch(index : Int) : Buffer #
Description copied from module Indexable(V4L2::Buffer)

Returns the element at the given index, without doing any bounds check.

Indexable makes sure to invoke this method with index in 0...size, so converting negative indices to positive ones is not needed here.

Clients never invoke this method directly. Instead, they access elements with #[](index) and #[]?(index).

This method should only be directly invoked if you are absolutely sure the index is in bounds, to avoid a bounds check for a small boost of performance.


[View source]