From 35e222482b26d5e672eb5939a24458fc30a7d37f Mon Sep 17 00:00:00 2001 From: chenparty <870300816@qq.com> Date: 星期日, 26 九月 2021 15:37:01 +0800 Subject: [PATCH] 修复快照无法生成的BUG --- src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java index 450c54a..b4b7469 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.service.IStreamPushService; import com.genersoft.iot.vmp.service.IMediaService; import com.genersoft.iot.vmp.storager.IVideoManagerStorager; +import com.genersoft.iot.vmp.vmanager.bean.WVPResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -47,9 +48,18 @@ }) @GetMapping(value = "/stream_info_by_app_and_stream") @ResponseBody - public StreamInfo getStreamInfoByAppAndStream(@RequestParam String app, @RequestParam String stream, @RequestParam String mediaServerId){ - - return mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream,mediaServerId); + public WVPResult<StreamInfo> getStreamInfoByAppAndStream(@RequestParam String app, @RequestParam String stream, @RequestParam String mediaServerId){ + StreamInfo streamInfoByAppAndStreamWithCheck = mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId); + WVPResult<StreamInfo> result = new WVPResult<>(); + if (streamInfoByAppAndStreamWithCheck != null){ + result.setCode(0); + result.setMsg("scccess"); + result.setData(streamInfoByAppAndStreamWithCheck); + }else { + result.setCode(-1); + result.setMsg("fail"); + } + return result; } -- Gitblit v1.8.0