Ver código fonte

摄像头预览回放

gaodd 1 ano atrás
pai
commit
a268ceccce

+ 73 - 0
src/main/java/com/chinaitop/depot/monitor/controller/PreviewPlaybackController.java

@@ -0,0 +1,73 @@
1
+package com.chinaitop.depot.monitor.controller;
2
+
3
+import com.chinaitop.depot.hk.dto.req.PlaybackReqDTO;
4
+import com.chinaitop.depot.hk.dto.req.PreviewReqDTO;
5
+import com.chinaitop.depot.hk.dto.res.PlaybackResDTO;
6
+import com.chinaitop.depot.hk.dto.res.PreviewResDTO;
7
+import com.chinaitop.depot.hk.service.HkService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.http.MediaType;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.annotation.Resource;
19
+
20
+/**
21
+ * 视频预览回放
22
+ */
23
+@RestController
24
+@RequestMapping(value = "/previewPlayback")
25
+@Api(description = "预览回放")
26
+public class PreviewPlaybackController {
27
+
28
+    @Resource
29
+    private HkService hkService;
30
+
31
+    
32
+    /**
33
+     * 摄像头预览
34
+     * @param previewReqDTO
35
+     * @return
36
+     */
37
+    @RequestMapping(value="/getPreview", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
38
+    @ApiOperation(value="预览", notes = "预览")
39
+    @ApiImplicitParams({
40
+            @ApiImplicitParam(name = "{cameraIndexCode}", value = "监控点编号", paramType = "query")
41
+    })
42
+    public PreviewResDTO getAlarmPhone(PreviewReqDTO previewReqDTO) {
43
+        return hkService.previewURLs(previewReqDTO);
44
+    }
45
+    
46
+    
47
+    /**
48
+     * 摄像头回放
49
+     * @param playbackReqDTO
50
+     * @return
51
+     */
52
+    @RequestMapping(value="/getPlayback", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
53
+    @ApiOperation(value="回放", notes = "回放")
54
+    /*@ApiImplicitParams({
55
+            @ApiImplicitParam(name = "cameraIndexCode", value = "监控点唯一标识,分页获取监控点资源接口获取返回参数", paramType = "query"),
56
+            @ApiImplicitParam(name = "recordLocation", value = "存储类型, 0:中心存储, 1:设备存储 (默认为中心存储)", paramType = "query"),
57
+            @ApiImplicitParam(name = "protocol", value = "取流协议", paramType = "query"),
58
+            @ApiImplicitParam(name = "transmode", value = "传输协议,默认为TCP", paramType = "query"),
59
+            @ApiImplicitParam(name = "beginTime", value = "开始时间,ISO8601格式", paramType = "query"),
60
+            @ApiImplicitParam(name = "endTime", value = "结束时间,与开始时间相差不超过三天,ISO8601格式", paramType = "query"),
61
+            @ApiImplicitParam(name = "uuid", value = "分页查询id,用于继续查询剩余片段,默认为空字符串 (设备存储生效)", paramType = "query"),
62
+            @ApiImplicitParam(name = "uuid", value = "分页查询id,用于继续查询剩余片段,默认为空字符串 (设备存储生效)", paramType = "query"),
63
+            @ApiImplicitParam(name = "expand", value = "扩展内容,支持指定解码格式等,格式:key=value,多个以&隔开", paramType = "query"),
64
+            @ApiImplicitParam(name = "streamform", value = "输出码流转封装格式,默认为RTP ,ps", paramType = "query"),
65
+            @ApiImplicitParam(name = "lockType", value = "查询录像的锁定类型,默认查询全部录像 0  1未锁定 2锁定", paramType = "query")
66
+
67
+    })*/
68
+    public PlaybackResDTO getPlayback(PlaybackReqDTO playbackReqDTO) {
69
+        return hkService.playbackURLs(playbackReqDTO);
70
+    }
71
+
72
+    
73
+}