From 1ea95d2b878ac40a055874753bfa643e4e141f0b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 01 三月 2022 17:48:21 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' of https://github.com/648540858/wvp-GB28181-pro into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 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 6e6b7b5..424188d 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 @@ -186,7 +186,6 @@ ret.put("code", 0); ret.put("msg", "success"); ret.put("enableHls", true); - ret.put("enableMP4", userSetup.isRecordPushLive()); String mediaServerId = json.getString("mediaServerId"); ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json); if (subscribe != null) { @@ -200,6 +199,11 @@ } String app = json.getString("app"); String stream = json.getString("stream"); + if ("rtp".equals(app)) { + ret.put("enableMP4", userSetup.getRecordSip()); + }else { + ret.put("enableMP4", userSetup.isRecordPushLive()); + } StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream); // 褰曞儚鍥炴斁鏃朵笉杩涜褰曞儚涓嬭浇 @@ -354,6 +358,8 @@ if (mediaServerItem != null){ if (regist) { StreamPushItem streamPushItem = null; + StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaServerItem, app, streamId, tracks); + item.setStreamInfo(streamInfoByAppAndStream); redisCatchStorage.addStream(mediaServerItem, type, app, streamId, item); if (item.getOriginType() == OriginType.RTSP_PUSH.ordinal() || item.getOriginType() == OriginType.RTMP_PUSH.ordinal() -- Gitblit v1.8.0