diff --git a/src/main/java/com/genersoft/iot/vmp/conf/UserSetup.java b/src/main/java/com/genersoft/iot/vmp/conf/UserSetup.java index 8a4c021f..4decd2bb 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/UserSetup.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/UserSetup.java @@ -23,7 +23,9 @@ public class UserSetup { private Boolean interfaceAuthentication = Boolean.TRUE; - private Boolean recordPushLive = Boolean.FALSE; + private Boolean recordPushLive = Boolean.TRUE; + + private Boolean recordSip = Boolean.TRUE; private Boolean logInDatebase = Boolean.TRUE; @@ -134,4 +136,12 @@ public class UserSetup { public void setRedisConfig(Boolean redisConfig) { this.redisConfig = redisConfig; } + + public Boolean getRecordSip() { + return recordSip; + } + + public void setRecordSip(Boolean recordSip) { + this.recordSip = recordSip; + } } 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 34ee4a86..5c8a6b53 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 @@ public class ZLMHttpHookListener { 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,12 @@ public class ZLMHttpHookListener { } 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()); + } + ret.put("enableMP4", userSetup.isRecordPushLive()); StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream); // 录像回放时不进行录像下载 diff --git a/src/main/resources/all-application.yml b/src/main/resources/all-application.yml index e3b1ad18..5e772365 100644 --- a/src/main/resources/all-application.yml +++ b/src/main/resources/all-application.yml @@ -168,6 +168,8 @@ user-settings: - /api/v1/** # 推流直播是否录制 record-push-live: true + # 国标是否录制 + record-sip: true # 是否将日志存储进数据库 logInDatebase: true # 第三方匹配,用于从stream钟获取有效信息