Files
Ayay/SHH.CameraSdk/Controllers/Dto/SubscriptionDto.cs
twice109 3d47c8f009 增加了通过网络主动上报图像的支持
增加了指令维护通道的支持
2026-01-07 10:59:03 +08:00

76 lines
2.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel.DataAnnotations;
namespace SHH.CameraSdk;
/// <summary>
/// 视频流订阅配置请求对象
/// 用于定义第三方应用或内部模块对指定相机流的消费需求
/// </summary>
public class SubscriptionDto
{
/// <summary>
/// 订阅标识 (如 "AI_Process_01"、"Main_Display_02")
/// </summary>
[Required(ErrorMessage = "进程标识 AppId 不能为空")]
[MaxLength(50, ErrorMessage = "AppId 长度不能超过 50 个字符")]
public string AppId { get; set; } = string.Empty;
/// <summary>
/// 订阅业务类型。
/// 决定了后端流控引擎后续的资源分配(如是否开启录像机或渲染器)。
/// </summary>
public SubscriptionType Type { get; set; }
/// <summary>
/// 显示帧率需求 (单位: fps)
/// <para>不需要显示则设为 0控制器会自动注销该类型需求</para>
/// </summary>
[Range(0, 30, ErrorMessage = "显示帧率需在 0-30 fps 范围内")]
public int DisplayFps { get; set; }
/// <summary>
/// 备注信息。
/// 用于记录订阅的用途、申请人或关联业务系统。
/// </summary>
public string Memo { get; set; }
= string.Empty;
/// <summary>
/// 窗口句柄HWND
/// 仅在 Type 为 HandleDisplay 时必填。格式通常为十六进制或十进制字符串。
/// </summary>
public string Handle { get; set; }
= string.Empty;
/// <summary>
/// 录像持续时长(分钟,范围 1-60
/// 仅在 Type 为 LocalRecord 时有效。
/// </summary>
public int RecordDuration { get; set; }
/// <summary>
/// 录像文件存放绝对路径。
/// 仅在 Type 为 LocalRecord 时有效例如C:\Recordings\Room01。
/// </summary>
public string SavePath { get; set; }
= string.Empty;
/// <summary>
/// 通讯方式协议。
/// 仅在 Type 为 NetworkTrans 或 WebPush 时有效,默认为 Network。
/// </summary>
public TransportProtocol Protocol { get; set; }
/// <summary>
/// 目标接收端 IP 地址。
/// 仅在 Type 为 NetworkTrans 或 WebPush 且 Protocol 为 Network 时必填。
/// </summary>
public string TargetIp { get; set; }
= string.Empty;
/// <summary>
/// 目标接收端端口号。
/// 仅在 Type 为 NetworkTrans 或 WebPush 时必填。
/// </summary>
public int TargetPort { get; set; }
}