From 717ee609bf14d29d5f4b8a71920e761bc7539d5d Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Fri, 23 Feb 2024 08:39:59 +0800 Subject: [PATCH] =?UTF-8?q?zlm=20on=5Fstream=5Fchanged=20=E4=BB=85?= =?UTF-8?q?=E5=A4=84=E7=90=86=20rtsp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skcks/docking/gb28181/mocking/api/zlm/ZlmHookApi.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gb28181-mocking-api/src/main/java/cn/skcks/docking/gb28181/mocking/api/zlm/ZlmHookApi.java b/gb28181-mocking-api/src/main/java/cn/skcks/docking/gb28181/mocking/api/zlm/ZlmHookApi.java index a6cdf6e..03489c6 100644 --- a/gb28181-mocking-api/src/main/java/cn/skcks/docking/gb28181/mocking/api/zlm/ZlmHookApi.java +++ b/gb28181-mocking-api/src/main/java/cn/skcks/docking/gb28181/mocking/api/zlm/ZlmHookApi.java @@ -8,6 +8,7 @@ import cn.skcks.docking.gb28181.mocking.service.zlm.hook.ZlmStreamNoneReaderHook import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -24,7 +25,10 @@ public class ZlmHookApi { @PostJson("/on_stream_changed") public void onStreamChanged(@RequestBody ZlmStreamChangeDTO dto){ - zlmStreamChangeHookService.processEvent(dto.getApp(),dto.getStream(), dto.getRegist()); + log.debug("on_stream_changed {}", dto); + if(StringUtils.equalsIgnoreCase(dto.getSchema(), "rtsp")){ + zlmStreamChangeHookService.processEvent(dto.getApp(),dto.getStream(), dto.getRegist()); + } } @PostJson("/on_stream_none_reader")