feat: 添加大数据接收方法,以提高接受速度

This commit is contained in:
2025-07-13 11:40:41 +08:00
parent b913f58f13
commit 32b126b93f
3 changed files with 201 additions and 7 deletions

View File

@@ -179,12 +179,12 @@ class Camera
logger.Trace($"Reading frame from camera {this.address}");
// 使用UDPClientPool读取图像帧数据
var result = await UDPClientPool.ReadAddr4Bytes(
var result = await UDPClientPool.ReadAddr4BytesAsync(
this.ep,
this.taskID, // taskID
FrameAddr,
// ((int)FrameLength),
1280*720/2,
1280 * 720 / 2,
this.timeout);
if (!result.IsSuccessful)
@@ -276,7 +276,7 @@ class Camera
/// <param name="vWindow">垂直窗口大小默认1300</param>
/// <returns>配置结果</returns>
public async ValueTask<Result<bool>> ConfigureResolution(
UInt16 hStart, UInt16 vStart,
UInt16 hStart, UInt16 vStart,
UInt16 dvpHo, UInt16 dvpVo,
UInt16 hts, UInt16 vts,
UInt16 hOffset, UInt16 vOffset,
@@ -285,7 +285,7 @@ class Camera
// 计算结束位置
UInt16 hEnd = (UInt16)(hStart + hWindow - 1);
UInt16 vEnd = (UInt16)(vStart + vWindow - 1);
// 计算帧长度
UInt32 frameLength = (UInt32)(dvpHo * dvpVo * 16 / 32);