MCPcopy Create free account
hub / github.com/RustCV/RustCV / new

Method new

rustcv-backend-v4l2/src/stream.rs:35–47  ·  view source on GitHub ↗
(dev: Arc<v4l::Device>, fmt: &v4l::Format, buf_count: usize)

Source from the content-addressed store, hash-verified

33
34impl V4l2Stream {
35 pub fn new(dev: Arc<v4l::Device>, fmt: &v4l::Format, buf_count: usize) -> Result<Self> {
36 let stream =
37 v4l::io::mmap::Stream::with_buffers(&dev, Type::VideoCapture, buf_count as u32)
38 .map_err(CameraError::Io)?;
39
40 Ok(Self {
41 inner: stream,
42 format: *fmt,
43 clock_sync: ClockSynchronizer::new(30),
44 is_streaming: false,
45 _dev: dev,
46 })
47 }
48}
49
50#[async_trait]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected