Trait vidi::CaptureStream

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

Required Methods§

source

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

Insert a buffer into the drivers’ incoming queue

source

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

Remove a buffer from the drivers’ outgoing queue

source

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

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>