Open a camera by device index (0 = first camera). 按设备索引打开摄像头(0 = 第一个摄像头)。 Uses default configuration: 640x480, 30fps, auto format selection. 使用默认配置:640x480,30fps,自动格式选择。
(index: u32)
| 53 | /// Uses default configuration: 640x480, 30fps, auto format selection. |
| 54 | /// 使用默认配置:640x480,30fps,自动格式选择。 |
| 55 | pub fn open(index: u32) -> Result<Self> { |
| 56 | Self::open_with(index, CameraConfig::new().resolution(640, 480).fps(30)) |
| 57 | } |
| 58 | |
| 59 | /// Open a camera with custom configuration. |
| 60 | /// 使用自定义配置打开摄像头。 |
no test coverage detected