648540858
2023-10-07 c084d6c98af1ef4d36a61adc719df5db76589428
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
@@ -67,7 +67,7 @@
   private IVideoManagerStorage storager;
   @Autowired
   private ZLMServerFactory ZLMServerFactory;
   private ZLMServerFactory zlmServerFactory;
   @Autowired
   private ZlmHttpHookSubscribe hookSubscribe;
@@ -111,9 +111,20 @@
         logger.warn("[收到ACK]:未找到通道({})的推流信息", channelId);
         return;
      }
      // tcp主动时,此时是级联下级平台,在回复200ok时,本地已经请求zlm开启监听,跳过下面步骤
      if (sendRtpItem.isTcpActive()) {
         logger.info("收到ACK,rtp/{} TCP主动方式后续处理", sendRtpItem.getStreamId());
         return;
      }
      String is_Udp = sendRtpItem.isTcp() ? "0" : "1";
      MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
      logger.info("收到ACK,rtp/{}开始向上级推流, 目标={}:{},SSRC={}", sendRtpItem.getStreamId(), sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc());
      logger.info("收到ACK,rtp/{}开始向上级推流, 目标={}:{},SSRC={}, 协议:{}",
            sendRtpItem.getStreamId(),
            sendRtpItem.getIp(),
            sendRtpItem.getPort(),
            sendRtpItem.getSsrc(),
            sendRtpItem.isTcp()?(sendRtpItem.isTcpActive()?"TCP主动":"TCP被动"):"UDP"
      );
      Map<String, Object> param = new HashMap<>(12);
      param.put("vhost","__defaultVhost__");
      param.put("app",sendRtpItem.getApp());
@@ -130,7 +141,6 @@
         // 开启rtcp保活
         param.put("udp_rtcp_timeout", sendRtpItem.isRtcp()? "1":"0");
      }
      if (mediaInfo == null) {
         RequestPushStreamMsg requestPushStreamMsg = RequestPushStreamMsg.getInstance(
               sendRtpItem.getMediaServerId(), sendRtpItem.getApp(), sendRtpItem.getStreamId(),
@@ -140,7 +150,7 @@
            startSendRtpStreamHand(evt, sendRtpItem, parentPlatform, jsonObject, param, callIdHeader);
         });
      }else {
         JSONObject startSendRtpStreamResult = ZLMServerFactory.startSendRtpStream(mediaInfo, param);
         JSONObject startSendRtpStreamResult = zlmServerFactory.startSendRtpStream(mediaInfo, param);
         if (startSendRtpStreamResult != null) {
            startSendRtpStreamHand(evt, sendRtpItem, parentPlatform, startSendRtpStreamResult, param, callIdHeader);
         }