USB 摄像头+远程遥控+中英的适配+topic的集成和状态的使用到相应页面
This commit is contained in:
36
lib/features/v2/usb_camera/domain/usb_camera_device.dart
Normal file
36
lib/features/v2/usb_camera/domain/usb_camera_device.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
/// USB(UVC)摄像头设备实体。
|
||||
class UsbCameraDevice {
|
||||
const UsbCameraDevice({
|
||||
required this.deviceId,
|
||||
this.vendorId,
|
||||
this.productId,
|
||||
this.productName,
|
||||
this.supportedResolutions = const [],
|
||||
});
|
||||
|
||||
/// 系统分配的设备标识(重启可能变化,仅做本次会话使用)。
|
||||
final String deviceId;
|
||||
|
||||
final int? vendorId;
|
||||
final int? productId;
|
||||
final String? productName;
|
||||
|
||||
/// 支持的分辨率字符串,例如 "1920x1080" / "1280x720"。
|
||||
final List<String> supportedResolutions;
|
||||
|
||||
UsbCameraDevice copyWith({
|
||||
String? deviceId,
|
||||
int? vendorId,
|
||||
int? productId,
|
||||
String? productName,
|
||||
List<String>? supportedResolutions,
|
||||
}) {
|
||||
return UsbCameraDevice(
|
||||
deviceId: deviceId ?? this.deviceId,
|
||||
vendorId: vendorId ?? this.vendorId,
|
||||
productId: productId ?? this.productId,
|
||||
productName: productName ?? this.productName,
|
||||
supportedResolutions: supportedResolutions ?? this.supportedResolutions,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user