From 2f165d595af3565bd17612ee0f5866ace8ab43f4 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期二, 02 三月 2021 18:23:06 +0800 Subject: [PATCH] 对级联点播信令进行处理 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) 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 ba1a6f1..70026a8 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java @@ -1,13 +1,19 @@ package com.genersoft.iot.vmp.media.zlm; +import java.math.BigInteger; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.conf.MediaServerConfig; import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.storager.IVideoManagerStorager; +import com.genersoft.iot.vmp.utils.IpUtil; import com.genersoft.iot.vmp.vmanager.service.IPlayService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,8 +57,8 @@ @Autowired private IRedisCatchStorage redisCatchStorage; - // @Autowired - // private ZLMRESTfulUtils zlmresTfulUtils; + @Autowired + private ZLMRESTfulUtils zlmresTfulUtils; @Autowired private ZLMHttpHookSubscribe subscribe; @@ -133,8 +139,6 @@ if (logger.isDebugEnabled()) { logger.debug("ZLM HOOK on_publish API璋冪敤锛屽弬鏁帮細" + json.toString()); } - // String app = json.getString("app"); - // String streamId = json.getString("id"); ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json); if (subscribe != null) subscribe.response(json); @@ -212,6 +216,13 @@ if (logger.isDebugEnabled()) { logger.debug("ZLM HOOK on_shell_login API璋冪敤锛屽弬鏁帮細" + json.toString()); } + // TODO 濡傛灉鏄甫鏈塺tpstream鍒欏紑鍚寜闇�鎷夋祦 + String app = json.getString("app"); + String stream = json.getString("stream"); + + ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json); + if (subscribe != null) subscribe.response(json); + JSONObject ret = new JSONObject(); ret.put("code", 0); ret.put("msg", "success"); -- Gitblit v1.8.0