648540858
2024-03-14 d4f6ec39b7e0421757a6b9d1a68b1c4610ea2e8c
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
old mode 100644 new mode 100755
@@ -128,6 +128,9 @@
         redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(),
               callIdHeader.getCallId(), null);
         zlmServerFactory.stopSendRtpStream(mediaInfo, param);
         if (userSetting.getUseCustomSsrcForParentInvite()) {
            mediaServerService.releaseSsrc(mediaInfo.getId(), sendRtpItem.getSsrc());
         }
         if (sendRtpItem.getPlayType().equals(InviteStreamType.PUSH)) {
            ParentPlatform platform = platformService.queryPlatformByServerGBId(sendRtpItem.getPlatformId());
            if (platform != null) {
@@ -167,14 +170,12 @@
         }
      }
      // 发流端发送的停止
      SsrcTransaction ssrcTransaction = streamSession.getSsrcTransaction(null, null, callIdHeader.getCallId(), null);
      if (ssrcTransaction == null ) {
         logger.info("[收到bye] 但是无法获取推流信息和发流信息,忽略此请求");
         logger.info(request.toString());
         return;
      }
         // 可能是设备发送的停止
         SsrcTransaction ssrcTransaction = streamSession.getSsrcTransactionByCallId(callIdHeader.getCallId());
         if (ssrcTransaction == null) {
            return;
         }
         logger.info("[收到bye] 来自设备:{}, 通道已停止推流: {}", ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId());
      ParentPlatform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getDeviceId());
      if (platform != null ) {
@@ -216,7 +217,7 @@
         if (mediaServerItem != null) {
            mediaServerService.releaseSsrc(mediaServerItem.getId(), ssrcTransaction.getSsrc());
         }
         streamSession.remove(device.getDeviceId(), channel.getChannelId(), ssrcTransaction.getStream());
         streamSession.removeByCallId(device.getDeviceId(), channel.getChannelId(), ssrcTransaction.getCallId());
         if (ssrcTransaction.getType() == InviteSessionType.BROADCAST) {
            // 查找来源的对讲设备,发送停止
            Device sourceDevice = storager.queryVideoDeviceByPlatformIdAndChannelId(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId());