2025-12-26 12:15:10 +08:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SHH.CameraSdk;
|
|
|
|
|
|
|
2025-12-27 14:16:50 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 视频流订阅配置请求对象
|
|
|
|
|
|
/// 用于定义第三方应用或内部模块对指定相机流的消费需求
|
|
|
|
|
|
/// </summary>
|
2025-12-26 12:15:10 +08:00
|
|
|
|
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;
|
|
|
|
|
|
|
2025-12-27 14:16:50 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 订阅业务类型。
|
|
|
|
|
|
/// 决定了后端流控引擎后续的资源分配(如是否开启录像机或渲染器)。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public SubscriptionType Type { get; set; }
|
|
|
|
|
|
|
2025-12-26 12:15:10 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 显示帧率需求 (单位: fps)
|
|
|
|
|
|
/// <para>不需要显示则设为 0,控制器会自动注销该类型需求</para>
|
|
|
|
|
|
/// </summary>
|
2025-12-27 14:16:50 +08:00
|
|
|
|
[Range(0, 30, ErrorMessage = "显示帧率需在 0-30 fps 范围内")]
|
2025-12-26 12:15:10 +08:00
|
|
|
|
public int DisplayFps { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-12-27 14:16:50 +08:00
|
|
|
|
/// 备注信息。
|
|
|
|
|
|
/// 用于记录订阅的用途、申请人或关联业务系统。
|
|
|
|
|
|
/// </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 时必填。
|
2025-12-26 12:15:10 +08:00
|
|
|
|
/// </summary>
|
2025-12-27 14:16:50 +08:00
|
|
|
|
public int TargetPort { get; set; }
|
2025-12-26 12:15:10 +08:00
|
|
|
|
}
|