Commit 470be2dc3620351b46108e0ee116dccd8a2d73c3

Authored by 648540858
1 parent 72e91f69

修复开始点播功能接口调用返回参数与定义的不符 #635

src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
1 1 package com.genersoft.iot.vmp.common;
2 2  
  3 +import io.swagger.v3.oas.annotations.media.Schema;
3 4  
  5 +@Schema(description = "流信息")
4 6 public class StreamInfo {
5 7  
  8 + @Schema(description = "应用名")
6 9 private String app;
  10 + @Schema(description = "流ID")
7 11 private String stream;
  12 + @Schema(description = "设备编号")
8 13 private String deviceID;
  14 + @Schema(description = "通道编号")
9 15 private String channelId;
  16 + @Schema(description = "HTTP-FLV流地址")
10 17 private String flv;
11 18  
  19 + @Schema(description = "IP")
12 20 private String ip;
13   -
  21 + @Schema(description = "HTTPS-FLV流地址")
14 22 private String https_flv;
  23 + @Schema(description = "Websocket-FLV流地址")
15 24 private String ws_flv;
  25 + @Schema(description = "Websockets-FLV流地址")
16 26 private String wss_flv;
  27 + @Schema(description = "HTTP-FMP4流地址")
17 28 private String fmp4;
  29 + @Schema(description = "HTTPS-FMP4流地址")
18 30 private String https_fmp4;
  31 + @Schema(description = "Websocket-FMP4流地址")
19 32 private String ws_fmp4;
  33 + @Schema(description = "Websockets-FMP4流地址")
20 34 private String wss_fmp4;
  35 + @Schema(description = "HLS流地址")
21 36 private String hls;
  37 + @Schema(description = "HTTPS-HLS流地址")
22 38 private String https_hls;
  39 + @Schema(description = "Websocket-HLS流地址")
23 40 private String ws_hls;
  41 + @Schema(description = "Websockets-HLS流地址")
24 42 private String wss_hls;
  43 + @Schema(description = "HTTP-TS流地址")
25 44 private String ts;
  45 + @Schema(description = "HTTPS-TS流地址")
26 46 private String https_ts;
  47 + @Schema(description = "Websocket-TS流地址")
27 48 private String ws_ts;
  49 + @Schema(description = "Websockets-TS流地址")
28 50 private String wss_ts;
  51 + @Schema(description = "RTMP流地址")
29 52 private String rtmp;
  53 + @Schema(description = "RTMPS流地址")
30 54 private String rtmps;
  55 + @Schema(description = "RTSP流地址")
31 56 private String rtsp;
  57 + @Schema(description = "RTSPS流地址")
32 58 private String rtsps;
  59 + @Schema(description = "RTC流地址")
33 60 private String rtc;
34 61  
  62 + @Schema(description = "RTCS流地址")
35 63 private String rtcs;
  64 + @Schema(description = "流媒体ID")
36 65 private String mediaServerId;
  66 + @Schema(description = "流编码信息")
37 67 private Object tracks;
  68 + @Schema(description = "开始时间")
38 69 private String startTime;
  70 + @Schema(description = "结束时间")
39 71 private String endTime;
  72 + @Schema(description = "进度(录像下载使用)")
40 73 private double progress;
41 74  
  75 + @Schema(description = "是否暂停(录像回放使用)")
42 76 private boolean pause;
43 77  
44 78 public static class TransactionInfo{
... ...
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
... ... @@ -129,7 +129,7 @@ public class PlayServiceImpl implements IPlayService {
129 129 String uuid = UUID.randomUUID().toString();
130 130 msg.setId(uuid);
131 131 playResult.setUuid(uuid);
132   - DeferredResult<WVPResult<String>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
  132 + DeferredResult<WVPResult<StreamInfo>> result = new DeferredResult<>(userSetting.getPlayTimeout().longValue());
133 133 playResult.setResult(result);
134 134 // 录像查询以channelId作为deviceId查询
135 135 resultHolder.put(key, uuid, result);
... ...
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
... ... @@ -82,7 +82,7 @@ public class PlayController {
82 82 @Parameter(name = "deviceId", description = "设备国标编号", required = true)
83 83 @Parameter(name = "channelId", description = "通道国标编号", required = true)
84 84 @GetMapping("/start/{deviceId}/{channelId}")
85   - public DeferredResult<WVPResult<String>> play(@PathVariable String deviceId,
  85 + public DeferredResult<WVPResult<StreamInfo>> play(@PathVariable String deviceId,
86 86 @PathVariable String channelId) {
87 87  
88 88 // 获取可用的zlm
... ...
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/bean/PlayResult.java
1 1 package com.genersoft.iot.vmp.vmanager.gb28181.play.bean;
2 2  
  3 +import com.genersoft.iot.vmp.common.StreamInfo;
3 4 import com.genersoft.iot.vmp.gb28181.bean.Device;
4 5 import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
5 6 import org.springframework.http.ResponseEntity;
... ... @@ -7,16 +8,16 @@ import org.springframework.web.context.request.async.DeferredResult;
7 8  
8 9 public class PlayResult {
9 10  
10   - private DeferredResult<WVPResult<String>> result;
  11 + private DeferredResult<WVPResult<StreamInfo>> result;
11 12 private String uuid;
12 13  
13 14 private Device device;
14 15  
15   - public DeferredResult<WVPResult<String>> getResult() {
  16 + public DeferredResult<WVPResult<StreamInfo>> getResult() {
16 17 return result;
17 18 }
18 19  
19   - public void setResult(DeferredResult<WVPResult<String>> result) {
  20 + public void setResult(DeferredResult<WVPResult<StreamInfo>> result) {
20 21 this.result = result;
21 22 }
22 23  
... ...