22 lines
443 B
Rust
22 lines
443 B
Rust
|
|
// client/src/input/camera.rs
|
||
|
|
|
||
|
|
use anyhow::Result;
|
||
|
|
|
||
|
|
/// A stub camera aggregator or capture
|
||
|
|
pub struct CameraCapture {
|
||
|
|
// no real fields yet
|
||
|
|
}
|
||
|
|
|
||
|
|
impl CameraCapture {
|
||
|
|
pub fn new_stub() -> Self {
|
||
|
|
// in real code: open /dev/video0, set formats, etc
|
||
|
|
CameraCapture {}
|
||
|
|
}
|
||
|
|
|
||
|
|
/// Called regularly to capture frames or do nothing
|
||
|
|
pub fn process_frames(&mut self) -> Result<()> {
|
||
|
|
// no-op
|
||
|
|
Ok(())
|
||
|
|
}
|
||
|
|
}
|