| 4 | /// 后端枚举,用于内部标记当前使用的是哪个驱动 |
| 5 | #[derive(Debug, Clone, Copy)] |
| 6 | pub enum BackendType { |
| 7 | V4L2, |
| 8 | AVFoundation, |
| 9 | Dummy, // 用于不支持的系统或测试 |
| 10 | } |
| 11 | |
| 12 | /// 创建驱动实例的工厂函数 |
| 13 | pub fn create_driver() -> Result<Box<dyn Driver>> { |
nothing calls this directly
no outgoing calls
no test coverage detected