Commit 912c83dfd31283631e4f7a1bd88d387baa6a16d4

Authored by 648540858
1 parent 97dc926b

添加日志

src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
... ... @@ -115,7 +115,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In
115 115  
116 116 // 收流端发送的停止
117 117 if (sendRtpItem != null){
118   - logger.info("[收到bye] 来自{},停止通道:{}, 类型: {}", sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), sendRtpItem.getPlayType());
  118 + logger.info("[收到bye] 来自{},停止通道:{}, 类型: {}, callId: {}", sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), sendRtpItem.getPlayType(), callIdHeader.getCallId());
119 119  
120 120 String streamId = sendRtpItem.getStream();
121 121 Map<String, Object> param = new HashMap<>();
... ... @@ -123,7 +123,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In
123 123 param.put("app",sendRtpItem.getApp());
124 124 param.put("stream",streamId);
125 125 param.put("ssrc",sendRtpItem.getSsrc());
126   - logger.info("[收到bye] 停止推流:{}", streamId);
  126 + logger.info("[收到bye] 停止推流:{}, 媒体节点: {}", streamId, sendRtpItem.getMediaServerId());
127 127 MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
128 128 redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(),
129 129 callIdHeader.getCallId(), null);
... ...
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
... ... @@ -581,7 +581,7 @@ public class ZLMHttpHookListener {
581 581 if (redisCatchStorage.isChannelSendingRTP(inviteInfo.getChannelId())) {
582 582 List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChnnelId(
583 583 inviteInfo.getChannelId());
584   - if (sendRtpItems.size() > 0) {
  584 + if (!sendRtpItems.isEmpty()) {
585 585 for (SendRtpItem sendRtpItem : sendRtpItems) {
586 586 ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
587 587 try {
... ...
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
... ... @@ -289,6 +289,10 @@ public class ZLMServerFactory {
289 289 * 调用zlm RESTful API —— stopSendRtp
290 290 */
291 291 public Boolean stopSendRtpStream(MediaServerItem mediaServerItem, Map<String, Object>param) {
  292 + if (mediaServerItem == null) {
  293 + logger.error("[停止RTP推流] 失败: 媒体节点为NULL");
  294 + return false;
  295 + }
292 296 Boolean result = false;
293 297 JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param);
294 298 if (jsonObject == null) {
... ...
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
... ... @@ -269,6 +269,8 @@ public class DeviceServiceImpl implements IDeviceService {
269 269 int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForCatalog(),30);
270 270 // 设置最小值为30
271 271 dynamicTask.startCron(device.getDeviceId() + "catalog", catalogSubscribeTask, (subscribeCycleForCatalog -1) * 1000);
  272 +
  273 + catalogSubscribeTask.run();
272 274 return true;
273 275 }
274 276  
... ... @@ -302,6 +304,7 @@ public class DeviceServiceImpl implements IDeviceService {
302 304 int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForMobilePosition(),30);
303 305 // 刷新订阅
304 306 dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, subscribeCycleForCatalog * 1000);
  307 + mobilePositionSubscribeTask.run();
305 308 return true;
306 309 }
307 310  
... ...