From 8b90fade9eb3a62b428f23f2306cb1911c98d355 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 02 四月 2024 00:05:09 +0800
Subject: [PATCH] 支持使用abl接收国标流

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManger.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManger.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManger.java
index b2bfaf1..d4d6563 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManger.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaServerStatusManger.java
@@ -5,10 +5,10 @@
 import com.alibaba.fastjson2.JSONObject;
 import com.genersoft.iot.vmp.conf.DynamicTask;
 import com.genersoft.iot.vmp.conf.UserSetting;
-import com.genersoft.iot.vmp.media.event.MediaServerChangeEvent;
-import com.genersoft.iot.vmp.media.event.MediaServerDeleteEvent;
+import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerChangeEvent;
+import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerDeleteEvent;
 import com.genersoft.iot.vmp.media.service.IMediaServerService;
-import com.genersoft.iot.vmp.media.zlm.dto.MediaServer;
+import com.genersoft.iot.vmp.media.bean.MediaServer;
 import com.genersoft.iot.vmp.media.zlm.dto.ZLMServerConfig;
 import com.genersoft.iot.vmp.media.zlm.event.HookZlmServerKeepaliveEvent;
 import com.genersoft.iot.vmp.media.zlm.event.HookZlmServerStartEvent;
@@ -193,10 +193,12 @@
                     }
                 }
                 if (config != null) {
+                    initPort(mediaServerItem, config);
                     setZLMConfig(mediaServerItem, "0".equals(config.getHookEnable())
                             || !Objects.equals(mediaServerItem.getHookAliveInterval(), config.getHookAliveInterval()));
                 }
             }
+            mediaServerService.update(mediaServerItem);
         }
         // 璁剧疆涓ゆ蹇冭烦鏈敹鍒板垯璁や负zlm绂荤嚎
         String key = "zlm-keepalive-" + mediaServerItem.getId();
@@ -210,6 +212,7 @@
         }, (int)(mediaServerItem.getHookAliveInterval() * 2 * 1000));
     }
     private void initPort(MediaServer mediaServerItem, ZLMServerConfig zlmServerConfig) {
+        // 绔彛鍙細浠庨厤缃腑璇诲彇涓�娆★紝涓�鏃﹁嚜宸遍厤缃垨鑰呰鍙栬繃浜嗗皢涓嶅湪閰嶇疆
         if (mediaServerItem.getHttpSSlPort() == 0) {
             mediaServerItem.setHttpSSlPort(zlmServerConfig.getHttpSSLport());
         }

--
Gitblit v1.8.0