Merge branch 'wvp-28181-2.0' into 结构优化
# Conflicts: # src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java # src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java # src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java结构优化
commit
d287ff7763
|
@ -558,7 +558,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||
.append("<CmdType>Catalog</CmdType>\r\n")
|
||||
.append("<SN>" + SipUtils.getNewSn() + "</SN>\r\n")
|
||||
.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n")
|
||||
.append("<SumNum>"+ channels.size() +"</SumNum>\r\n")
|
||||
.append("<SumNum>"+ sumNum +"</SumNum>\r\n")
|
||||
.append("<DeviceList Num=\"" + channels.size() + "\">\r\n");
|
||||
if (channels.size() > 0) {
|
||||
for (CommonGbChannel channel : channels) {
|
||||
|
|
|
@ -117,7 +117,7 @@ public class InviteStreamServiceImpl implements IInviteStreamService {
|
|||
+ ":*";
|
||||
List<Object> scanResult = RedisUtil.scan(redisTemplate, key);
|
||||
if (scanResult.size() != 1) {
|
||||
return null;
|
||||
logger.warn("[获取InviteInfo] 发现 key: {}存在多条", key);
|
||||
}
|
||||
|
||||
return (InviteInfo) redisTemplate.opsForValue().get(scanResult.get(0));
|
||||
|
|
|
@ -702,6 +702,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|||
ssrcFactory.initMediaServerSSRC(mediaServerItem.getId(), null);
|
||||
String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + mediaServerItem.getId();
|
||||
redisTemplate.opsForValue().set(key, mediaServerItem);
|
||||
resetOnlineServerItem(mediaServerItem);
|
||||
clearRTPServer(mediaServerItem);
|
||||
}
|
||||
final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + mediaServerItem.getId();
|
||||
|
|
|
@ -262,6 +262,7 @@ public class PlatformServiceImpl implements IPlatformService {
|
|||
}
|
||||
if (parentPlatform.isAutoPushChannel()) {
|
||||
if (subscribeHolder.getCatalogSubscribe(parentPlatform.getId()) == null) {
|
||||
logger.info("[国标级联]:{}, 添加自动通道推送模拟订阅信息", parentPlatform.getServerGBId());
|
||||
addSimulatedSubscribeInfo(parentPlatform);
|
||||
}
|
||||
}else {
|
||||
|
@ -331,9 +332,16 @@ public class PlatformServiceImpl implements IPlatformService {
|
|||
// 清除心跳任务
|
||||
dynamicTask.stop(keepaliveTaskKey);
|
||||
}
|
||||
// 停止目录订阅回复
|
||||
logger.info("[平台离线] {}, 停止订阅回复", parentPlatform.getServerGBId());
|
||||
subscribeHolder.removeAllSubscribe(parentPlatform.getId());
|
||||
// 停止订阅回复
|
||||
SubscribeInfo catalogSubscribe = subscribeHolder.getCatalogSubscribe(parentPlatform.getId());
|
||||
if (catalogSubscribe != null) {
|
||||
if (catalogSubscribe.getExpires() > 0) {
|
||||
logger.info("[平台离线] {}, 停止目录订阅回复", parentPlatform.getServerGBId());
|
||||
subscribeHolder.removeCatalogSubscribe(parentPlatform.getId());
|
||||
}
|
||||
}
|
||||
logger.info("[平台离线] {}, 停止移动位置订阅回复", parentPlatform.getServerGBId());
|
||||
subscribeHolder.removeMobilePositionSubscribe(parentPlatform.getId());
|
||||
// 发起定时自动重新注册
|
||||
if (!stopRegister) {
|
||||
// 设置为60秒自动尝试重新注册
|
||||
|
|
|
@ -981,7 +981,9 @@ public class PlayServiceImpl implements IPlayService {
|
|||
throw new ServiceException("mediaServer不存在");
|
||||
}
|
||||
// zlm 暂停RTP超时检查
|
||||
JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, streamId);
|
||||
// 使用zlm中的流ID
|
||||
String ssrc = Long.toHexString(Long.parseLong(ssrcTransaction.getSsrc())).toUpperCase();
|
||||
JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, ssrc);
|
||||
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
|
||||
logger.warn("[暂停流] 暂停RTP接收失败: {}", jsonObject );
|
||||
throw new ServiceException("暂停RTP接收失败");
|
||||
|
@ -1006,7 +1008,9 @@ public class PlayServiceImpl implements IPlayService {
|
|||
}
|
||||
|
||||
// zlm 暂停RTP超时检查
|
||||
JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, streamId);
|
||||
// 使用zlm中的流ID
|
||||
String ssrc = Long.toHexString(Long.parseLong(ssrcTransaction.getSsrc())).toUpperCase();
|
||||
JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, ssrc);
|
||||
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
|
||||
logger.info("[暂停RTP超时检查] 失败:" + jsonObject);
|
||||
throw new ServiceException("继续RTP接收失败");
|
||||
|
|
Loading…
Reference in New Issue