pub trait Driver: Send + Sync {
// Required methods
fn list_devices(&self) -> Result<Vec<DeviceInfo>>;
fn open(
&self,
id: &str,
config: CameraConfig,
) -> Result<(Box<dyn Stream>, DeviceControls)>;
}Expand description
- 驱动入口:设备枚举与管理
Required Methods§
Sourcefn list_devices(&self) -> Result<Vec<DeviceInfo>>
fn list_devices(&self) -> Result<Vec<DeviceInfo>>
扫描总线,返回设备列表(含唯一 ID 和拓扑路径)
Sourcefn open(
&self,
id: &str,
config: CameraConfig,
) -> Result<(Box<dyn Stream>, DeviceControls)>
fn open( &self, id: &str, config: CameraConfig, ) -> Result<(Box<dyn Stream>, DeviceControls)>
打开设备 返回分离的 Stream (数据面) 和 Controls (控制面)