liusuyi
2026-02-10 4ac9edd4c0030d2daafd712cd14ef9080b2f1e43
ard-device/src/main/java/com/ard/device/channel/service/impl/ArdChannelServiceImpl.java
@@ -39,6 +39,7 @@
    private IArdVtduService ardVtduService;
    @Resource
    private MediamtxConfig mediamtxConfig;
    /**
     * 查询通道管理
     *
@@ -154,10 +155,10 @@
            ArdChannel ardChannel = new ArdChannel();
            ardChannel.setUseDataScope(false);
            List<ArdChannel> channels = this.selectArdChannelList(ardChannel);
            if (channels == null || channels.isEmpty()) {
                // log.warn("没有获取到通道数据,退出同步");
                return;
            }
//            if (channels == null || channels.isEmpty()) {
//                // log.warn("没有获取到通道数据,退出同步");
//                return;
//            }
            List<ArdVtdu> ardVtduList = ardVtduService.selectArdVtduList(new ArdVtdu());
            Set<String> validNames = channels.stream()
@@ -172,7 +173,8 @@
                        "rtsp://" + mediamtxConfig.getPlayHost() + ":" + mediamtxConfig.getRtspPort() + "/" + name;  //
                // 拼接 webrtcUrl
                String rtmpUrl =
                        "rtmp://" + mediamtxConfig.getPlayHost() + ":" + mediamtxConfig.getRtmpPort() + "/" + name;  // 拼接
                        "rtmp://" + mediamtxConfig.getPlayHost() + ":" + mediamtxConfig.getRtmpPort() + "/" + name;
                // 拼接
                // webrtcUrl
                String protocol = mediamtxConfig.isHttps() ? "https://" : "http://";
                String webrtcUrl =
@@ -233,7 +235,7 @@
    // 根据通道信息获取rtsp源地址
    private String getRtspSource(ArdChannel channel) {
        String rtspSource = "";
        ArdCamera ardCamera = redisCache.getCacheObject(CacheConstants.CAMERA_LIST_KEY + channel.getDeviceId());
        ArdCamera ardCamera = redisCache.getCacheMapValue(CacheConstants.CAMERA_LIST, channel.getDeviceId());
        if (ardCamera != null) {
            switch (ardCamera.getFactory()) {
                case "1":