648540858
2022-11-29 38a85d432ae9bb861dbcbf090d68fb3dca0d85f6
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
@@ -98,6 +98,16 @@
      if (sendRtpItem != null){
         logger.info("[收到bye] {}/{}", sendRtpItem.getPlatformId(), sendRtpItem.getChannelId());
         String streamId = sendRtpItem.getStreamId();
         MediaServerItem mediaServerItem = mediaServerService.getOne(sendRtpItem.getMediaServerId());
         if (mediaServerItem == null) {
            return;
         }
         Boolean ready = zlmrtpServerFactory.isStreamReady(mediaServerItem, sendRtpItem.getApp(), streamId);
         if (!ready) {
            logger.info("[收到bye] 发现流{}/{}已经结束,不需处理", sendRtpItem.getApp(), sendRtpItem.getStreamId());
            return;
         }
         Map<String, Object> param = new HashMap<>();
         param.put("vhost","__defaultVhost__");
         param.put("app",sendRtpItem.getApp());
@@ -107,6 +117,7 @@
         MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
         redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), callIdHeader.getCallId(), null);
         zlmrtpServerFactory.stopSendRtpStream(mediaInfo, param);
         int totalReaderCount = zlmrtpServerFactory.totalReaderCount(mediaInfo, sendRtpItem.getApp(), streamId);
         if (totalReaderCount <= 0) {
            logger.info("[收到bye] {} 无其它观看者,通知设备停止推流", streamId);
@@ -131,6 +142,7 @@
               redisCatchStorage.sendStreamPushRequestedMsg(messageForPushChannel);
            }
         }
         playService.stopAudioBroadcast(sendRtpItem.getDeviceId(), sendRtpItem.getChannelId());
      }