Commit 2d492c5b6b33554d9512753e92dd1d89a489e3f2

Authored by lin
1 parent df717135

国标回放超时时间使用点播超时一样的字段

src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java
1 1 package com.genersoft.iot.vmp.vmanager.gb28181.playback;
2 2  
3 3 import com.genersoft.iot.vmp.common.StreamInfo;
  4 +import com.genersoft.iot.vmp.conf.UserSetting;
4 5 import com.genersoft.iot.vmp.conf.exception.ControllerException;
5 6 import com.genersoft.iot.vmp.conf.exception.ServiceException;
6 7 import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
... ... @@ -64,13 +65,16 @@ public class PlaybackController {
64 65 @Autowired
65 66 private DeferredResultHolder resultHolder;
66 67  
  68 + @Autowired
  69 + private UserSetting userSetting;
  70 +
67 71 @Operation(summary = "开始视频回放")
68 72 @Parameter(name = "deviceId", description = "设备国标编号", required = true)
69 73 @Parameter(name = "channelId", description = "通道国标编号", required = true)
70 74 @Parameter(name = "startTime", description = "开始时间", required = true)
71 75 @Parameter(name = "endTime", description = "结束时间", required = true)
72 76 @GetMapping("/start/{deviceId}/{channelId}")
73   - public DeferredResult<WVPResult<StreamContent>> play(@PathVariable String deviceId, @PathVariable String channelId,
  77 + public DeferredResult<WVPResult<StreamContent>> start(@PathVariable String deviceId, @PathVariable String channelId,
74 78 String startTime, String endTime) {
75 79  
76 80 if (logger.isDebugEnabled()) {
... ... @@ -79,7 +83,7 @@ public class PlaybackController {
79 83  
80 84 String uuid = UUID.randomUUID().toString();
81 85 String key = DeferredResultHolder.CALLBACK_CMD_PLAYBACK + deviceId + channelId;
82   - DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(30000L);
  86 + DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
83 87 resultHolder.put(key, uuid, result);
84 88  
85 89 WVPResult<StreamContent> wvpResult = new WVPResult<>();
... ...
src/main/resources/all-application.yml
... ... @@ -167,7 +167,7 @@ user-settings:
167 167 senior-sdp: false
168 168 # 保存移动位置历史轨迹:true:保留历史数据,false:仅保留最后的位置(默认)
169 169 save-position-history: false
170   - # 点播等待超时时间,单位:毫秒
  170 + # 点播/录像回放 等待超时时间,单位:毫秒
171 171 play-timeout: 18000
172 172 # 上级点播等待超时时间,单位:毫秒
173 173 platform-play-timeout: 60000
... ...