支持国标移动位置订阅,收到新位置发送redis消息;支持通道redis消息拉起第三方推流;云台控制添加ControlPriority字段;处理sql的bug
This commit is contained in:
@@ -10,6 +10,9 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.sip.ResponseEvent;
|
||||
|
||||
/**
|
||||
* 目录订阅任务
|
||||
*/
|
||||
public class CatalogSubscribeTask implements Runnable{
|
||||
private final Logger logger = LoggerFactory.getLogger(CatalogSubscribeTask.class);
|
||||
private Device device;
|
||||
@@ -24,7 +27,6 @@ public class CatalogSubscribeTask implements Runnable{
|
||||
public void run() {
|
||||
sipCommander.catalogSubscribe(device, eventResult -> {
|
||||
ResponseEvent event = (ResponseEvent) eventResult.event;
|
||||
Element rootElement = null;
|
||||
if (event.getResponse().getRawContent() != null) {
|
||||
// 成功
|
||||
logger.info("[目录订阅]成功: {}", device.getDeviceId());
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.genersoft.iot.vmp.service.bean;
|
||||
|
||||
/**
|
||||
* 当上级平台
|
||||
*/
|
||||
public class MessageForPushChannel {
|
||||
/**
|
||||
* 消息类型
|
||||
* 0 流注销 1 流注册
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 流应用名
|
||||
*/
|
||||
private String app;
|
||||
|
||||
/**
|
||||
* 流Id
|
||||
*/
|
||||
private String stream;
|
||||
|
||||
/**
|
||||
* 国标ID
|
||||
*/
|
||||
private String gbId;
|
||||
|
||||
/**
|
||||
* 请求的平台ID
|
||||
*/
|
||||
private String platFormId;
|
||||
|
||||
/**
|
||||
* 请求平台名称
|
||||
*/
|
||||
private String platFormName;
|
||||
|
||||
/**
|
||||
* WVP服务ID
|
||||
*/
|
||||
private String serverId;
|
||||
|
||||
/**
|
||||
* 目标流媒体节点ID
|
||||
*/
|
||||
private String mediaServerId;
|
||||
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getApp() {
|
||||
return app;
|
||||
}
|
||||
|
||||
public void setApp(String app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
public String getStream() {
|
||||
return stream;
|
||||
}
|
||||
|
||||
public void setStream(String stream) {
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
public String getGbId() {
|
||||
return gbId;
|
||||
}
|
||||
|
||||
public void setGbId(String gbId) {
|
||||
this.gbId = gbId;
|
||||
}
|
||||
|
||||
public String getPlatFormId() {
|
||||
return platFormId;
|
||||
}
|
||||
|
||||
public void setPlatFormId(String platFormId) {
|
||||
this.platFormId = platFormId;
|
||||
}
|
||||
|
||||
public String getPlatFormName() {
|
||||
return platFormName;
|
||||
}
|
||||
|
||||
public void setPlatFormName(String platFormName) {
|
||||
this.platFormName = platFormName;
|
||||
}
|
||||
|
||||
public String getServerId() {
|
||||
return serverId;
|
||||
}
|
||||
|
||||
public void setServerId(String serverId) {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
|
||||
public String getMediaServerId() {
|
||||
return mediaServerId;
|
||||
}
|
||||
|
||||
public void setMediaServerId(String mediaServerId) {
|
||||
this.mediaServerId = mediaServerId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.genersoft.iot.vmp.service.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
|
||||
import org.dom4j.Element;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.sip.ResponseEvent;
|
||||
|
||||
public class MobilePositionSubscribeTask implements Runnable{
|
||||
private final Logger logger = LoggerFactory.getLogger(MobilePositionSubscribeTask.class);
|
||||
private Device device;
|
||||
private ISIPCommander sipCommander;
|
||||
|
||||
public MobilePositionSubscribeTask(Device device, ISIPCommander sipCommander) {
|
||||
this.device = device;
|
||||
this.sipCommander = sipCommander;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
sipCommander.mobilePositionSubscribe(device, eventResult -> {
|
||||
ResponseEvent event = (ResponseEvent) eventResult.event;
|
||||
Element rootElement = null;
|
||||
if (event.getResponse().getRawContent() != null) {
|
||||
// 成功
|
||||
logger.info("[移动位置订阅]成功: {}", device.getDeviceId());
|
||||
}else {
|
||||
// 成功
|
||||
logger.info("[移动位置订阅]成功: {}", device.getDeviceId());
|
||||
}
|
||||
},eventResult -> {
|
||||
// 失败
|
||||
logger.warn("[移动位置订阅]失败,信令发送失败: {}-{} ", device.getDeviceId(), eventResult.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user