From c551164c89f70e664b498c3a09e615928261e01a Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期六, 01 七月 2023 18:33:42 +0800
Subject: [PATCH] 合并主线

---
 src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java |   31 ++++++++++++++-----------------
 1 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
index 68bc38b..cc1f0c0 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
@@ -57,6 +57,9 @@
     private IRedisCatchStorage redisCatchStorage;
 
 	@Autowired
+    private UserSetting userSetting;
+
+	@Autowired
 	private IVideoManagerStorage storager;
 
 	@Autowired
@@ -73,9 +76,6 @@
 
 	@Autowired
 	private RedisGbPlayMsgListener redisGbPlayMsgListener;
-
-	@Autowired
-	private UserSetting userSetting;
 
 	@Autowired
 	private IPlayService playService;
@@ -102,13 +102,15 @@
 			}
 			String isUdp = sendRtpItem.isTcp() ? "0" : "1";
 			MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
-			logger.info("鏀跺埌ACK锛宺tp/{}寮�濮嬪悜涓婄骇鎺ㄦ祦, 鐩爣={}:{}锛孲SRC={}, RTCP={}", sendRtpItem.getStreamId(),
+			logger.info("鏀跺埌ACK锛宺tp/{}寮�濮嬬骇鎺ㄦ祦, 鐩爣={}:{}锛孲SRC={}, RTCP={}", sendRtpItem.getStream(),
 					sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc(), sendRtpItem.isRtcp());
 			Map<String, Object> param = new HashMap<>(12);
 			param.put("vhost","__defaultVhost__");
 			param.put("app",sendRtpItem.getApp());
-			param.put("stream",sendRtpItem.getStreamId());
+			param.put("stream",sendRtpItem.getStream());
 			param.put("ssrc", sendRtpItem.getSsrc());
+			param.put("dst_url",sendRtpItem.getIp());
+			param.put("dst_port", sendRtpItem.getPort());
 			param.put("src_port", sendRtpItem.getLocalPort());
 			param.put("pt", sendRtpItem.getPt());
 			param.put("use_ps", sendRtpItem.isUsePs() ? "1" : "0");
@@ -121,7 +123,7 @@
 
 			if (mediaInfo == null) {
 				RequestPushStreamMsg requestPushStreamMsg = RequestPushStreamMsg.getInstance(
-						sendRtpItem.getMediaServerId(), sendRtpItem.getApp(), sendRtpItem.getStreamId(),
+						sendRtpItem.getMediaServerId(), sendRtpItem.getApp(), sendRtpItem.getStream(),
 						sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc(), sendRtpItem.isTcp(),
 						sendRtpItem.getLocalPort(), sendRtpItem.getPt(), sendRtpItem.isUsePs(), sendRtpItem.isOnlyAudio());
 				redisGbPlayMsgListener.sendMsgForStartSendRtpStream(sendRtpItem.getServerId(), requestPushStreamMsg, json -> {
@@ -131,16 +133,12 @@
 				// 濡傛灉鏄潪涓ユ牸妯″紡锛岄渶瑕佸叧闂鍙e崰鐢�
 				JSONObject startSendRtpStreamResult = null;
 				if (sendRtpItem.getLocalPort() != 0) {
-					HookSubscribeForRtpServerTimeout hookSubscribeForRtpServerTimeout = HookSubscribeFactory.on_rtp_server_timeout(sendRtpItem.getSsrc(), null, mediaInfo.getId());
-					hookSubscribe.removeSubscribe(hookSubscribeForRtpServerTimeout);
-					if (zlmrtpServerFactory.releasePort(mediaInfo, sendRtpItem.getSsrc())) {
-						if (sendRtpItem.isTcpActive()) {
-							startSendRtpStreamResult = zlmrtpServerFactory.startSendRtpPassive(mediaInfo, param);
-						}else {
-							param.put("dst_url", sendRtpItem.getIp());
-							param.put("dst_port", sendRtpItem.getPort());
-							startSendRtpStreamResult = zlmrtpServerFactory.startSendRtpStream(mediaInfo, param);
-						}
+					if (sendRtpItem.isTcpActive()) {
+						startSendRtpStreamResult = zlmrtpServerFactory.startSendRtpPassive(mediaInfo, param);
+					}else {
+						param.put("dst_url", sendRtpItem.getIp());
+						param.put("dst_port", sendRtpItem.getPort());
+						startSendRtpStreamResult = zlmrtpServerFactory.startSendRtpStream(mediaInfo, param);
 					}
 				}else {
 					if (sendRtpItem.isTcpActive()) {
@@ -156,7 +154,6 @@
 				}
 			}
 		}
-
 	}
 
 }

--
Gitblit v1.8.0