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 | 23 | |
| 24 | 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 | 30 | private Boolean logInDatebase = Boolean.TRUE; |
| 29 | 31 | |
| ... | ... | @@ -134,4 +136,12 @@ public class UserSetup { |
| 134 | 136 | public void setRedisConfig(Boolean redisConfig) { |
| 135 | 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 | 186 | ret.put("code", 0); |
| 187 | 187 | ret.put("msg", "success"); |
| 188 | 188 | ret.put("enableHls", true); |
| 189 | - ret.put("enableMP4", userSetup.isRecordPushLive()); | |
| 190 | 189 | String mediaServerId = json.getString("mediaServerId"); |
| 191 | 190 | ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json); |
| 192 | 191 | if (subscribe != null) { |
| ... | ... | @@ -200,6 +199,12 @@ public class ZLMHttpHookListener { |
| 200 | 199 | } |
| 201 | 200 | String app = json.getString("app"); |
| 202 | 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 | 208 | StreamInfo streamInfo = redisCatchStorage.queryPlaybackByStreamId(stream); |
| 204 | 209 | |
| 205 | 210 | // 录像回放时不进行录像下载 | ... | ... |
src/main/resources/all-application.yml