diff --git a/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java b/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java index ad2eb2b..802c8d2 100644 --- a/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java +++ b/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java @@ -85,7 +85,7 @@ public class VideoController { return gb28181DownloadService.realtimeVideoUrl(req.getDeviceCode()); } - @Operation(summary = "获取实时视频 (返回视频url)") + @Operation(summary = "续签实时视频 +60s") @GetMapping(value = "/device/realtime/renew") @ResponseBody public JsonResponse renew(@ParameterObject RealtimeVideoReq req) { @@ -93,7 +93,7 @@ public class VideoController { return JsonResponse.success(null); } - @Operation(summary = "获取实时视频 (返回视频url)") + @Operation(summary = "关闭实时视频 60s 后关闭") @GetMapping(value = "/device/realtime/close") @ResponseBody public JsonResponse close(@ParameterObject RealtimeVideoReq req) { diff --git a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java index daf4361..eb9adb2 100644 --- a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java +++ b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java @@ -65,8 +65,6 @@ import java.util.Optional; import java.util.Vector; import java.util.concurrent.*; -import static cn.skcks.docking.gb28181.wvp.orm.mybatis.dynamic.mapper.WvpProxyDeviceDynamicSqlSupport.deviceCode; - @Slf4j @Service @RequiredArgsConstructor @@ -290,12 +288,12 @@ public class Gb28181DownloadService { if(docking == null){ return; } - closeExistRequest(deviceCode, device, docking); + String cacheKey = CacheUtil.getKey(docking.getGbDeviceId(), device.getGbDeviceChannelId()); String existCallId = RedisUtil.StringOps.get(cacheKey); realtimeVideoInfoMap.computeIfPresent(cacheKey, (key, videoInfo) -> { autoCloseReadtimeVideo(docking,device,videoInfo,cacheKey,existCallId); - return null; + return videoInfo; }); }