Lawrence
2020-12-16 44d216100b45c3337c593ee82ee68e7e0f35d24b
src/main/java/com/genersoft/iot/vmp/web/ApiStreamController.java
@@ -34,8 +34,7 @@
    @Autowired
    private IVideoManagerStorager storager;
    @Value("${media.closeWaitRTPInfo}")
    private boolean closeWaitRTPInfo;
    private boolean closeWaitRTPInfo = false;
    @Autowired
@@ -94,7 +93,7 @@
        StreamInfo streamInfo = storager.queryPlayByDevice(device.getDeviceId(), code);
        if (streamInfo == null) {
            logger.debug("streamInfo 等于null, 重新点播");
            streamInfo = cmder.playStreamCmd(device, code);
//            streamInfo = cmder.playStreamCmd(device, code);
        }else {
            logger.debug("streamInfo 不等于null, 向流媒体查询是否正在推流");
            String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase();
@@ -106,9 +105,9 @@
                result.put("DeviceID", device.getDeviceId());
                result.put("ChannelID", code);
                result.put("ChannelName", deviceChannel.getName());
                result.put("ChannelCustomName ", "");
                result.put("FLV ", streamInfo.getFlv());
                result.put("WS_FLV ", streamInfo.getWs_flv());
                result.put("ChannelCustomName", "");
                result.put("FLV", streamInfo.getFlv());
                result.put("WS_FLV", streamInfo.getWs_flv());
                result.put("RTMP", streamInfo.getRtmp());
                result.put("HLS", streamInfo.getHls());
                result.put("RTSP", streamInfo.getRtsp());
@@ -136,7 +135,7 @@
            } else {
                logger.debug("向流媒体查询没有推流, 重新点播");
                storager.stopPlay(streamInfo);
                streamInfo = cmder.playStreamCmd(device, code);
//                streamInfo = cmder.playStreamCmd(device, code);
            }
        }
@@ -178,9 +177,9 @@
            result.put("DeviceID", device.getDeviceId());
            result.put("ChannelID", code);
            result.put("ChannelName", deviceChannel.getName());
            result.put("ChannelCustomName ", "");
            result.put("FLV ", streamInfo.getFlv());
            result.put("WS_FLV ", streamInfo.getWs_flv());
            result.put("ChannelCustomName", "");
            result.put("FLV", streamInfo.getFlv());
            result.put("WS_FLV", streamInfo.getWs_flv());
            result.put("RTMP", streamInfo.getRtmp());
            result.put("HLS", streamInfo.getHls());
            result.put("RTSP", streamInfo.getRtsp());