From 3b21f385cdae7d94fce1ebba6abb06a893f57114 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 02 十一月 2021 10:40:29 +0800 Subject: [PATCH] 对需要向设备发起请求的http请求,使用缓存,等待设备请求返回的时候一次性释放所有请求 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 8 ++++---- 1 files changed, 4 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 678a56e..ad37cd8 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 @@ -377,16 +377,16 @@ String streamId = json.getString("stream"); if ("rtp".equals(app)) { String[] s = streamId.split("_"); - if (s.length == 4) { - String deviceId = s[2]; - String channelId = s[3]; + if (s.length == 2) { + String deviceId = s[0]; + String channelId = s[1]; Device device = storager.queryVideoDevice(deviceId); if (device != null) { UUID uuid = UUID.randomUUID(); SSRCInfo ssrcInfo; String streamId2 = null; if (mediaInfo.isRtpEnable()) { - streamId2 = String.format("%s/%s", device.getDeviceId(), channelId); + streamId2 = String.format("%s_%s", device.getDeviceId(), channelId); } ssrcInfo = mediaServerService.openRTPServer(mediaInfo, streamId2); cmder.playStreamCmd(mediaInfo, ssrcInfo, device, channelId, (MediaServerItem mediaServerItemInuse, JSONObject response) -> { -- Gitblit v1.8.0