Commit 0b6587b1ad7371e993904c1b7f4baa67e3495bf4
1 parent
5bcd8495
增加配置将国标录像与其他录像分开
Showing
3 changed files
with
19 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/conf/UserSetup.java
| @@ -23,7 +23,9 @@ public class UserSetup { | @@ -23,7 +23,9 @@ public class UserSetup { | ||
| 23 | 23 | ||
| 24 | private Boolean interfaceAuthentication = Boolean.TRUE; | 24 | private Boolean interfaceAuthentication = Boolean.TRUE; |
| 25 | 25 | ||
| 26 | - private Boolean recordPushLive = Boolean.FALSE; | 26 | + private Boolean recordPushLive = Boolean.TRUE; |
| 27 | + | ||
| 28 | + private Boolean recordSip = Boolean.TRUE; | ||
| 27 | 29 | ||
| 28 | private Boolean logInDatebase = Boolean.TRUE; | 30 | private Boolean logInDatebase = Boolean.TRUE; |
| 29 | 31 | ||
| @@ -134,4 +136,12 @@ public class UserSetup { | @@ -134,4 +136,12 @@ public class UserSetup { | ||
| 134 | public void setRedisConfig(Boolean redisConfig) { | 136 | public void setRedisConfig(Boolean redisConfig) { |
| 135 | this.redisConfig = redisConfig; | 137 | this.redisConfig = redisConfig; |
| 136 | } | 138 | } |
| 139 | + | ||
| 140 | + public Boolean getRecordSip() { | ||
| 141 | + return recordSip; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public void setRecordSip(Boolean recordSip) { | ||
| 145 | + this.recordSip = recordSip; | ||
| 146 | + } | ||
| 137 | } | 147 | } |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| @@ -186,7 +186,6 @@ public class ZLMHttpHookListener { | @@ -186,7 +186,6 @@ public class ZLMHttpHookListener { | ||
| 186 | ret.put("code", 0); | 186 | ret.put("code", 0); |
| 187 | ret.put("msg", "success"); | 187 | ret.put("msg", "success"); |
| 188 | ret.put("enableHls", true); | 188 | ret.put("enableHls", true); |
| 189 | - ret.put("enableMP4", userSetup.isRecordPushLive()); | ||
| 190 | String mediaServerId = json.getString("mediaServerId"); | 189 | String mediaServerId = json.getString("mediaServerId"); |
| 191 | ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json); | 190 | ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json); |
| 192 | if (subscribe != null) { | 191 | if (subscribe != null) { |
| @@ -200,6 +199,12 @@ public class ZLMHttpHookListener { | @@ -200,6 +199,12 @@ public class ZLMHttpHookListener { | ||
| 200 | } | 199 | } |
| 201 | String app = json.getString("app"); | 200 | String app = json.getString("app"); |
| 202 | String stream = json.getString("stream"); | 201 | String stream = json.getString("stream"); |
| 202 | + if ("rtp".equals(app)) { | ||
| 203 | + ret.put("enableMP4", userSetup.getRecordSip()); | ||
| 204 | + }else { | ||
| 205 | + ret.put("enableMP4", userSetup.isRecordPushLive()); | ||
| 206 | + } | ||
| 207 | + ret.put("enableMP4", userSetup.isRecordPushLive()); | ||
| 203 | StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream); | 208 | StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream); |
| 204 | 209 | ||
| 205 | // 录像回放时不进行录像下载 | 210 | // 录像回放时不进行录像下载 |
src/main/resources/all-application.yml
| @@ -168,6 +168,8 @@ user-settings: | @@ -168,6 +168,8 @@ user-settings: | ||
| 168 | - /api/v1/** | 168 | - /api/v1/** |
| 169 | # 推流直播是否录制 | 169 | # 推流直播是否录制 |
| 170 | record-push-live: true | 170 | record-push-live: true |
| 171 | + # 国标是否录制 | ||
| 172 | + record-sip: true | ||
| 171 | # 是否将日志存储进数据库 | 173 | # 是否将日志存储进数据库 |
| 172 | logInDatebase: true | 174 | logInDatebase: true |
| 173 | # 第三方匹配,用于从stream钟获取有效信息 | 175 | # 第三方匹配,用于从stream钟获取有效信息 |