From d6262acf6ab2a5083e62ea98299b378f61cd5421 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 20 四月 2023 16:42:44 +0800
Subject: [PATCH] 更新readme
---
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java | 10 +++++++---
1 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 511b98d..8bab3fd 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;
@@ -39,7 +40,7 @@
* @author lin
*/
@Tag(name = "瑙嗛鍥炴斁")
-@CrossOrigin
+
@RestController
@RequestMapping("/api/playback")
public class PlaybackController {
@@ -64,13 +65,16 @@
@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<WVPResult<StreamContent>> play(@PathVariable String deviceId, @PathVariable String channelId,
+ public DeferredResult<WVPResult<StreamContent>> start(@PathVariable String deviceId, @PathVariable String channelId,
String startTime, String endTime) {
if (logger.isDebugEnabled()) {
@@ -79,7 +83,7 @@
String uuid = UUID.randomUUID().toString();
String key = DeferredResultHolder.CALLBACK_CMD_PLAYBACK + deviceId + channelId;
- DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(30000L);
+ DeferredResult<WVPResult<StreamContent>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
resultHolder.put(key, uuid, result);
WVPResult<StreamContent> wvpResult = new WVPResult<>();
--
Gitblit v1.8.0