songww
2020-05-09 407ce63630be00f541d4fcb15b2a25bf4dab4566
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
@@ -10,7 +10,9 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
@RestController
@RequestMapping("/api")
@@ -21,10 +23,14 @@
   @Autowired
   private SIPCommander cmder;
   
   @GetMapping("/play/{deviceId}_{channelId}")
   @Autowired
   private IVideoManagerStorager storager;
   @GetMapping("/play/{deviceId}/{channelId}")
   public ResponseEntity<String> play(@PathVariable String deviceId,@PathVariable String channelId){
      
      String ssrc = cmder.playStreamCmd(deviceId, channelId);
      Device device = storager.queryVideoDevice(deviceId);
      String ssrc = cmder.playStreamCmd(device, channelId);
      
      if (logger.isDebugEnabled()) {
         logger.debug(String.format("设备预览 API调用,deviceId:%s ,channelId:%s",deviceId, channelId));