xiaoxie
2021-12-01 6ac131bcf6ec034ffc9e5813c68c56c6e5c32b70
src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
File was renamed from src/main/java/com/genersoft/iot/vmp/web/ApiDeviceController.java
@@ -1,4 +1,4 @@
package com.genersoft.iot.vmp.web;
package com.genersoft.iot.vmp.web.gb28181;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@@ -50,11 +50,9 @@
                            @RequestParam(required = false)String q,
                            @RequestParam(required = false)Boolean online ){
        if (logger.isDebugEnabled()) {
            logger.debug("查询所有视频设备API调用");
        }
        logger.debug("查询所有视频设备API调用");
//        if (logger.isDebugEnabled()) {
//            logger.debug("查询所有视频设备API调用");
//        }
        JSONObject result = new JSONObject();
        List<Device> devices;
        if (start == null || limit ==null) {
@@ -75,7 +73,7 @@
            deviceJsonObject.put("ChannelCount", device.getChannelCount());
            deviceJsonObject.put("RecvStreamIP", "");
            deviceJsonObject.put("CatalogInterval", 3600); // 通道目录抓取周期
            deviceJsonObject.put("SubscribeInterval", 0); // 订阅周期(秒), 0 表示后台不周期订阅
            deviceJsonObject.put("SubscribeInterval", device.getSubscribeCycleForCatalog()); // 订阅周期(秒), 0 表示后台不周期订阅
            deviceJsonObject.put("Online", device.getOnline() == 1);
            deviceJsonObject.put("Password", "");
            deviceJsonObject.put("MediaTransport", device.getTransport());
@@ -100,9 +98,9 @@
                                   @RequestParam(required = false)String q,
                                   @RequestParam(required = false)Boolean online ){
        if (logger.isDebugEnabled()) {
            logger.debug("查询所有视频设备API调用");
        }
//        if (logger.isDebugEnabled()) {
//            logger.debug("查询所有视频设备API调用");
//        }
        JSONObject result = new JSONObject();
        // 查询设备是否存在
        Device device = storager.queryVideoDevice(serial);