From 74ad4235f1738ea8ca954bd396a35ddf90a6e37b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期六, 01 七月 2023 13:01:56 +0800
Subject: [PATCH] 修复tcp主动的推流

---
 src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java
index 8231fb3..a40bb3b 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java
@@ -267,8 +267,8 @@
             return;
         }
         // 纭畾娴佹槸鍚﹀湪绾�
-        boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, content.getApp(), content.getStream());
-        if (streamReady) {
+        Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, content.getApp(), content.getStream());
+        if (streamReady != null && streamReady) {
             logger.info("[鍥炲鎺ㄦ祦淇℃伅]  {}/{}", content.getApp(), content.getStream());
             responseSendItem(mediaServerItem, content, toId, serial);
         }else {
@@ -292,7 +292,7 @@
             // 娣诲姞璁㈤槄
             HookSubscribeForStreamChange hookSubscribe = HookSubscribeFactory.on_stream_changed(content.getApp(), content.getStream(), true, "rtsp", mediaServerItem.getId());
 
-            subscribe.addSubscribe(hookSubscribe, (MediaServerItem mediaServerItemInUse, JSONObject json)->{
+            subscribe.addSubscribe(hookSubscribe, (mediaServerItemInUse, hookParam)->{
                         dynamicTask.stop(taskKey);
                         responseSendItem(mediaServerItem, content, toId, serial);
                     });
@@ -304,9 +304,6 @@
             String key = VideoManagerConstants.VM_MSG_STREAM_PUSH_REQUESTED;
             logger.info("[redis鍙戦�侀�氱煡] 鎺ㄦ祦琚姹� {}: {}/{}", key, messageForPushChannel.getApp(), messageForPushChannel.getStream());
             redisTemplate.convertAndSend(key, JSON.toJSON(messageForPushChannel));
-
-//            redisCatchStorage.sendStreamPushRequestedMsg(messageForPushChannel);
-
         }
     }
 

--
Gitblit v1.8.0