Просмотр исходного кода

移除多余的节点启动事件分发

648540858 1 год назад
Родитель
Сommit
6de0c329ea

+ 0 - 8
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java

@@ -277,14 +277,6 @@ public class ZLMHttpHookListener {
         ZLMServerConfig zlmServerConfig = JSON.to(ZLMServerConfig.class, jsonObject);
         zlmServerConfig.setIp(request.getRemoteAddr());
         logger.info("[ZLM HOOK] zlm 启动 " + zlmServerConfig.getGeneralMediaServerId());
-        taskExecutor.execute(() -> {
-            List<ZlmHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(HookType.on_server_started);
-            if (subscribes != null && !subscribes.isEmpty()) {
-                for (ZlmHttpHookSubscribe.Event subscribe : subscribes) {
-                    subscribe.response(null, zlmServerConfig);
-                }
-            }
-        });
         try {
             HookZlmServerStartEvent event = new HookZlmServerStartEvent(this);
             MediaServer mediaServerItem = mediaServerService.getOne(zlmServerConfig.getMediaServerId());

+ 0 - 8
src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeFactory.java

@@ -49,14 +49,6 @@ public class HookSubscribeFactory {
         return hookSubscribe;
     }
 
-
-    public static HookSubscribeForServerStarted on_server_started() {
-        HookSubscribeForServerStarted hookSubscribe = new HookSubscribeForServerStarted();
-        hookSubscribe.setContent(new JSONObject());
-
-        return hookSubscribe;
-    }
-
     public static HookSubscribeForRecordMp4 on_record_mp4(String mediaServerId, String app, String stream) {
         HookSubscribeForRecordMp4 hookSubscribe = new HookSubscribeForRecordMp4();
         JSONObject subscribeKey = new com.alibaba.fastjson2.JSONObject();

+ 0 - 44
src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeForServerStarted.java

@@ -1,44 +0,0 @@
-package com.genersoft.iot.vmp.media.zlm.dto;
-
-import com.alibaba.fastjson2.JSONObject;
-import com.alibaba.fastjson2.annotation.JSONField;
-
-import java.time.Instant;
-
-/**
- * hook订阅-流变化
- * @author lin
- */
-public class HookSubscribeForServerStarted implements IHookSubscribe{
-
-    private HookType hookType = HookType.on_server_started;
-
-    private JSONObject content;
-
-    @JSONField(format="yyyy-MM-dd HH:mm:ss")
-    private Instant expires;
-
-    @Override
-    public HookType getHookType() {
-        return hookType;
-    }
-
-    @Override
-    public JSONObject getContent() {
-        return content;
-    }
-
-    public void setContent(JSONObject content) {
-        this.content = content;
-    }
-
-    @Override
-    public Instant getExpires() {
-        return expires;
-    }
-
-    @Override
-    public void setExpires(Instant expires) {
-        this.expires = expires;
-    }
-}