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

pull/1411/head
648540858 2024-03-26 23:38:49 +08:00
parent 0c2180c07f
commit 6de0c329ea
3 changed files with 0 additions and 60 deletions

View File

@ -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());

View File

@ -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();

View File

@ -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;
}
}