| | |
| | | |
| | | @Override |
| | | public MediaServer getNewMediaServerItem(Device device) { |
| | | logger.error(device.getMediaServerId(), "wocnm"); |
| | | if (device == null) { |
| | | return null; |
| | | } |
| | | MediaServer mediaServerItem; |
| | | if (ObjectUtils.isEmpty(device.getMediaServerId()) || "auto".equals(device.getMediaServerId())) { |
| | | logger.error("进的这"); |
| | | mediaServerItem = mediaServerService.getMediaServerForMinimumLoad(null); |
| | | } else { |
| | | logger.error("进的else"); |
| | | mediaServerItem = mediaServerService.getOne(device.getMediaServerId()); |
| | | } |
| | | if (mediaServerItem == null) { |
| | |
| | | } |
| | | |
| | | MediaServer newMediaServerItem = getNewMediaServerItem(device); |
| | | if (device.getStreamMode().equalsIgnoreCase("TCP-ACTIVE") && ! newMediaServerItem.isRtpEnable()) { |
| | | if ("TCP-ACTIVE".equalsIgnoreCase(device.getStreamMode()) && ! newMediaServerItem.isRtpEnable()) { |
| | | logger.warn("[录像回放] 单端口收流时不支持TCP主动方式收流 deviceId: {},channelId:{}", deviceId, channelId); |
| | | throw new ControllerException(ErrorCode.ERROR100.getCode(), "单端口收流时不支持TCP主动方式收流"); |
| | | } |
| | |
| | | MediaServer mediaServerItem = mediaServerService.getOne(mediaServerId); |
| | | if (mediaServerItem == null) { |
| | | logger.warn("[获取下载进度] 查询录像信息时发现节点不存在"); |
| | | return null; |
| | | } |
| | | SsrcTransaction ssrcTransaction = streamSession.getSsrcTransaction(deviceId, channelId, null, stream); |
| | | |
| | | if (ssrcTransaction == null) { |
| | | logger.warn("[获取下载进度] 下载已结束"); |
| | | return null; |
| | | } |
| | | String app = "rtp"; |