panlinlin
2021-04-11 89244932c6185cd39e9a9f8aa8bf3acf99329335
src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java
@@ -1,24 +1,19 @@
package com.genersoft.iot.vmp.vmanager.playback;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
//import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.vmanager.service.IPlayService;
import com.genersoft.iot.vmp.service.IPlayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -33,7 +28,7 @@
@CrossOrigin
@RestController
@RequestMapping("/api")
@RequestMapping("/api/playback")
public class PlaybackController {
   private final static Logger logger = LoggerFactory.getLogger(PlaybackController.class);
@@ -47,8 +42,8 @@
   @Autowired
   private IRedisCatchStorage redisCatchStorage;
   @Autowired
   private ZLMRESTfulUtils zlmresTfulUtils;
   // @Autowired
   // private ZLMRESTfulUtils zlmresTfulUtils;
   @Autowired
   private IPlayService playService;
@@ -56,7 +51,7 @@
   @Autowired
   private DeferredResultHolder resultHolder;
   @GetMapping("/playback/{deviceId}/{channelId}")
   @GetMapping("/start/{deviceId}/{channelId}")
   public DeferredResult<ResponseEntity<String>> play(@PathVariable String deviceId, @PathVariable String channelId, String startTime,
                                          String endTime) {
@@ -94,7 +89,7 @@
      return result;
   }
   @RequestMapping("/playback/{ssrc}/stop")
   @RequestMapping("/stop/{ssrc}")
   public ResponseEntity<String> playStop(@PathVariable String ssrc) {
      cmder.streamByeCmd(ssrc);