songww
2020-05-08 bf7ab3fe2ba246208d729901c33a9402209ee26a
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;
   
   @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));