默认推流通道始终在线
parent
81f1b8ee25
commit
fcf8c40150
11
README.md
11
README.md
|
@ -130,5 +130,14 @@ QQ私信一般不回, 精力有限.欢迎大家在群里讨论.觉得项目对
|
|||
|
||||
|
||||
# 致谢
|
||||
感谢作者[夏楚](https://github.com/xia-chu) 提供这么棒的开源流媒体服务框架
|
||||
感谢作者[夏楚](https://github.com/xia-chu) 提供这么棒的开源流媒体服务框架,并在开发过程中给予支持与帮助。
|
||||
感谢作者[dexter langhuihui](https://github.com/langhuihui) 开源这么好用的WEB播放器。
|
||||
感谢作者[Kyle](https://gitee.com/kkkkk5G) 开源了好用的前端页面
|
||||
感谢各位大佬的赞助以及对项目的指正与帮助。包括但不限于代码贡献、问题反馈、资金捐赠等各种方式的支持!以下排名不分先后:
|
||||
[lawrencehj](https://github.com/lawrencehj) @陆丰-创奇科技 [swwhaha](https://github.com/swwheihei)
|
||||
[hotcoffie](https://github.com/hotcoffie) [xiaomu](https://github.com/nikmu) [TristingChen](https://github.com/TristingChen)
|
||||
[chenparty](https://github.com/chenparty) [Hotleave](https://github.com/hotleave) [ydwxb](https://github.com/ydwxb)
|
||||
[ydpd](https://github.com/ydpd) [szy833](https://github.com/szy833) [ydwxb](https://github.com/ydwxb)
|
||||
|
||||
ps: 刚增加了这个名单,肯定遗漏了一些大佬,欢迎大佬联系我添加。
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ public class MobilePositionSubscribeTask implements ISubscribeTask {
|
|||
* COMPLETED-> Completed Dialog状态-已完成
|
||||
* TERMINATED-> Terminated Dialog状态-终止
|
||||
*/
|
||||
logger.info("取消移动订阅时dialog状态为{}", dialog.getState());
|
||||
if (dialog != null && dialog.getState().equals(DialogState.CONFIRMED)) {
|
||||
logger.info("取消移动订阅时dialog状态为{}", dialog.getState());
|
||||
device.setSubscribeCycleForMobilePosition(0);
|
||||
sipCommander.mobilePositionSubscribe(device, dialog, eventResult -> {
|
||||
ResponseEvent event = (ResponseEvent) eventResult.event;
|
||||
|
|
|
@ -235,7 +235,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
String cmdStr= cmdString(leftRight, upDown, inOut, moveSpeed, zoomSpeed);
|
||||
StringBuffer ptzXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
ptzXml.append("<Control>\r\n");
|
||||
ptzXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
ptzXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -278,7 +278,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
logger.debug("控制字符串:" + cmdStr);
|
||||
StringBuffer ptzXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
ptzXml.append("<Control>\r\n");
|
||||
ptzXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
ptzXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -314,7 +314,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer ptzXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
ptzXml.append("<Control>\r\n");
|
||||
ptzXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
ptzXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -778,7 +778,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer broadcastXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
broadcastXml.append("<Notify>\r\n");
|
||||
broadcastXml.append("<CmdType>Broadcast</CmdType>\r\n");
|
||||
broadcastXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -804,7 +804,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer broadcastXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
broadcastXml.append("<Notify>\r\n");
|
||||
broadcastXml.append("<CmdType>Broadcast</CmdType>\r\n");
|
||||
broadcastXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -837,7 +837,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -873,7 +873,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -906,7 +906,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -938,7 +938,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -983,7 +983,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1022,7 +1022,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1091,7 +1091,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Control>\r\n");
|
||||
cmdXml.append("<CmdType>DeviceConfig</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1146,7 +1146,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
String charset = device.getCharset();
|
||||
StringBuffer catalogXml = new StringBuffer(200);
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
catalogXml.append("<Query>\r\n");
|
||||
catalogXml.append("<CmdType>DeviceStatus</CmdType>\r\n");
|
||||
catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1179,7 +1179,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer catalogXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
catalogXml.append("<Query>\r\n");
|
||||
catalogXml.append("<CmdType>DeviceInfo</CmdType>\r\n");
|
||||
catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1212,7 +1212,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer catalogXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
catalogXml.append("<Query>\r\n");
|
||||
catalogXml.append("<CmdType>Catalog</CmdType>\r\n");
|
||||
catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1252,7 +1252,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer recordInfoXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
recordInfoXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
recordInfoXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
recordInfoXml.append("<Query>\r\n");
|
||||
recordInfoXml.append("<CmdType>RecordInfo</CmdType>\r\n");
|
||||
recordInfoXml.append("<SN>" + sn + "</SN>\r\n");
|
||||
|
@ -1306,7 +1306,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Query>\r\n");
|
||||
cmdXml.append("<CmdType>Alarm</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1357,7 +1357,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Query>\r\n");
|
||||
cmdXml.append("<CmdType>ConfigDownload</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1393,7 +1393,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Query>\r\n");
|
||||
cmdXml.append("<CmdType>PresetQuery</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1428,7 +1428,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer mobilePostitionXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
mobilePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
mobilePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
mobilePostitionXml.append("<Query>\r\n");
|
||||
mobilePostitionXml.append("<CmdType>MobilePosition</CmdType>\r\n");
|
||||
mobilePostitionXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1462,7 +1462,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer subscribePostitionXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
subscribePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
subscribePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
subscribePostitionXml.append("<Query>\r\n");
|
||||
subscribePostitionXml.append("<CmdType>MobilePosition</CmdType>\r\n");
|
||||
subscribePostitionXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1513,7 +1513,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Query>\r\n");
|
||||
cmdXml.append("<CmdType>Alarm</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1559,7 +1559,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer cmdXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
cmdXml.append("<Query>\r\n");
|
||||
cmdXml.append("<CmdType>Catalog</CmdType>\r\n");
|
||||
cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -1590,7 +1590,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
try {
|
||||
StringBuffer dragXml = new StringBuffer(200);
|
||||
String charset = device.getCharset();
|
||||
dragXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n");
|
||||
dragXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n");
|
||||
dragXml.append("<Control>\r\n");
|
||||
dragXml.append("<CmdType>DeviceControl</CmdType>\r\n");
|
||||
dragXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n");
|
||||
|
|
|
@ -147,7 +147,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
try {
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer keepaliveXml = new StringBuffer(200);
|
||||
keepaliveXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
keepaliveXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
keepaliveXml.append("<Notify>\r\n");
|
||||
keepaliveXml.append("<CmdType>Keepalive</CmdType>\r\n");
|
||||
keepaliveXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -217,7 +217,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
try {
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer catalogXml = new StringBuffer(600);
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\"?>\r\n");
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\" ?>\r\n");
|
||||
catalogXml.append("<Response>\r\n");
|
||||
catalogXml.append("<CmdType>Catalog</CmdType>\r\n");
|
||||
catalogXml.append("<SN>" +sn + "</SN>\r\n");
|
||||
|
@ -283,7 +283,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
try {
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer deviceInfoXml = new StringBuffer(600);
|
||||
deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
deviceInfoXml.append("<Response>\r\n");
|
||||
deviceInfoXml.append("<CmdType>DeviceInfo</CmdType>\r\n");
|
||||
deviceInfoXml.append("<SN>" +sn + "</SN>\r\n");
|
||||
|
@ -323,7 +323,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
try {
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer deviceStatusXml = new StringBuffer(600);
|
||||
deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
deviceStatusXml.append("<Response>\r\n");
|
||||
deviceStatusXml.append("<CmdType>DeviceStatus</CmdType>\r\n");
|
||||
deviceStatusXml.append("<SN>" +sn + "</SN>\r\n");
|
||||
|
@ -355,7 +355,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
try {
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer deviceStatusXml = new StringBuffer(600);
|
||||
deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
deviceStatusXml.append("<Notify>\r\n");
|
||||
deviceStatusXml.append("<CmdType>MobilePosition</CmdType>\r\n");
|
||||
deviceStatusXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");
|
||||
|
@ -472,7 +472,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
channel.setParentId(parentPlatform.getDeviceGBId());
|
||||
}
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
catalogXml.append("<Notify>\r\n");
|
||||
catalogXml.append("<CmdType>Catalog</CmdType>\r\n");
|
||||
catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n");
|
||||
|
@ -546,7 +546,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
}
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer catalogXml = new StringBuffer(600);
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
catalogXml.append("<Notify>\r\n");
|
||||
catalogXml.append("<CmdType>Catalog</CmdType>\r\n");
|
||||
catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n");
|
||||
|
@ -569,7 +569,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
try {
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer recordXml = new StringBuffer(600);
|
||||
recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
|
||||
recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n");
|
||||
recordXml.append("<Response>\r\n");
|
||||
recordXml.append("<CmdType>RecordInfo</CmdType>\r\n");
|
||||
recordXml.append("<SN>" +recordInfo.getSn() + "</SN>\r\n");
|
||||
|
|
|
@ -137,6 +137,9 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
|||
String deviceID = XmlUtil.getText(rootElement, "DeviceID");
|
||||
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId);
|
||||
SubscribeInfo subscribeInfo = new SubscribeInfo(evt, platformId);
|
||||
if (platform == null) {
|
||||
return;
|
||||
}
|
||||
if (evt.getServerTransaction() == null) {
|
||||
ServerTransaction serverTransaction = platform.getTransport().equals("TCP") ? tcpSipProvider.getNewServerTransaction(evt.getRequest())
|
||||
: udpSipProvider.getNewServerTransaction(evt.getRequest());
|
||||
|
|
|
@ -114,7 +114,8 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
|
|||
deviceChannel.setLatitude(gbStream.getLatitude());
|
||||
deviceChannel.setDeviceId(parentPlatform.getDeviceGBId());
|
||||
deviceChannel.setManufacture("wvp-pro");
|
||||
deviceChannel.setStatus(gbStream.isStatus()?1:0);
|
||||
// deviceChannel.setStatus(gbStream.isStatus()?1:0);
|
||||
deviceChannel.setStatus(1);
|
||||
deviceChannel.setParentId(gbStream.getCatalogId());
|
||||
deviceChannel.setRegisterWay(1);
|
||||
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6));
|
||||
|
|
|
@ -125,7 +125,8 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
|
|||
deviceChannel.setLatitude(gbStream.getLatitude());
|
||||
deviceChannel.setDeviceId(parentPlatform.getDeviceGBId());
|
||||
deviceChannel.setManufacture("wvp-pro");
|
||||
deviceChannel.setStatus(gbStream.isStatus()?1:0);
|
||||
// deviceChannel.setStatus(gbStream.isStatus()?1:0);
|
||||
deviceChannel.setStatus(1);
|
||||
deviceChannel.setParentId(gbStream.getCatalogId());
|
||||
deviceChannel.setRegisterWay(1);
|
||||
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6));
|
||||
|
|
|
@ -396,7 +396,7 @@ public class ZLMHttpHookListener {
|
|||
}
|
||||
}
|
||||
if (gbStreams.size() > 0) {
|
||||
eventPublisher.catalogEventPublishForStream(null, gbStreams, CatalogEvent.ON);
|
||||
// eventPublisher.catalogEventPublishForStream(null, gbStreams, CatalogEvent.ON);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
@ -408,7 +408,7 @@ public class ZLMHttpHookListener {
|
|||
}
|
||||
GbStream gbStream = storager.getGbStream(app, streamId);
|
||||
if (gbStream != null) {
|
||||
eventPublisher.catalogEventPublishForStream(null, gbStream, CatalogEvent.OFF);
|
||||
// eventPublisher.catalogEventPublishForStream(null, gbStream, CatalogEvent.OFF);
|
||||
}
|
||||
zlmMediaListManager.removeMedia(app, streamId);
|
||||
}
|
||||
|
|
|
@ -204,6 +204,7 @@ public class ZLMMediaListManager {
|
|||
if (streamProxyItem == null) {
|
||||
result = storager.removeMedia(app, streamId);
|
||||
}else {
|
||||
// TODO 暂不设置为离线
|
||||
result =storager.mediaOutline(app, streamId);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -100,7 +100,8 @@ public class GbStreamServiceImpl implements IGbStreamService {
|
|||
deviceChannel.setLatitude(gbStream.getLatitude());
|
||||
deviceChannel.setDeviceId(deviceGBId);
|
||||
deviceChannel.setManufacture("wvp-pro");
|
||||
deviceChannel.setStatus(gbStream.isStatus()?1:0);
|
||||
// deviceChannel.setStatus(gbStream.isStatus()?1:0);
|
||||
deviceChannel.setStatus(1);
|
||||
deviceChannel.setParentId(catalogId ==null?gbStream.getCatalogId():catalogId);
|
||||
deviceChannel.setRegisterWay(1);
|
||||
deviceChannel.setCivilCode(deviceGBId.substring(0, 6));
|
||||
|
|
Loading…
Reference in New Issue