| | |
| | | private IArdVtduService ardVtduService; |
| | | @Resource |
| | | private MediamtxConfig mediamtxConfig; |
| | | |
| | | /** |
| | | * 查询通道管理 |
| | | * |
| | |
| | | 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() |
| | |
| | | "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 = |
| | |
| | | // 根据通道信息获取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": |