pub struct Stream { /* private fields */ }
Expand description
Stream of user buffers
An arena instance is used internally for buffer handling.
Implementations§
source§impl Stream
impl Stream
sourcepub fn new(dev: &Device, buf_type: Type) -> Result<Self>
pub fn new(dev: &Device, buf_type: Type) -> Result<Self>
Returns a stream for frame capturing
§Arguments
dev
- Device ref to get its file descriptorbuf_type
- Type of the buffers
§Example
use v4l::buffer::Type;
use v4l::device::Device;
use v4l::io::userptr::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>
sourcepub fn set_timeout(&mut self, duration: Duration)
pub fn set_timeout(&mut self, duration: Duration)
Sets a timeout of the v4l file handle.
sourcepub fn clear_timeout(&mut self)
pub fn clear_timeout(&mut self)
Clears the timeout of the v4l file handle.
Trait Implementations§
source§impl<'a> CaptureStream<'a> for Stream
impl<'a> CaptureStream<'a> for Stream
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more