From 2d492c5b6b33554d9512753e92dd1d89a489e3f2 Mon Sep 17 00:00:00 2001 From: lin Date: Wed, 1 Feb 2023 10:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=A0=87=E5=9B=9E=E6=94=BE=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E6=97=B6=E9=97=B4=E4=BD=BF=E7=94=A8=E7=82=B9=E6=92=AD?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E4=B8=80=E6=A0=B7=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/vmanager/gb28181/playback/PlaybackController.java | 8 ++++++-- src/main/resources/all-application.yml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java index 511b98d5..eb6f997d 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java @@ -1,6 +1,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.playback; import com.genersoft.iot.vmp.common.StreamInfo; +import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ServiceException; import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException; @@ -64,13 +65,16 @@ public class PlaybackController { @Autowired private DeferredResultHolder resultHolder; + @Autowired + private UserSetting userSetting; + @Operation(summary = "开始视频回放") @Parameter(name = "deviceId", description = "设备国标编号", required = true) @Parameter(name = "channelId", description = "通道国标编号", required = true) @Parameter(name = "startTime", description = "开始时间", required = true) @Parameter(name = "endTime", description = "结束时间", required = true) @GetMapping("/start/{deviceId}/{channelId}") - public DeferredResult> play(@PathVariable String deviceId, @PathVariable String channelId, + public DeferredResult> start(@PathVariable String deviceId, @PathVariable String channelId, String startTime, String endTime) { if (logger.isDebugEnabled()) { @@ -79,7 +83,7 @@ public class PlaybackController { String uuid = UUID.randomUUID().toString(); String key = DeferredResultHolder.CALLBACK_CMD_PLAYBACK + deviceId + channelId; - DeferredResult> result = new DeferredResult<>(30000L); + DeferredResult> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue()); resultHolder.put(key, uuid, result); WVPResult wvpResult = new WVPResult<>(); diff --git a/src/main/resources/all-application.yml b/src/main/resources/all-application.yml index 58b2a021..e3c23604 100644 --- a/src/main/resources/all-application.yml +++ b/src/main/resources/all-application.yml @@ -167,7 +167,7 @@ user-settings: senior-sdp: false # 保存移动位置历史轨迹:true:保留历史数据,false:仅保留最后的位置(默认) save-position-history: false - # 点播等待超时时间,单位:毫秒 + # 点播/录像回放 等待超时时间,单位:毫秒 play-timeout: 18000 # 上级点播等待超时时间,单位:毫秒 platform-play-timeout: 60000