You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
386 lines
12 KiB
386 lines
12 KiB
using System; |
|
using System.Collections.Generic; |
|
using System.Text; |
|
using System.Text.Json.Serialization; |
|
|
|
namespace Video.Application |
|
{ |
|
/// <summary> |
|
/// hls、rtmp回放请求的数据部分 |
|
/// </summary> |
|
public class PlaybackReqDto |
|
{ |
|
/// <summary> |
|
/// 通道ID(格式如:1000018$1$0$0) |
|
/// </summary> |
|
[JsonPropertyName("channelId")] |
|
public string ChannelId { get; set; } |
|
|
|
/// <summary> |
|
/// 流类型:1-主码流,2-子码流(通常为字符串或数字) |
|
/// </summary> |
|
[JsonPropertyName("streamType")] |
|
public string StreamType { get; set; } |
|
|
|
/// <summary> |
|
/// 输出类型,如 "hls"、"rtmp" 等,如果RTSP的回放,不加此字段 |
|
/// </summary> |
|
[JsonPropertyName("type")] |
|
public string? Type { get; set; } = "hls"; |
|
|
|
/// <summary> |
|
/// 录像类型:1-定时录像,2-移动侦测,3-报警录像等(字符串形式) |
|
/// </summary> |
|
[JsonPropertyName("recordType")] |
|
public string RecordType { get; set; } |
|
|
|
/// <summary> |
|
/// 回放开始时间,格式:"yyyy-M-d HH:mm:ss" |
|
/// </summary> |
|
[JsonPropertyName("beginTime")] |
|
public string BeginTime { get; set; } |
|
|
|
/// <summary> |
|
/// 回放结束时间,格式:"yyyy-M-d HH:mm:ss" |
|
/// </summary> |
|
[JsonPropertyName("endTime")] |
|
public string EndTime { get; set; } |
|
|
|
/// <summary> |
|
/// 录像来源:1-设备,2-平台,3-云端等 |
|
/// </summary> |
|
[JsonPropertyName("recordSource")] |
|
public string RecordSource { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// hls、rtmp回放请求的数据部分 |
|
/// </summary> |
|
public class RtspPlaybackReqDto |
|
{ |
|
/// <summary> |
|
/// 通道ID(格式如:1000018$1$0$0) |
|
/// </summary> |
|
[JsonPropertyName("channelId")] |
|
public string ChannelId { get; set; } |
|
|
|
/// <summary> |
|
/// 流类型:1-主码流,2-子码流(通常为字符串或数字) |
|
/// </summary> |
|
[JsonPropertyName("streamType")] |
|
public string StreamType { get; set; } |
|
|
|
/// <summary> |
|
/// 录像类型:1-定时录像,2-移动侦测,3-报警录像等(字符串形式) |
|
/// </summary> |
|
[JsonPropertyName("recordType")] |
|
public string RecordType { get; set; } |
|
|
|
/// <summary> |
|
/// 回放开始时间,格式:"yyyy-M-d HH:mm:ss" |
|
/// </summary> |
|
[JsonPropertyName("startTime")] |
|
public string startTime { get; set; } |
|
|
|
/// <summary> |
|
/// 回放结束时间,格式:"yyyy-M-d HH:mm:ss" |
|
/// </summary> |
|
[JsonPropertyName("endTime")] |
|
public string EndTime { get; set; } |
|
|
|
/// <summary> |
|
/// 录像来源:1-设备,2-平台,3-云端等 |
|
/// </summary> |
|
[JsonPropertyName("recordSource")] |
|
public string RecordSource { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// 通道分页查询请求参数实体 |
|
/// </summary> |
|
public class ChannelPageReqDto |
|
|
|
{ |
|
/// <summary> |
|
/// 当前页,可选,默认 1 |
|
/// </summary> |
|
[JsonPropertyName("pageNum")] |
|
public int? PageNum { get; set; } = 1; |
|
|
|
/// <summary> |
|
/// 每页记录数,可选,默认 10 |
|
/// </summary> |
|
[JsonPropertyName("pageSize")] |
|
public int? PageSize { get; set; } = 10; |
|
|
|
/// <summary> |
|
/// 排序属性,支持:id、updateTime、ownerCode、deviceCode、channelCode、unitType、channelType、cameraType、channelSn |
|
/// </summary> |
|
[JsonPropertyName("sort")] |
|
public string Sort { get; set; } |
|
|
|
/// <summary> |
|
/// 排序方式:ASC(升序),DESC(降序),默认 DESC |
|
/// </summary> |
|
[JsonPropertyName("sortType")] |
|
public string SortType { get; set; } = "DESC"; |
|
|
|
/// <summary> |
|
/// 所属组织编码 |
|
/// </summary> |
|
[JsonPropertyName("ownerCode")] |
|
public string OwnerCode { get; set; } |
|
|
|
/// <summary> |
|
/// 设备编码列表 |
|
/// </summary> |
|
[JsonPropertyName("deviceCodeList")] |
|
public List<string> DeviceCodeList { get; set; } |
|
|
|
/// <summary> |
|
/// 通道编码列表 |
|
/// </summary> |
|
[JsonPropertyName("channelCodeList")] |
|
public List<string> ChannelCodeList { get; set; } |
|
|
|
/// <summary> |
|
/// 设备大类 |
|
/// </summary> |
|
[JsonPropertyName("deviceCategory")] |
|
public int? DeviceCategory { get; set; } |
|
|
|
/// <summary> |
|
/// 设备小类(此字段生效时,deviceCategory 必填) |
|
/// </summary> |
|
[JsonPropertyName("deviceType")] |
|
public int? DeviceType { get; set; } |
|
|
|
/// <summary> |
|
/// 单元类型列表 |
|
/// </summary> |
|
[JsonPropertyName("unitTypeList")] |
|
public List<string> UnitTypeList { get; set; } |
|
|
|
/// <summary> |
|
/// 通道类型列表 |
|
/// </summary> |
|
[JsonPropertyName("channelTypeList")] |
|
public List<string> ChannelTypeList { get; set; } |
|
|
|
/// <summary> |
|
/// 在线状态:0-离线,1-在线 |
|
/// </summary> |
|
[JsonPropertyName("isOnline")] |
|
public int? IsOnline { get; set; } |
|
|
|
/// <summary> |
|
/// 是否已经接入:0-未接入,1-已接入 |
|
/// </summary> |
|
[JsonPropertyName("access")] |
|
public int? Access { get; set; } |
|
|
|
/// <summary> |
|
/// 是否是虚拟通道:0-否,1-是 |
|
/// </summary> |
|
[JsonPropertyName("isVirtual")] |
|
public int? IsVirtual { get; set; } |
|
|
|
/// <summary> |
|
/// 状态:0-禁用,1-启用(具体值依业务而定) |
|
/// </summary> |
|
[JsonPropertyName("stat")] |
|
public int? Stat { get; set; } |
|
|
|
/// <summary> |
|
/// 是否包含子节点,默认 true,表示查询时包含下级组织的通道 |
|
/// </summary> |
|
[JsonPropertyName("includeSubOwnerCodeFlag")] |
|
public bool? IncludeSubOwnerCodeFlag { get; set; } = true; |
|
|
|
// 鉴权的token |
|
public string? Token { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// 实时流播放请求数据实体 |
|
/// </summary> |
|
public class StreamRequestData |
|
{ |
|
/// <summary> |
|
/// 通道编码 |
|
/// </summary> |
|
[JsonPropertyName("channelId")] |
|
public string ChannelId { get; set; } |
|
|
|
/// <summary> |
|
/// 码流类型:1-主码流,2-子码流 |
|
/// </summary> |
|
[JsonPropertyName("streamType")] |
|
public string StreamType { get; set; } |
|
|
|
/// <summary> |
|
/// 协议类型:hls,hlss,flv,flvs,ws_flv,wss_flv,rtmp |
|
/// hls:http协议,m3u8格式,端口7086; |
|
///hlss:https协议,m3u8格式,端口是7096; |
|
///flv:http协议,flv格式,端口7886; |
|
///flvs:https协议,flv格式,端口是7896; |
|
///ws_flv:ws协议,flv格式,端口是7886; |
|
///wss_flv:wss协议,flv格式,端口是7896; |
|
///rtmp:rtmp协议,端口是1975; |
|
/// </summary> |
|
[JsonPropertyName("type")] |
|
public string? Type { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// 实时 流播放请求响应包装类 |
|
/// </summary> |
|
public class StreamReqDto |
|
{ |
|
/// <summary> |
|
/// 请求数据 |
|
/// </summary> |
|
[JsonPropertyName("data")] |
|
public StreamRequestData Data { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// 实时 流播放请求响应包装类 |
|
/// </summary> |
|
public class StreamRtspReqDto |
|
{ |
|
/// <summary> |
|
/// 请求数据 |
|
/// </summary> |
|
[JsonPropertyName("data")] |
|
public StreamRtspRequestData Data { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// 实时流播放请求数据实体 |
|
/// </summary> |
|
public class StreamRtspRequestData |
|
{ |
|
/// <summary> |
|
/// 通道编码 |
|
/// </summary> |
|
[JsonPropertyName("channelId")] |
|
public string ChannelId { get; set; } |
|
|
|
/// <summary> |
|
/// 码流类型:1-主码流,2-子码流 |
|
/// </summary> |
|
[JsonPropertyName("streamType")] |
|
public string StreamType { get; set; } |
|
|
|
/// <summary> |
|
/// rtsp专用,有datatype没有type,有type没有datatype |
|
/// </summary> |
|
[JsonPropertyName("dataType")] |
|
public string? DataType { get; set; } |
|
} |
|
|
|
/// <summary> |
|
/// 大华下载 |
|
/// </summary> |
|
public class PlayDownloadReqDto |
|
{ |
|
/// <summary> |
|
/// 通道编号,格式:设备编码%24通道号 |
|
/// 示例:通道编码 1000006$1$0$25 → vcuid = 1000006%2425 |
|
/// </summary> |
|
[JsonPropertyName("vcuid")] |
|
public string Vcuid { get; set; } |
|
|
|
/// <summary> |
|
/// 码流类型:1-主码流,2-辅码流 |
|
/// </summary> |
|
[JsonPropertyName("subtype")] |
|
public string Subtype { get; set; } |
|
|
|
/// <summary> |
|
/// 开始时间,格式:yyyy_M_d_HH_mm_ss(如:2023_3_23_14_48_36) |
|
/// 注意:月份、日期、时间无前导零 |
|
/// </summary> |
|
[JsonPropertyName("starttime")] |
|
public DateTime Starttime { get; set; } |
|
|
|
/// <summary> |
|
/// 结束时间,格式:yyyy_M_d_HH_mm_ss(如:2023_3_23_18_48_36) |
|
/// 注意:月份、日期、时间无前导零 |
|
/// </summary> |
|
[JsonPropertyName("endtime")] |
|
public DateTime Endtime { get; set; } |
|
|
|
/// <summary> |
|
/// 录像回放类型:2-设备录像,3-中心录像 |
|
/// </summary> |
|
[JsonPropertyName("videoType")] |
|
public string VideoType { get; set; } |
|
|
|
/// <summary> |
|
/// 鉴权 Token(access_token),来自认证接口 |
|
/// </summary> |
|
[JsonPropertyName("token")] |
|
public string? Token { get; set; } |
|
|
|
/// <summary> |
|
/// 录像类型: |
|
/// - 当 videoType=2(设备录像)时,固定为 "0" |
|
/// - 当 videoType=3(中心录像)时,取值: |
|
/// 1:普通录像 |
|
/// 2:报警录像 |
|
/// 81:补录录像 |
|
/// 82:预录录像 |
|
/// </summary> |
|
[JsonPropertyName("recordType")] |
|
public string RecordType { get; set; } |
|
} |
|
|
|
public class DownloadReqDto |
|
{ |
|
/// <summary> |
|
/// 1. 通道编号(必选) |
|
/// 组成=设备编码%24通道号; |
|
/// 例如:通道编码是1000006$1$0$25,则通道编号为1000006%2425 |
|
/// </summary> |
|
[JsonPropertyName("vcuid")] |
|
public required string Vcuid { get; set; } |
|
|
|
/// <summary> |
|
/// 2. 码流类型(必选) |
|
/// 1-主码流 2-辅码流 |
|
/// </summary> |
|
[JsonPropertyName("subtype")] |
|
public required string Subtype { get; set; } = "1"; |
|
|
|
/// <summary> |
|
/// 3. 开始时间(必选) |
|
/// 格式:2023_3_23_14_48_36 |
|
/// </summary> |
|
[JsonPropertyName("starttime")] |
|
public required string StartTime { get; set; } |
|
|
|
/// <summary> |
|
/// 4. 结束时间(必选) |
|
/// 格式:2023_3_23_18_48_36 |
|
/// </summary> |
|
[JsonPropertyName("endtime")] |
|
public required string EndTime { get; set; } |
|
|
|
/// <summary> |
|
/// 5. 录像回放类型(必选) |
|
/// 2-设备录像 3-中心录像 |
|
/// </summary> |
|
[JsonPropertyName("videoType")] |
|
public required string VideoType { get; set; } |
|
|
|
/// <summary> |
|
/// 7. 录像类型(必选) |
|
/// 录像存储为设备录像时,即videoType=2时,recordType固定送0; |
|
/// 录像存储是中心存储时,即videoType=3时,参考枚举:1:普通录像 2:报警录像 81:补录录像 82:预录录像 |
|
/// </summary> |
|
[JsonPropertyName("recordType")] |
|
public required string RecordType { get; set; } |
|
} |
|
} |