This commit is contained in:
ldh
2026-11-17 16:28:24 +08:00
parent b30d9f92ce
commit 19b7b10e97
28 changed files with 3891 additions and 46 deletions
@@ -0,0 +1,13 @@
namespace HardwareControl.Core.UsbCamera
{
/// <summary>
/// 相机最近一帧图像快照,用于后台图像处理。
/// </summary>
public sealed record CameraFrameSnapshot(
byte[] ImageData,
int Width,
int Height,
string MimeType,
DateTimeOffset CapturedAt,
long FrameIndex);
}
@@ -5,6 +5,10 @@
/// </summary>
public class UsbCameraOptions
{
// 相机的硬件 ID,来自系统参数 camera_vid;匹配 CaptureDeviceDescriptor.Identity
// 为 null 时按 DeviceNameKeyword 或第一个设备选择
public string? CameraVid { get; set; }
// 设备名称关键词,null 表示取第一个设备
public string? DeviceNameKeyword { get; set; }