From 48896474e6405f69f5033970538809dbc112a356 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期一, 28 十二月 2020 11:07:01 +0800 Subject: [PATCH] 检查设备是否存在, 不存在则不回复心跳 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 5 +++-- 1 files changed, 3 insertions(+), 2 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 03031f0..1116ae5 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 @@ -311,7 +311,8 @@ if (autoApplyPlay) { String app = json.getString("app"); String streamId = json.getString("stream"); - if ("rtp".equals(app) && streamId.indexOf("gb_play") > -1) { + StreamInfo streamInfo = storager.queryPlayByStreamId(streamId); + if ("rtp".equals(app) && streamId.indexOf("gb_play") > -1 && streamInfo == null) { String[] s = streamId.split("_"); if (s.length == 4) { String deviceId = s[2]; @@ -322,7 +323,7 @@ cmder.playStreamCmd(device, channelId, (JSONObject response) -> { logger.info("鏀跺埌璁㈤槄娑堟伅锛� " + response.toJSONString()); playService.onPublishHandlerForPlay(response, deviceId, channelId, uuid.toString()); - }); + }, null); } } -- Gitblit v1.8.0