Open a camera by device index with default settings. 按设备索引使用默认设置打开摄像头。 Default: 640x480, 30fps, auto format. 默认:640x480,30fps,自动格式。
(index: u32)
| 46 | /// Default: 640x480, 30fps, auto format. |
| 47 | /// 默认:640x480,30fps,自动格式。 |
| 48 | pub fn open(index: u32) -> Result<Self> { |
| 49 | let camera = Camera::open(index)?; |
| 50 | Ok(Self { camera }) |
| 51 | } |
| 52 | |
| 53 | /// Open a camera with custom configuration. |
| 54 | /// 使用自定义配置打开摄像头。 |