From 56859d09df8d4226882d43934acf32d60a3b51d7 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期二, 30 三月 2021 18:46:34 +0800 Subject: [PATCH] 添加推流列表和拉流代理,下一步与国标关联 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java index 995f916..129f8a3 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookSubscribe.java @@ -3,7 +3,9 @@ import com.alibaba.fastjson.JSONObject; import org.springframework.stereotype.Component; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -67,4 +69,19 @@ } return event; } + + public List<ZLMHttpHookSubscribe.Event> getSubscribes(HookType type) { + ZLMHttpHookSubscribe.Event event= null; + Map<JSONObject, Event> eventMap = allSubscribes.get(type); + if (eventMap == null) { + return null; + } + List<ZLMHttpHookSubscribe.Event> result = new ArrayList<>(); + for (JSONObject key : eventMap.keySet()) { + result.add(eventMap.get(key)); + } + return result; + } + + } -- Gitblit v1.8.0