Commit fcf8c40150f50a4a0a5bfdb520e2707de410f949
1 parent
81f1b8ee
默认推流通道始终在线
Showing
10 changed files
with
55 additions
and
39 deletions
README.md
| ... | ... | @@ -130,5 +130,14 @@ QQ私信一般不回, 精力有限.欢迎大家在群里讨论.觉得项目对 |
| 130 | 130 | |
| 131 | 131 | |
| 132 | 132 | # 致谢 |
| 133 | -感谢作者[夏楚](https://github.com/xia-chu) 提供这么棒的开源流媒体服务框架 | |
| 133 | +感谢作者[夏楚](https://github.com/xia-chu) 提供这么棒的开源流媒体服务框架,并在开发过程中给予支持与帮助。 | |
| 134 | +感谢作者[dexter langhuihui](https://github.com/langhuihui) 开源这么好用的WEB播放器。 | |
| 135 | +感谢作者[Kyle](https://gitee.com/kkkkk5G) 开源了好用的前端页面 | |
| 136 | +感谢各位大佬的赞助以及对项目的指正与帮助。包括但不限于代码贡献、问题反馈、资金捐赠等各种方式的支持!以下排名不分先后: | |
| 137 | +[lawrencehj](https://github.com/lawrencehj) @陆丰-创奇科技 [swwhaha](https://github.com/swwheihei) | |
| 138 | +[hotcoffie](https://github.com/hotcoffie) [xiaomu](https://github.com/nikmu) [TristingChen](https://github.com/TristingChen) | |
| 139 | +[chenparty](https://github.com/chenparty) [Hotleave](https://github.com/hotleave) [ydwxb](https://github.com/ydwxb) | |
| 140 | +[ydpd](https://github.com/ydpd) [szy833](https://github.com/szy833) [ydwxb](https://github.com/ydwxb) | |
| 141 | + | |
| 142 | +ps: 刚增加了这个名单,肯定遗漏了一些大佬,欢迎大佬联系我添加。 | |
| 134 | 143 | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeTask.java
| ... | ... | @@ -56,8 +56,8 @@ public class MobilePositionSubscribeTask implements ISubscribeTask { |
| 56 | 56 | * COMPLETED-> Completed Dialog状态-已完成 |
| 57 | 57 | * TERMINATED-> Terminated Dialog状态-终止 |
| 58 | 58 | */ |
| 59 | - logger.info("取消移动订阅时dialog状态为{}", dialog.getState()); | |
| 60 | 59 | if (dialog != null && dialog.getState().equals(DialogState.CONFIRMED)) { |
| 60 | + logger.info("取消移动订阅时dialog状态为{}", dialog.getState()); | |
| 61 | 61 | device.setSubscribeCycleForMobilePosition(0); |
| 62 | 62 | sipCommander.mobilePositionSubscribe(device, dialog, eventResult -> { |
| 63 | 63 | ResponseEvent event = (ResponseEvent) eventResult.event; | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -235,7 +235,7 @@ public class SIPCommander implements ISIPCommander { |
| 235 | 235 | String cmdStr= cmdString(leftRight, upDown, inOut, moveSpeed, zoomSpeed); |
| 236 | 236 | StringBuffer ptzXml = new StringBuffer(200); |
| 237 | 237 | String charset = device.getCharset(); |
| 238 | - ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 238 | + ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 239 | 239 | ptzXml.append("<Control>\r\n"); |
| 240 | 240 | ptzXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 241 | 241 | ptzXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -278,7 +278,7 @@ public class SIPCommander implements ISIPCommander { |
| 278 | 278 | logger.debug("控制字符串:" + cmdStr); |
| 279 | 279 | StringBuffer ptzXml = new StringBuffer(200); |
| 280 | 280 | String charset = device.getCharset(); |
| 281 | - ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 281 | + ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 282 | 282 | ptzXml.append("<Control>\r\n"); |
| 283 | 283 | ptzXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 284 | 284 | ptzXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -314,7 +314,7 @@ public class SIPCommander implements ISIPCommander { |
| 314 | 314 | try { |
| 315 | 315 | StringBuffer ptzXml = new StringBuffer(200); |
| 316 | 316 | String charset = device.getCharset(); |
| 317 | - ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 317 | + ptzXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 318 | 318 | ptzXml.append("<Control>\r\n"); |
| 319 | 319 | ptzXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 320 | 320 | ptzXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -778,7 +778,7 @@ public class SIPCommander implements ISIPCommander { |
| 778 | 778 | try { |
| 779 | 779 | StringBuffer broadcastXml = new StringBuffer(200); |
| 780 | 780 | String charset = device.getCharset(); |
| 781 | - broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 781 | + broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 782 | 782 | broadcastXml.append("<Notify>\r\n"); |
| 783 | 783 | broadcastXml.append("<CmdType>Broadcast</CmdType>\r\n"); |
| 784 | 784 | broadcastXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -804,7 +804,7 @@ public class SIPCommander implements ISIPCommander { |
| 804 | 804 | try { |
| 805 | 805 | StringBuffer broadcastXml = new StringBuffer(200); |
| 806 | 806 | String charset = device.getCharset(); |
| 807 | - broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 807 | + broadcastXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 808 | 808 | broadcastXml.append("<Notify>\r\n"); |
| 809 | 809 | broadcastXml.append("<CmdType>Broadcast</CmdType>\r\n"); |
| 810 | 810 | broadcastXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -837,7 +837,7 @@ public class SIPCommander implements ISIPCommander { |
| 837 | 837 | try { |
| 838 | 838 | StringBuffer cmdXml = new StringBuffer(200); |
| 839 | 839 | String charset = device.getCharset(); |
| 840 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 840 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 841 | 841 | cmdXml.append("<Control>\r\n"); |
| 842 | 842 | cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 843 | 843 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -873,7 +873,7 @@ public class SIPCommander implements ISIPCommander { |
| 873 | 873 | try { |
| 874 | 874 | StringBuffer cmdXml = new StringBuffer(200); |
| 875 | 875 | String charset = device.getCharset(); |
| 876 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 876 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 877 | 877 | cmdXml.append("<Control>\r\n"); |
| 878 | 878 | cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 879 | 879 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -906,7 +906,7 @@ public class SIPCommander implements ISIPCommander { |
| 906 | 906 | try { |
| 907 | 907 | StringBuffer cmdXml = new StringBuffer(200); |
| 908 | 908 | String charset = device.getCharset(); |
| 909 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 909 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 910 | 910 | cmdXml.append("<Control>\r\n"); |
| 911 | 911 | cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 912 | 912 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -938,7 +938,7 @@ public class SIPCommander implements ISIPCommander { |
| 938 | 938 | try { |
| 939 | 939 | StringBuffer cmdXml = new StringBuffer(200); |
| 940 | 940 | String charset = device.getCharset(); |
| 941 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 941 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 942 | 942 | cmdXml.append("<Control>\r\n"); |
| 943 | 943 | cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 944 | 944 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -983,7 +983,7 @@ public class SIPCommander implements ISIPCommander { |
| 983 | 983 | try { |
| 984 | 984 | StringBuffer cmdXml = new StringBuffer(200); |
| 985 | 985 | String charset = device.getCharset(); |
| 986 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 986 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 987 | 987 | cmdXml.append("<Control>\r\n"); |
| 988 | 988 | cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 989 | 989 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1022,7 +1022,7 @@ public class SIPCommander implements ISIPCommander { |
| 1022 | 1022 | try { |
| 1023 | 1023 | StringBuffer cmdXml = new StringBuffer(200); |
| 1024 | 1024 | String charset = device.getCharset(); |
| 1025 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1025 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1026 | 1026 | cmdXml.append("<Control>\r\n"); |
| 1027 | 1027 | cmdXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 1028 | 1028 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1091,7 +1091,7 @@ public class SIPCommander implements ISIPCommander { |
| 1091 | 1091 | try { |
| 1092 | 1092 | StringBuffer cmdXml = new StringBuffer(200); |
| 1093 | 1093 | String charset = device.getCharset(); |
| 1094 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1094 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1095 | 1095 | cmdXml.append("<Control>\r\n"); |
| 1096 | 1096 | cmdXml.append("<CmdType>DeviceConfig</CmdType>\r\n"); |
| 1097 | 1097 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1146,7 +1146,7 @@ public class SIPCommander implements ISIPCommander { |
| 1146 | 1146 | try { |
| 1147 | 1147 | String charset = device.getCharset(); |
| 1148 | 1148 | StringBuffer catalogXml = new StringBuffer(200); |
| 1149 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1149 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1150 | 1150 | catalogXml.append("<Query>\r\n"); |
| 1151 | 1151 | catalogXml.append("<CmdType>DeviceStatus</CmdType>\r\n"); |
| 1152 | 1152 | catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1179,7 +1179,7 @@ public class SIPCommander implements ISIPCommander { |
| 1179 | 1179 | try { |
| 1180 | 1180 | StringBuffer catalogXml = new StringBuffer(200); |
| 1181 | 1181 | String charset = device.getCharset(); |
| 1182 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1182 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1183 | 1183 | catalogXml.append("<Query>\r\n"); |
| 1184 | 1184 | catalogXml.append("<CmdType>DeviceInfo</CmdType>\r\n"); |
| 1185 | 1185 | catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1212,7 +1212,7 @@ public class SIPCommander implements ISIPCommander { |
| 1212 | 1212 | try { |
| 1213 | 1213 | StringBuffer catalogXml = new StringBuffer(200); |
| 1214 | 1214 | String charset = device.getCharset(); |
| 1215 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1215 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1216 | 1216 | catalogXml.append("<Query>\r\n"); |
| 1217 | 1217 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 1218 | 1218 | catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1252,7 +1252,7 @@ public class SIPCommander implements ISIPCommander { |
| 1252 | 1252 | try { |
| 1253 | 1253 | StringBuffer recordInfoXml = new StringBuffer(200); |
| 1254 | 1254 | String charset = device.getCharset(); |
| 1255 | - recordInfoXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1255 | + recordInfoXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1256 | 1256 | recordInfoXml.append("<Query>\r\n"); |
| 1257 | 1257 | recordInfoXml.append("<CmdType>RecordInfo</CmdType>\r\n"); |
| 1258 | 1258 | recordInfoXml.append("<SN>" + sn + "</SN>\r\n"); |
| ... | ... | @@ -1306,7 +1306,7 @@ public class SIPCommander implements ISIPCommander { |
| 1306 | 1306 | try { |
| 1307 | 1307 | StringBuffer cmdXml = new StringBuffer(200); |
| 1308 | 1308 | String charset = device.getCharset(); |
| 1309 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1309 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1310 | 1310 | cmdXml.append("<Query>\r\n"); |
| 1311 | 1311 | cmdXml.append("<CmdType>Alarm</CmdType>\r\n"); |
| 1312 | 1312 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1357,7 +1357,7 @@ public class SIPCommander implements ISIPCommander { |
| 1357 | 1357 | try { |
| 1358 | 1358 | StringBuffer cmdXml = new StringBuffer(200); |
| 1359 | 1359 | String charset = device.getCharset(); |
| 1360 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1360 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1361 | 1361 | cmdXml.append("<Query>\r\n"); |
| 1362 | 1362 | cmdXml.append("<CmdType>ConfigDownload</CmdType>\r\n"); |
| 1363 | 1363 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1393,7 +1393,7 @@ public class SIPCommander implements ISIPCommander { |
| 1393 | 1393 | try { |
| 1394 | 1394 | StringBuffer cmdXml = new StringBuffer(200); |
| 1395 | 1395 | String charset = device.getCharset(); |
| 1396 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1396 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1397 | 1397 | cmdXml.append("<Query>\r\n"); |
| 1398 | 1398 | cmdXml.append("<CmdType>PresetQuery</CmdType>\r\n"); |
| 1399 | 1399 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1428,7 +1428,7 @@ public class SIPCommander implements ISIPCommander { |
| 1428 | 1428 | try { |
| 1429 | 1429 | StringBuffer mobilePostitionXml = new StringBuffer(200); |
| 1430 | 1430 | String charset = device.getCharset(); |
| 1431 | - mobilePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1431 | + mobilePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1432 | 1432 | mobilePostitionXml.append("<Query>\r\n"); |
| 1433 | 1433 | mobilePostitionXml.append("<CmdType>MobilePosition</CmdType>\r\n"); |
| 1434 | 1434 | mobilePostitionXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1462,7 +1462,7 @@ public class SIPCommander implements ISIPCommander { |
| 1462 | 1462 | try { |
| 1463 | 1463 | StringBuffer subscribePostitionXml = new StringBuffer(200); |
| 1464 | 1464 | String charset = device.getCharset(); |
| 1465 | - subscribePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1465 | + subscribePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1466 | 1466 | subscribePostitionXml.append("<Query>\r\n"); |
| 1467 | 1467 | subscribePostitionXml.append("<CmdType>MobilePosition</CmdType>\r\n"); |
| 1468 | 1468 | subscribePostitionXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1513,7 +1513,7 @@ public class SIPCommander implements ISIPCommander { |
| 1513 | 1513 | try { |
| 1514 | 1514 | StringBuffer cmdXml = new StringBuffer(200); |
| 1515 | 1515 | String charset = device.getCharset(); |
| 1516 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1516 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1517 | 1517 | cmdXml.append("<Query>\r\n"); |
| 1518 | 1518 | cmdXml.append("<CmdType>Alarm</CmdType>\r\n"); |
| 1519 | 1519 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1559,7 +1559,7 @@ public class SIPCommander implements ISIPCommander { |
| 1559 | 1559 | try { |
| 1560 | 1560 | StringBuffer cmdXml = new StringBuffer(200); |
| 1561 | 1561 | String charset = device.getCharset(); |
| 1562 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1562 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1563 | 1563 | cmdXml.append("<Query>\r\n"); |
| 1564 | 1564 | cmdXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 1565 | 1565 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1590,7 +1590,7 @@ public class SIPCommander implements ISIPCommander { |
| 1590 | 1590 | try { |
| 1591 | 1591 | StringBuffer dragXml = new StringBuffer(200); |
| 1592 | 1592 | String charset = device.getCharset(); |
| 1593 | - dragXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1593 | + dragXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\" ?>\r\n"); | |
| 1594 | 1594 | dragXml.append("<Control>\r\n"); |
| 1595 | 1595 | dragXml.append("<CmdType>DeviceControl</CmdType>\r\n"); |
| 1596 | 1596 | dragXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| ... | ... | @@ -147,7 +147,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 147 | 147 | try { |
| 148 | 148 | String characterSet = parentPlatform.getCharacterSet(); |
| 149 | 149 | StringBuffer keepaliveXml = new StringBuffer(200); |
| 150 | - keepaliveXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 150 | + keepaliveXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 151 | 151 | keepaliveXml.append("<Notify>\r\n"); |
| 152 | 152 | keepaliveXml.append("<CmdType>Keepalive</CmdType>\r\n"); |
| 153 | 153 | keepaliveXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -217,7 +217,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 217 | 217 | try { |
| 218 | 218 | String characterSet = parentPlatform.getCharacterSet(); |
| 219 | 219 | StringBuffer catalogXml = new StringBuffer(600); |
| 220 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\"?>\r\n"); | |
| 220 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\" ?>\r\n"); | |
| 221 | 221 | catalogXml.append("<Response>\r\n"); |
| 222 | 222 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 223 | 223 | catalogXml.append("<SN>" +sn + "</SN>\r\n"); |
| ... | ... | @@ -283,7 +283,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 283 | 283 | try { |
| 284 | 284 | String characterSet = parentPlatform.getCharacterSet(); |
| 285 | 285 | StringBuffer deviceInfoXml = new StringBuffer(600); |
| 286 | - deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 286 | + deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 287 | 287 | deviceInfoXml.append("<Response>\r\n"); |
| 288 | 288 | deviceInfoXml.append("<CmdType>DeviceInfo</CmdType>\r\n"); |
| 289 | 289 | deviceInfoXml.append("<SN>" +sn + "</SN>\r\n"); |
| ... | ... | @@ -323,7 +323,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 323 | 323 | try { |
| 324 | 324 | String characterSet = parentPlatform.getCharacterSet(); |
| 325 | 325 | StringBuffer deviceStatusXml = new StringBuffer(600); |
| 326 | - deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 326 | + deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 327 | 327 | deviceStatusXml.append("<Response>\r\n"); |
| 328 | 328 | deviceStatusXml.append("<CmdType>DeviceStatus</CmdType>\r\n"); |
| 329 | 329 | deviceStatusXml.append("<SN>" +sn + "</SN>\r\n"); |
| ... | ... | @@ -355,7 +355,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 355 | 355 | try { |
| 356 | 356 | String characterSet = parentPlatform.getCharacterSet(); |
| 357 | 357 | StringBuffer deviceStatusXml = new StringBuffer(600); |
| 358 | - deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 358 | + deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 359 | 359 | deviceStatusXml.append("<Notify>\r\n"); |
| 360 | 360 | deviceStatusXml.append("<CmdType>MobilePosition</CmdType>\r\n"); |
| 361 | 361 | deviceStatusXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -472,7 +472,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 472 | 472 | channel.setParentId(parentPlatform.getDeviceGBId()); |
| 473 | 473 | } |
| 474 | 474 | String characterSet = parentPlatform.getCharacterSet(); |
| 475 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 475 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 476 | 476 | catalogXml.append("<Notify>\r\n"); |
| 477 | 477 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 478 | 478 | catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); |
| ... | ... | @@ -546,7 +546,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 546 | 546 | } |
| 547 | 547 | String characterSet = parentPlatform.getCharacterSet(); |
| 548 | 548 | StringBuffer catalogXml = new StringBuffer(600); |
| 549 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 549 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 550 | 550 | catalogXml.append("<Notify>\r\n"); |
| 551 | 551 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 552 | 552 | catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); |
| ... | ... | @@ -569,7 +569,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 569 | 569 | try { |
| 570 | 570 | String characterSet = parentPlatform.getCharacterSet(); |
| 571 | 571 | StringBuffer recordXml = new StringBuffer(600); |
| 572 | - recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 572 | + recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\" ?>\r\n"); | |
| 573 | 573 | recordXml.append("<Response>\r\n"); |
| 574 | 574 | recordXml.append("<CmdType>RecordInfo</CmdType>\r\n"); |
| 575 | 575 | recordXml.append("<SN>" +recordInfo.getSn() + "</SN>\r\n"); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/SubscribeRequestProcessor.java
| ... | ... | @@ -137,6 +137,9 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme |
| 137 | 137 | String deviceID = XmlUtil.getText(rootElement, "DeviceID"); |
| 138 | 138 | ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId); |
| 139 | 139 | SubscribeInfo subscribeInfo = new SubscribeInfo(evt, platformId); |
| 140 | + if (platform == null) { | |
| 141 | + return; | |
| 142 | + } | |
| 140 | 143 | if (evt.getServerTransaction() == null) { |
| 141 | 144 | ServerTransaction serverTransaction = platform.getTransport().equals("TCP") ? tcpSipProvider.getNewServerTransaction(evt.getRequest()) |
| 142 | 145 | : udpSipProvider.getNewServerTransaction(evt.getRequest()); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java
| ... | ... | @@ -114,7 +114,8 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple |
| 114 | 114 | deviceChannel.setLatitude(gbStream.getLatitude()); |
| 115 | 115 | deviceChannel.setDeviceId(parentPlatform.getDeviceGBId()); |
| 116 | 116 | deviceChannel.setManufacture("wvp-pro"); |
| 117 | - deviceChannel.setStatus(gbStream.isStatus()?1:0); | |
| 117 | +// deviceChannel.setStatus(gbStream.isStatus()?1:0); | |
| 118 | + deviceChannel.setStatus(1); | |
| 118 | 119 | deviceChannel.setParentId(gbStream.getCatalogId()); |
| 119 | 120 | deviceChannel.setRegisterWay(1); |
| 120 | 121 | deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java
| ... | ... | @@ -125,7 +125,8 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem |
| 125 | 125 | deviceChannel.setLatitude(gbStream.getLatitude()); |
| 126 | 126 | deviceChannel.setDeviceId(parentPlatform.getDeviceGBId()); |
| 127 | 127 | deviceChannel.setManufacture("wvp-pro"); |
| 128 | - deviceChannel.setStatus(gbStream.isStatus()?1:0); | |
| 128 | +// deviceChannel.setStatus(gbStream.isStatus()?1:0); | |
| 129 | + deviceChannel.setStatus(1); | |
| 129 | 130 | deviceChannel.setParentId(gbStream.getCatalogId()); |
| 130 | 131 | deviceChannel.setRegisterWay(1); |
| 131 | 132 | deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -396,7 +396,7 @@ public class ZLMHttpHookListener { |
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 398 | if (gbStreams.size() > 0) { |
| 399 | - eventPublisher.catalogEventPublishForStream(null, gbStreams, CatalogEvent.ON); | |
| 399 | +// eventPublisher.catalogEventPublishForStream(null, gbStreams, CatalogEvent.ON); | |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | 402 | }else { |
| ... | ... | @@ -408,7 +408,7 @@ public class ZLMHttpHookListener { |
| 408 | 408 | } |
| 409 | 409 | GbStream gbStream = storager.getGbStream(app, streamId); |
| 410 | 410 | if (gbStream != null) { |
| 411 | - eventPublisher.catalogEventPublishForStream(null, gbStream, CatalogEvent.OFF); | |
| 411 | +// eventPublisher.catalogEventPublishForStream(null, gbStream, CatalogEvent.OFF); | |
| 412 | 412 | } |
| 413 | 413 | zlmMediaListManager.removeMedia(app, streamId); |
| 414 | 414 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java
src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java
| ... | ... | @@ -100,7 +100,8 @@ public class GbStreamServiceImpl implements IGbStreamService { |
| 100 | 100 | deviceChannel.setLatitude(gbStream.getLatitude()); |
| 101 | 101 | deviceChannel.setDeviceId(deviceGBId); |
| 102 | 102 | deviceChannel.setManufacture("wvp-pro"); |
| 103 | - deviceChannel.setStatus(gbStream.isStatus()?1:0); | |
| 103 | +// deviceChannel.setStatus(gbStream.isStatus()?1:0); | |
| 104 | + deviceChannel.setStatus(1); | |
| 104 | 105 | deviceChannel.setParentId(catalogId ==null?gbStream.getCatalogId():catalogId); |
| 105 | 106 | deviceChannel.setRegisterWay(1); |
| 106 | 107 | deviceChannel.setCivilCode(deviceGBId.substring(0, 6)); | ... | ... |