[][src]Struct v4l::io::mmap::stream::Stream

pub struct Stream<'a> { /* fields omitted */ }

Stream of mapped buffers

An arena instance is used internally for buffer handling.

Implementations

impl<'a> Stream<'a>[src]

pub fn new(dev: &Device, buf_type: Type) -> Result<Self>[src]

Returns a stream for frame capturing

Arguments

  • dev - Capture device ref to get its file descriptor
  • buf_type - Type of the buffers

Example

use v4l::buffer::Type;
use v4l::device::Device;
use v4l::io::mmap::Stream;

let dev = Device::new(0);
if let Ok(dev) = dev {
    let stream = Stream::new(&dev, Type::VideoCapture);
}

pub fn with_buffers(
    dev: &Device,
    buf_type: Type,
    buf_count: u32
) -> Result<Self>
[src]

Trait Implementations

impl<'a, 'b> CaptureStream<'b> for Stream<'a>[src]

impl<'a> Drop for Stream<'a>[src]

impl<'a, 'b> OutputStream<'b> for Stream<'a>[src]

impl<'a> Stream for Stream<'a>[src]

type Item = [u8]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Stream<'a>[src]

impl<'a> Send for Stream<'a>[src]

impl<'a> Sync for Stream<'a>[src]

impl<'a> Unpin for Stream<'a>[src]

impl<'a> !UnwindSafe for Stream<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.