diff --git a/server/src/Peripherals/CameraClient.cs b/server/src/Peripherals/CameraClient.cs
index 1f0e54d..708caae 100644
--- a/server/src/Peripherals/CameraClient.cs
+++ b/server/src/Peripherals/CameraClient.cs
@@ -19,7 +19,7 @@ class Camera
{
private static readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
- readonly int timeout = 2000;
+ readonly int timeout = 500;
readonly int taskID;
readonly int port;
readonly string address;
@@ -43,7 +43,7 @@ class Camera
/// 摄像头设备IP地址
/// 摄像头设备端口
/// 超时时间(毫秒)
- public Camera(string address, int port, int timeout = 2000)
+ public Camera(string address, int port, int timeout = 500)
{
if (timeout < 0)
throw new ArgumentException("Timeout couldn't be negative", nameof(timeout));
@@ -462,6 +462,20 @@ class Camera
);
}
+ ///
+ /// 配置为960x540分辨率
+ ///
+ /// 配置结果
+ public async ValueTask> ConfigureResolution960x540()
+ {
+ return await ConfigureResolution(
+ hStart: 0, vStart: 0,
+ dvpHo: 960, dvpVo: 540,
+ hts: 1700, vts: 1500,
+ hOffset: 16, vOffset: 4
+ );
+ }
+
///
/// 配置为320x240分辨率
///
@@ -543,6 +557,9 @@ class Camera
case "640x480":
result = await ConfigureResolution640x480();
break;
+ case "960x540":
+ result = await ConfigureResolution960x540();
+ break;
case "1280x720":
result = await ConfigureResolution1280x720();
break;
diff --git a/server/src/Services/HttpVideoStreamService.cs b/server/src/Services/HttpVideoStreamService.cs
index f6260af..3fc1b3e 100644
--- a/server/src/Services/HttpVideoStreamService.cs
+++ b/server/src/Services/HttpVideoStreamService.cs
@@ -1109,6 +1109,7 @@ public class HttpVideoStreamService : BackgroundService
return new List<(int, int, string)>
{
(640, 480, "640x480 (VGA)"),
+ (960, 540, "960x540 (qHD)"),
(1280, 720, "1280x720 (HD)"),
(1280, 960, "1280x960 (SXGA)"),
(1920, 1080, "1920x1080 (Full HD)")