From c429a34e5390b0245da276c2c03a6116822167c3 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 08 五月 2023 17:18:08 +0800 Subject: [PATCH] 修复国标视频点播三种级联并发点播和录像下载的问题 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 35 +++++------------------------------ 1 files changed, 5 insertions(+), 30 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 1681835..fae90fe 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 @@ -451,6 +451,11 @@ InviteInfo inviteInfo = inviteStreamService.getInviteInfoByStream(null, param.getStream()); // 鐐规挱 if (inviteInfo != null) { + // 褰曞儚涓嬭浇 + if (inviteInfo.getType() == InviteSessionType.DOWNLOAD) { + ret.put("close", false); + return ret; + } // 鏀跺埌鏃犱汉瑙傜湅璇存槑娴佷篃娌℃湁鍦ㄥ線涓婄骇鎺ㄩ�� if (redisCatchStorage.isChannelSendingRTP(inviteInfo.getChannelId())) { List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByChnnelId( @@ -484,36 +489,6 @@ inviteStreamService.removeInviteInfo(inviteInfo.getType(), inviteInfo.getDeviceId(), inviteInfo.getChannelId(), inviteInfo.getStream()); storager.stopPlay(inviteInfo.getDeviceId(), inviteInfo.getChannelId()); - return ret; - } - // 褰曞儚鍥炴斁 - StreamInfo streamInfoForPlayBackCatch = redisCatchStorage.queryPlayback(null, null, - param.getStream(), null); - if (streamInfoForPlayBackCatch != null) { - if (streamInfoForPlayBackCatch.isPause()) { - ret.put("close", false); - } else { - Device device = deviceService.getDevice(streamInfoForPlayBackCatch.getDeviceID()); - if (device != null) { - try { - cmder.streamByeCmd(device, streamInfoForPlayBackCatch.getChannelId(), - streamInfoForPlayBackCatch.getStream(), null); - } catch (InvalidArgumentException | ParseException | SipException | - SsrcTransactionNotFoundException e) { - logger.error("[鏃犱汉瑙傜湅]鍥炴斁锛� 鍙戦�丅YE澶辫触 {}", e.getMessage()); - } - } - redisCatchStorage.stopPlayback(streamInfoForPlayBackCatch.getDeviceID(), - streamInfoForPlayBackCatch.getChannelId(), streamInfoForPlayBackCatch.getStream(), null); - } - return ret; - } - // 褰曞儚涓嬭浇 - StreamInfo streamInfoForDownload = redisCatchStorage.queryDownload(null, null, - param.getStream(), null); - // 杩涜褰曞儚涓嬭浇鏃舵棤浜鸿鐪嬩笉鏂祦 - if (streamInfoForDownload != null) { - ret.put("close", false); return ret; } } else { -- Gitblit v1.8.0