diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java index 71ceb2e3..42f5e28a 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java +++ b/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 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()); diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeFactory.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeFactory.java index f828bdd8..417251f0 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeFactory.java +++ b/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(); diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeForServerStarted.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeForServerStarted.java deleted file mode 100755 index 8bcde0a0..00000000 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/HookSubscribeForServerStarted.java +++ /dev/null @@ -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; - } -}