(dev: Arc<v4l::Device>, fmt: &v4l::Format, buf_count: usize)
| 33 | |
| 34 | impl 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] |
nothing calls this directly
no outgoing calls
no test coverage detected