Trait v4l::io::traits::CaptureStream

source ·
pub trait CaptureStream<'a>: Stream {
    // Required methods
    fn queue(&mut self, index: usize) -> Result<()>;
    fn dequeue(&mut self) -> Result<usize>;
    fn next(&'a mut self) -> Result<(&Self::Item, &Metadata, bool)>;
}

Required Methods§

source

fn queue(&mut self, index: usize) -> Result<()>

Insert a buffer into the drivers’ incoming queue

source

fn dequeue(&mut self) -> Result<usize>

Remove a buffer from the drivers’ outgoing queue

source

fn next(&'a mut self) -> Result<(&Self::Item, &Metadata, bool)>

Fetch a new frame by first queueing and then dequeueing. First time initialization is performed if necessary. The last item in the tuple is True if another frame is pending.

Implementors§

source§

impl<'a> CaptureStream<'a> for v4l::io::dmabuf::stream::Stream

source§

impl<'a> CaptureStream<'a> for v4l::io::userptr::stream::Stream

source§

impl<'a, 'b> CaptureStream<'b> for v4l::io::mmap::stream::Stream<'a>