依赖包版本升级
This commit is contained in:
@@ -1,41 +1,50 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 国标设备/平台
|
||||
* @author lin
|
||||
*/
|
||||
@Schema(description = "国标设备/平台")
|
||||
public class Device {
|
||||
|
||||
/**
|
||||
* 设备Id
|
||||
* 设备国标编号
|
||||
*/
|
||||
@Schema(description = "设备国标编号")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 设备名
|
||||
*/
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 生产厂商
|
||||
*/
|
||||
@Schema(description = "生产厂商")
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
@Schema(description = "型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 固件版本
|
||||
*/
|
||||
@Schema(description = "固件版本")
|
||||
private String firmware;
|
||||
|
||||
/**
|
||||
* 传输协议
|
||||
* UDP/TCP
|
||||
*/
|
||||
@Schema(description = "传输协议(UDP/TCP)")
|
||||
private String transport;
|
||||
|
||||
/**
|
||||
@@ -44,103 +53,123 @@ public class Device {
|
||||
* TCP-ACTIVE:tcp主动模式
|
||||
* TCP-PASSIVE:tcp被动模式
|
||||
*/
|
||||
@Schema(description = "数据流传输模式")
|
||||
private String streamMode;
|
||||
|
||||
/**
|
||||
* wan地址_ip
|
||||
*/
|
||||
@Schema(description = "IP")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* wan地址_port
|
||||
*/
|
||||
@Schema(description = "端口")
|
||||
private int port;
|
||||
|
||||
/**
|
||||
* wan地址
|
||||
*/
|
||||
@Schema(description = "wan地址")
|
||||
private String hostAddress;
|
||||
|
||||
/**
|
||||
* 在线
|
||||
*/
|
||||
@Schema(description = "是否在线,1为在线,0为离线")
|
||||
private int online;
|
||||
|
||||
|
||||
/**
|
||||
* 注册时间
|
||||
*/
|
||||
@Schema(description = "注册时间")
|
||||
private String registerTime;
|
||||
|
||||
|
||||
/**
|
||||
* 心跳时间
|
||||
*/
|
||||
@Schema(description = "心跳时间")
|
||||
private String keepaliveTime;
|
||||
|
||||
/**
|
||||
* 通道个数
|
||||
*/
|
||||
@Schema(description = "通道个数")
|
||||
private int channelCount;
|
||||
|
||||
/**
|
||||
* 注册有效期
|
||||
*/
|
||||
@Schema(description = "注册有效期")
|
||||
private int expires;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 设备使用的媒体id, 默认为null
|
||||
*/
|
||||
@Schema(description = "设备使用的媒体id, 默认为null")
|
||||
private String mediaServerId;
|
||||
|
||||
/**
|
||||
* 字符集, 支持 UTF-8 与 GB2312
|
||||
*/
|
||||
@Schema(description = "符集, 支持 UTF-8 与 GB2312")
|
||||
private String charset ;
|
||||
|
||||
/**
|
||||
* 目录订阅周期,0为不订阅
|
||||
*/
|
||||
@Schema(description = "目录订阅周期,0为不订阅")
|
||||
private int subscribeCycleForCatalog;
|
||||
|
||||
/**
|
||||
* 移动设备位置订阅周期,0为不订阅
|
||||
*/
|
||||
@Schema(description = "移动设备位置订阅周期,0为不订阅")
|
||||
private int subscribeCycleForMobilePosition;
|
||||
|
||||
/**
|
||||
* 移动设备位置信息上报时间间隔,单位:秒,默认值5
|
||||
*/
|
||||
@Schema(description = "移动设备位置信息上报时间间隔,单位:秒,默认值5")
|
||||
private int mobilePositionSubmissionInterval = 5;
|
||||
|
||||
/**
|
||||
* 报警订阅周期,0为不订阅
|
||||
*/
|
||||
@Schema(description = "报警心跳时间订阅周期,0为不订阅")
|
||||
private int subscribeCycleForAlarm;
|
||||
|
||||
/**
|
||||
* 是否开启ssrc校验,默认关闭,开启可以防止串流
|
||||
*/
|
||||
@Schema(description = "是否开启ssrc校验,默认关闭,开启可以防止串流")
|
||||
private boolean ssrcCheck = true;
|
||||
|
||||
/**
|
||||
* 地理坐标系, 目前支持 WGS84,GCJ02 TODO CGCS2000
|
||||
* 地理坐标系, 目前支持 WGS84,GCJ02
|
||||
*/
|
||||
@Schema(description = "地理坐标系, 目前支持 WGS84,GCJ02")
|
||||
private String geoCoordSys;
|
||||
|
||||
/**
|
||||
* 树类型 国标规定了两种树的展现方式 行政区划:CivilCode 和业务分组:BusinessGroup
|
||||
*/
|
||||
@Schema(description = "树类型 国标规定了两种树的展现方式 行政区划:CivilCode 和业务分组:BusinessGroup")
|
||||
private String treeType;
|
||||
|
||||
|
||||
|
||||
@@ -1,52 +1,67 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
@Schema(description = "报警信息")
|
||||
public class DeviceAlarm {
|
||||
|
||||
/**
|
||||
* 数据库id
|
||||
*/
|
||||
@Schema(description = "数据库id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 设备Id
|
||||
*/
|
||||
@Schema(description = "设备的国标编号")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 通道Id
|
||||
*/
|
||||
@Schema(description = "通道的国标编号")
|
||||
private String channelId;
|
||||
|
||||
/**
|
||||
* 报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级 警情-
|
||||
* 报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情
|
||||
*/
|
||||
@Schema(description = "报警级别, 1为一级警情, 2为二级警情, 3为三级警情, 4为四级警情")
|
||||
private String alarmPriority;
|
||||
|
||||
/**
|
||||
* 报警方式 , 1为电话报警, 2为设备报警, 3为短信报警, 4为 GPS报警, 5为视频报警, 6为设备故障报警,
|
||||
* 7其他报警;可以为直接组合如12为电话报警或 设备报警-
|
||||
*/
|
||||
@Schema(description = "报警方式 , 1为电话报警, 2为设备报警, 3为短信报警, 4为 GPS报警, 5为视频报警, 6为设备故障报警,\n" +
|
||||
"\t * 7其他报警;可以为直接组合如12为电话报警或设备报警")
|
||||
private String alarmMethod;
|
||||
|
||||
/**
|
||||
* 报警时间
|
||||
*/
|
||||
@Schema(description = "报警时间")
|
||||
private String alarmTime;
|
||||
|
||||
/**
|
||||
* 报警内容描述
|
||||
*/
|
||||
@Schema(description = "报警内容描述")
|
||||
private String alarmDescription;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
private double longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
private double latitude;
|
||||
|
||||
/**
|
||||
@@ -75,8 +90,10 @@ public class DeviceAlarm {
|
||||
* 1-存储设备磁盘故障报警;
|
||||
* 2-存储设备风扇故障报警。
|
||||
*/
|
||||
@Schema(description = "报警类型")
|
||||
private String alarmType;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
|
||||
|
||||
@@ -1,136 +1,165 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "通道信息")
|
||||
public class DeviceChannel {
|
||||
|
||||
|
||||
/**
|
||||
* 数据库自增ID
|
||||
*/
|
||||
@Schema(description = "数据库自增ID")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* 通道id
|
||||
* 通道国标编号
|
||||
*/
|
||||
@Schema(description = "通道国标编号")
|
||||
private String channelId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
* 设备国标编号
|
||||
*/
|
||||
@Schema(description = "设备国标编号")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 通道名
|
||||
*/
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 生产厂商
|
||||
*/
|
||||
@Schema(description = "生产厂商")
|
||||
private String manufacture;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
@Schema(description = "型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 设备归属
|
||||
*/
|
||||
@Schema(description = "设备归属")
|
||||
private String owner;
|
||||
|
||||
/**
|
||||
* 行政区域
|
||||
*/
|
||||
@Schema(description = "行政区域")
|
||||
private String civilCode;
|
||||
|
||||
/**
|
||||
* 警区
|
||||
*/
|
||||
@Schema(description = "警区")
|
||||
private String block;
|
||||
|
||||
/**
|
||||
* 安装地址
|
||||
*/
|
||||
@Schema(description = "安装地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 是否有子设备 1有, 0没有
|
||||
*/
|
||||
@Schema(description = "是否有子设备 1有, 0没有")
|
||||
private int parental;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
@Schema(description = "父级id")
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 信令安全模式 缺省为0; 0:不采用; 2: S/MIME签名方式; 3: S/ MIME加密签名同时采用方式; 4:数字摘要方式
|
||||
*/
|
||||
@Schema(description = "信令安全模式 缺省为0; 0:不采用; 2: S/MIME签名方式; 3: S/ MIME加密签名同时采用方式; 4:数字摘要方式")
|
||||
private int safetyWay;
|
||||
|
||||
/**
|
||||
* 注册方式 缺省为1;1:符合IETFRFC3261标准的认证注册模 式; 2:基于口令的双向认证注册模式; 3:基于数字证书的双向认证注册模式
|
||||
*/
|
||||
@Schema(description = "注册方式 缺省为1;1:符合IETFRFC3261标准的认证注册模 式; 2:基于口令的双向认证注册模式; 3:基于数字证书的双向认证注册模式")
|
||||
private int registerWay;
|
||||
|
||||
/**
|
||||
* 证书序列号
|
||||
*/
|
||||
@Schema(description = "证书序列号")
|
||||
private String certNum;
|
||||
|
||||
/**
|
||||
* 证书有效标识 缺省为0;证书有效标识:0:无效1: 有效
|
||||
*/
|
||||
@Schema(description = "证书有效标识 缺省为0;证书有效标识:0:无效1: 有效")
|
||||
private int certifiable;
|
||||
|
||||
/**
|
||||
* 证书无效原因码
|
||||
*/
|
||||
@Schema(description = "证书无效原因码")
|
||||
private int errCode;
|
||||
|
||||
/**
|
||||
* 证书终止有效期
|
||||
*/
|
||||
@Schema(description = "证书终止有效期")
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 保密属性 缺省为0; 0:不涉密, 1:涉密
|
||||
*/
|
||||
@Schema(description = "保密属性 缺省为0; 0:不涉密, 1:涉密")
|
||||
private String secrecy;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@Schema(description = "IP地址")
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* 端口号
|
||||
*/
|
||||
@Schema(description = "端口号")
|
||||
private int port;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 云台类型
|
||||
*/
|
||||
@Schema(description = "云台类型")
|
||||
private int PTZType;
|
||||
|
||||
/**
|
||||
* 云台类型描述字符串
|
||||
*/
|
||||
@Schema(description = "云台类型描述字符串")
|
||||
private String PTZTypeText;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
@@ -142,66 +171,79 @@ public class DeviceChannel {
|
||||
* <Status>OFF</Status>
|
||||
* 遇到过NVR下的IPC下发信令可以推流, 但是 Status 响应 OFF
|
||||
*/
|
||||
@Schema(description = "在线/离线, 1在线,0离线")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(description = "经度")
|
||||
private double longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(description = "纬度")
|
||||
private double latitude;
|
||||
|
||||
/**
|
||||
* 经度 GCJ02
|
||||
*/
|
||||
@Schema(description = "GCJ02坐标系经度")
|
||||
private double longitudeGcj02;
|
||||
|
||||
/**
|
||||
* 纬度 GCJ02
|
||||
*/
|
||||
@Schema(description = "GCJ02坐标系纬度")
|
||||
private double latitudeGcj02;
|
||||
|
||||
/**
|
||||
* 经度 WGS84
|
||||
*/
|
||||
@Schema(description = "WGS84坐标系经度")
|
||||
private double longitudeWgs84;
|
||||
|
||||
/**
|
||||
* 纬度 WGS84
|
||||
*/
|
||||
@Schema(description = "WGS84坐标系纬度")
|
||||
private double latitudeWgs84;
|
||||
|
||||
/**
|
||||
* 子设备数
|
||||
*/
|
||||
@Schema(description = "子设备数")
|
||||
private int subCount;
|
||||
|
||||
/**
|
||||
* 流唯一编号,存在表示正在直播
|
||||
*/
|
||||
@Schema(description = "流唯一编号,存在表示正在直播")
|
||||
private String streamId;
|
||||
|
||||
/**
|
||||
* 是否含有音频
|
||||
*/
|
||||
@Schema(description = "是否含有音频")
|
||||
private boolean hasAudio;
|
||||
|
||||
/**
|
||||
* 标记通道的类型,0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划
|
||||
*/
|
||||
@Schema(description = "标记通道的类型,0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划")
|
||||
private int channelType;
|
||||
|
||||
/**
|
||||
* 业务分组
|
||||
*/
|
||||
@Schema(description = "业务分组")
|
||||
private String businessGroupId;
|
||||
|
||||
/**
|
||||
* GPS的更新时间
|
||||
*/
|
||||
@Schema(description = "GPS的更新时间")
|
||||
private String gpsTime;
|
||||
|
||||
public int getId() {
|
||||
|
||||
@@ -1,21 +1,36 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 直播流关联国标上级平台
|
||||
* @author lin
|
||||
*/
|
||||
@Schema(description = "直播流关联国标上级平台")
|
||||
public class GbStream extends PlatformGbStream{
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Integer gbStreamId;
|
||||
@Schema(description = "应用名")
|
||||
private String app;
|
||||
@Schema(description = "流ID")
|
||||
private String stream;
|
||||
@Schema(description = "国标ID")
|
||||
private String gbId;
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
@Schema(description = "流媒体ID")
|
||||
private String mediaServerId;
|
||||
@Schema(description = "经度")
|
||||
private double longitude;
|
||||
@Schema(description = "纬度")
|
||||
private double latitude;
|
||||
@Schema(description = "流类型(拉流/推流)")
|
||||
private String streamType;
|
||||
@Schema(description = "状态")
|
||||
private boolean status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
public String createTime;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,157 +1,193 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
@Schema(description = "平台信息")
|
||||
public class ParentPlatform {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Schema(description = "ID(数据库中)")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@Schema(description = "是否启用")
|
||||
private boolean enable;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* SIP服务国标编码
|
||||
*/
|
||||
@Schema(description = "SIP服务国标编码")
|
||||
private String serverGBId;
|
||||
|
||||
/**
|
||||
* SIP服务国标域
|
||||
*/
|
||||
@Schema(description = "SIP服务国标域")
|
||||
private String serverGBDomain;
|
||||
|
||||
/**
|
||||
* SIP服务IP
|
||||
*/
|
||||
@Schema(description = "SIP服务IP")
|
||||
private String serverIP;
|
||||
|
||||
/**
|
||||
* SIP服务端口
|
||||
*/
|
||||
@Schema(description = "SIP服务端口")
|
||||
private int serverPort;
|
||||
|
||||
/**
|
||||
* 设备国标编号
|
||||
*/
|
||||
@Schema(description = "11111")
|
||||
private String deviceGBId;
|
||||
|
||||
/**
|
||||
* 设备ip
|
||||
*/
|
||||
@Schema(description = "设备ip")
|
||||
private String deviceIp;
|
||||
|
||||
/**
|
||||
* 设备端口
|
||||
*/
|
||||
@Schema(description = "设备端口")
|
||||
private String devicePort;
|
||||
|
||||
/**
|
||||
* SIP认证用户名(默认使用设备国标编号)
|
||||
*/
|
||||
@Schema(description = "SIP认证用户名(默认使用设备国标编号)")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* SIP认证密码
|
||||
*/
|
||||
@Schema(description = "SIP认证密码")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 注册周期 (秒)
|
||||
*/
|
||||
@Schema(description = "注册周期 (秒)")
|
||||
private String expires;
|
||||
|
||||
/**
|
||||
* 心跳周期(秒)
|
||||
*/
|
||||
@Schema(description = "心跳周期(秒)")
|
||||
private String keepTimeout;
|
||||
|
||||
/**
|
||||
* 传输协议
|
||||
* UDP/TCP
|
||||
*/
|
||||
@Schema(description = "传输协议")
|
||||
private String transport;
|
||||
|
||||
/**
|
||||
* 字符集
|
||||
*/
|
||||
@Schema(description = "字符集")
|
||||
private String characterSet;
|
||||
|
||||
/**
|
||||
* 允许云台控制
|
||||
*/
|
||||
@Schema(description = "允许云台控制")
|
||||
private boolean ptz;
|
||||
|
||||
/**
|
||||
* RTCP流保活
|
||||
* TODO 预留, 暂不实现
|
||||
*/
|
||||
@Schema(description = "RTCP流保活")
|
||||
private boolean rtcp;
|
||||
|
||||
/**
|
||||
* 在线状态
|
||||
*/
|
||||
@Schema(description = "在线状态")
|
||||
private boolean status;
|
||||
|
||||
/**
|
||||
* 在线状态
|
||||
*/
|
||||
@Schema(description = "在线状态")
|
||||
private int channelCount;
|
||||
|
||||
/**
|
||||
* 默认目录Id,自动添加的通道多放在这个目录下
|
||||
*/
|
||||
@Schema(description = "默认目录Id,自动添加的通道多放在这个目录下")
|
||||
private String catalogId;
|
||||
|
||||
/**
|
||||
* 已被订阅目录信息
|
||||
*/
|
||||
@Schema(description = "已被订阅目录信息")
|
||||
private boolean catalogSubscribe;
|
||||
|
||||
/**
|
||||
* 已被订阅报警信息
|
||||
*/
|
||||
@Schema(description = "已被订阅报警信息")
|
||||
private boolean alarmSubscribe;
|
||||
|
||||
/**
|
||||
* 已被订阅移动位置信息
|
||||
*/
|
||||
@Schema(description = "已被订阅移动位置信息")
|
||||
private boolean mobilePositionSubscribe;
|
||||
|
||||
/**
|
||||
* 点播未推流的设备时是否使用redis通知拉起
|
||||
*/
|
||||
@Schema(description = "点播未推流的设备时是否使用redis通知拉起")
|
||||
private boolean startOfflinePush;
|
||||
|
||||
/**
|
||||
* 目录分组-每次向上级发送通道信息时单个包携带的通道数量,取值1,2,4,8
|
||||
*/
|
||||
@Schema(description = "目录分组-每次向上级发送通道信息时单个包携带的通道数量,取值1,2,4,8")
|
||||
private int catalogGroup;
|
||||
|
||||
/**
|
||||
* 行政区划
|
||||
*/
|
||||
@Schema(description = "行政区划")
|
||||
private String administrativeDivision;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Schema(description = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 树类型 国标规定了两种树的展现方式 行政区划 CivilCode 和业务分组:BusinessGroup
|
||||
*/
|
||||
@Schema(description = "树类型 国标规定了两种树的展现方式 行政区划 CivilCode 和业务分组:BusinessGrou")
|
||||
private String treeType;
|
||||
|
||||
public Integer getId() {
|
||||
|
||||
@@ -1,27 +1,41 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 国标级联-目录
|
||||
* @author lin
|
||||
*/
|
||||
@Schema(description = "目录信息")
|
||||
public class PlatformCatalog {
|
||||
@Schema(description = "ID")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "平台ID")
|
||||
private String platformId;
|
||||
|
||||
@Schema(description = "父级目录ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "行政区划")
|
||||
private String civilCode;
|
||||
|
||||
@Schema(description = "目录分组")
|
||||
private String businessGroupId;
|
||||
|
||||
/**
|
||||
* 子节点数
|
||||
*/
|
||||
@Schema(description = "子节点数")
|
||||
private int childrenCount;
|
||||
|
||||
/**
|
||||
* 0 目录, 1 国标通道, 2 直播流
|
||||
*/
|
||||
@Schema(description = "类型:0 目录, 1 国标通道, 2 直播流")
|
||||
private int type;
|
||||
|
||||
public String getId() {
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
public class PlatformGbStream {
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Integer gbStreamId;
|
||||
|
||||
@Schema(description = "平台ID")
|
||||
private String platformId;
|
||||
|
||||
@Schema(description = "目录ID")
|
||||
private String catalogId;
|
||||
|
||||
public Integer getGbStreamId() {
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 摄像机同步状态
|
||||
* @author lin
|
||||
*/
|
||||
@Schema(description = "摄像机同步状态")
|
||||
public class SyncStatus {
|
||||
@Schema(description = "总数")
|
||||
private int total;
|
||||
@Schema(description = "当前更新多少")
|
||||
private int current;
|
||||
@Schema(description = "错误描述")
|
||||
private String errorMsg;
|
||||
|
||||
@Schema(description = "是否同步中")
|
||||
private boolean syncIng;
|
||||
|
||||
public int getTotal() {
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
package com.genersoft.iot.vmp.gb28181.event.offline;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.RedisKeyExpirationEventMessageListener;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.connection.Message;
|
||||
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
||||
|
||||
/**
|
||||
* 设备心跳超时监听,借助redis过期特性,进行监听,监听到说明设备心跳超时,发送离线事件
|
||||
* @author swwheihei
|
||||
*/
|
||||
@Component
|
||||
public class KeepaliveTimeoutListenerForPlatform extends RedisKeyExpirationEventMessageListener {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(KeepaliveTimeoutListenerForPlatform.class);
|
||||
|
||||
@Autowired
|
||||
private EventPublisher publisher;
|
||||
|
||||
@Autowired
|
||||
private UserSetting userSetting;
|
||||
|
||||
@Autowired
|
||||
private SipSubscribe sipSubscribe;
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorage storager;
|
||||
|
||||
public KeepaliveTimeoutListenerForPlatform(RedisMessageListenerContainer listenerContainer, UserSetting userSetting) {
|
||||
super(listenerContainer, userSetting);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 监听失效的key
|
||||
* @param message
|
||||
* @param pattern
|
||||
*/
|
||||
@Override
|
||||
public void onMessage(Message message, byte[] pattern) {
|
||||
// 获取失效的key
|
||||
String expiredKey = message.toString();
|
||||
// 平台心跳到期,需要重发, 判断是否已经多次未收到心跳回复, 多次未收到,则重新发起注册, 注册尝试多次未得到回复,则认为平台离线
|
||||
String PLATFORM_KEEPLIVEKEY_PREFIX = VideoManagerConstants.PLATFORM_KEEPALIVE_PREFIX + userSetting.getServerId() + "_";
|
||||
String PLATFORM_REGISTER_PREFIX = VideoManagerConstants.PLATFORM_REGISTER_PREFIX + userSetting.getServerId() + "_";
|
||||
String REGISTER_INFO_PREFIX = VideoManagerConstants.PLATFORM_REGISTER_INFO_PREFIX + userSetting.getServerId() + "_";
|
||||
if (expiredKey.startsWith(PLATFORM_KEEPLIVEKEY_PREFIX)) {
|
||||
String platformGbId = expiredKey.substring(PLATFORM_KEEPLIVEKEY_PREFIX.length());
|
||||
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformGbId);
|
||||
if (platform != null) {
|
||||
publisher.platformKeepaliveExpireEventPublish(platformGbId);
|
||||
}
|
||||
}else if (expiredKey.startsWith(PLATFORM_REGISTER_PREFIX)) {
|
||||
String platformGbId = expiredKey.substring(PLATFORM_REGISTER_PREFIX.length(),expiredKey.length());
|
||||
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformGbId);
|
||||
if (platform != null) {
|
||||
publisher.platformRegisterCycleEventPublish(platformGbId);
|
||||
}
|
||||
}else if (expiredKey.startsWith(REGISTER_INFO_PREFIX)) {
|
||||
String callId = expiredKey.substring(REGISTER_INFO_PREFIX.length());
|
||||
if (sipSubscribe.getErrorSubscribe(callId) != null) {
|
||||
SipSubscribe.EventResult eventResult = new SipSubscribe.EventResult();
|
||||
eventResult.callId = callId;
|
||||
eventResult.msg = "注册超时";
|
||||
eventResult.type = "register timeout";
|
||||
sipSubscribe.getErrorSubscribe(callId).response(eventResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,35 @@
|
||||
package com.genersoft.iot.vmp.gb28181.session;
|
||||
|
||||
import com.genersoft.iot.vmp.utils.ConfigConst;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "ssrc信息")
|
||||
public class SsrcConfig {
|
||||
|
||||
/**
|
||||
* zlm流媒体服务器Id
|
||||
*/
|
||||
@Schema(description = "流媒体服务器Id")
|
||||
private String mediaServerId;
|
||||
|
||||
@Schema(description = "SSRC前缀")
|
||||
private String ssrcPrefix;
|
||||
|
||||
/**
|
||||
* zlm流媒体服务器已用会话句柄
|
||||
*/
|
||||
@Schema(description = "zlm流媒体服务器已用会话句柄")
|
||||
private List<String> isUsed;
|
||||
|
||||
/**
|
||||
* zlm流媒体服务器可用会话句柄
|
||||
*/
|
||||
@Schema(description = "zlm流媒体服务器可用会话句柄")
|
||||
private List<String> notUsed;
|
||||
|
||||
public SsrcConfig() {
|
||||
|
||||
@@ -24,9 +24,6 @@ import org.springframework.util.StringUtils;
|
||||
@Component
|
||||
public class VideoStreamSessionManager {
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Autowired
|
||||
private UserSetting userSetting;
|
||||
|
||||
@@ -58,9 +55,9 @@ public class VideoStreamSessionManager {
|
||||
ssrcTransaction.setMediaServerId(mediaServerId);
|
||||
ssrcTransaction.setType(type);
|
||||
|
||||
redisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
|
||||
RedisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
|
||||
+ "_" + deviceId + "_" + channelId + "_" + callId + "_" + stream, ssrcTransaction);
|
||||
redisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
|
||||
RedisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
|
||||
+ "_" + deviceId + "_" + channelId + "_" + callId + "_" + stream, ssrcTransaction);
|
||||
}
|
||||
|
||||
@@ -70,7 +67,7 @@ public class VideoStreamSessionManager {
|
||||
byte[] dialogByteArray = SerializeUtils.serialize(dialog);
|
||||
ssrcTransaction.setDialog(dialogByteArray);
|
||||
}
|
||||
redisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
|
||||
RedisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
|
||||
+ "_" + deviceId + "_" + channelId + "_" + ssrcTransaction.getCallId() + "_"
|
||||
+ ssrcTransaction.getStream(), ssrcTransaction);
|
||||
}
|
||||
@@ -126,11 +123,11 @@ public class VideoStreamSessionManager {
|
||||
stream ="*";
|
||||
}
|
||||
String key = VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId() + "_" + deviceId + "_" + channelId + "_" + callId+ "_" + stream;
|
||||
List<Object> scanResult = redisUtil.scan(key);
|
||||
List<Object> scanResult = RedisUtil.scan(key);
|
||||
if (scanResult.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return (SsrcTransaction)redisUtil.get((String) scanResult.get(0));
|
||||
return (SsrcTransaction)RedisUtil.get((String) scanResult.get(0));
|
||||
}
|
||||
|
||||
public List<SsrcTransaction> getSsrcTransactionForAll(String deviceId, String channelId, String callId, String stream){
|
||||
@@ -147,13 +144,13 @@ public class VideoStreamSessionManager {
|
||||
stream ="*";
|
||||
}
|
||||
String key = VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId() + "_" + deviceId + "_" + channelId + "_" + callId+ "_" + stream;
|
||||
List<Object> scanResult = redisUtil.scan(key);
|
||||
List<Object> scanResult = RedisUtil.scan(key);
|
||||
if (scanResult.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
List<SsrcTransaction> result = new ArrayList<>();
|
||||
for (Object keyObj : scanResult) {
|
||||
result.add((SsrcTransaction)redisUtil.get((String) keyObj));
|
||||
result.add((SsrcTransaction)RedisUtil.get((String) keyObj));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -179,17 +176,17 @@ public class VideoStreamSessionManager {
|
||||
if (ssrcTransaction == null) {
|
||||
return;
|
||||
}
|
||||
redisUtil.del(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId() + "_"
|
||||
RedisUtil.del(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId() + "_"
|
||||
+ deviceId + "_" + channelId + "_" + ssrcTransaction.getCallId() + "_" + ssrcTransaction.getStream());
|
||||
}
|
||||
|
||||
|
||||
public List<SsrcTransaction> getAllSsrc() {
|
||||
List<Object> ssrcTransactionKeys = redisUtil.scan(String.format("%s_*_*_*_*", VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX+ userSetting.getServerId()));
|
||||
List<Object> ssrcTransactionKeys = RedisUtil.scan(String.format("%s_*_*_*_*", VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX+ userSetting.getServerId()));
|
||||
List<SsrcTransaction> result= new ArrayList<>();
|
||||
for (int i = 0; i < ssrcTransactionKeys.size(); i++) {
|
||||
String key = (String)ssrcTransactionKeys.get(i);
|
||||
SsrcTransaction ssrcTransaction = (SsrcTransaction)redisUtil.get(key);
|
||||
SsrcTransaction ssrcTransaction = (SsrcTransaction)RedisUtil.get(key);
|
||||
result.add(ssrcTransaction);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user