29 lines
1000 B
C#
29 lines
1000 B
C#
namespace HardwareControl.Core.UsbCamera
|
|
{
|
|
/// <summary>
|
|
/// Usb相机操作类
|
|
/// </summary>
|
|
public class UsbCameraOptions
|
|
{
|
|
// 相机的硬件 ID,来自系统参数 camera_vid;匹配 CaptureDeviceDescriptor.Identity
|
|
// 为 null 时按 DeviceNameKeyword 或第一个设备选择
|
|
public string? CameraVid { get; set; }
|
|
|
|
// 设备名称关键词,null 表示取第一个设备
|
|
public string? DeviceNameKeyword { get; set; }
|
|
|
|
// 优先使用的格式关键词,例如 "MJPG" 或 "640x480"
|
|
// 为 null 时取该设备的第一个格式
|
|
public string? PreferredFormatKeyword { get; set; }
|
|
|
|
// 重连基础间隔,单位毫秒
|
|
public int ReconnectBaseDelayMs { get; set; } = 1000;
|
|
|
|
// 重连最大间隔,单位毫秒
|
|
public int ReconnectMaxDelayMs { get; set; } = 10_000;
|
|
|
|
// 抓帧超时,单位毫秒
|
|
public int FrameTimeoutMs { get; set; } = 5000;
|
|
}
|
|
}
|