| | |
| | | if (streamReady) { |
| | | logger.warn("[语音对讲] 进行中: {}", channelId); |
| | | event.call("语音对讲进行中"); |
| | | return; |
| | | return false; |
| | | } else { |
| | | stopTalk(device, channelId); |
| | | } |
| | |
| | | if (sendRtpItem != null && sendRtpItem.isOnlyAudio()) { |
| | | // 查询流是否存在,不存在则认为是异常状态 |
| | | MediaServerItem mediaServerServiceOne = mediaServerService.getOne(sendRtpItem.getMediaServerId()); |
| | | Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerServiceOne, sendRtpItem.getApp(), sendRtpItem.getStreamId()); |
| | | Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerServiceOne, sendRtpItem.getApp(), sendRtpItem.getStream()); |
| | | if (streamReady) { |
| | | logger.warn("语音广播通道使用中: {}", channelId); |
| | | return true; |
| | |
| | | |
| | | @Override |
| | | public void stopAudioBroadcast(String deviceId, String channelId) { |
| | | logger.info("[停止对讲] 设备:{}, 通道:{}", deviceId, channelId); |
| | | List<AudioBroadcastCatch> audioBroadcastCatchList = new ArrayList<>(); |
| | | if (channelId == null) { |
| | | audioBroadcastCatchList.addAll(audioBroadcastManager.get(deviceId)); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void zlmServerOnline(String mediaServerId) { |
| | |
| | | |
| | | String is_Udp = sendRtpItem.isTcp() ? "0" : "1"; |
| | | MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId()); |
| | | logger.info("收到ACK,rtp/{}开始向上级推流, 目标={}:{},SSRC={}, RTCP={}", sendRtpItem.getStream(), |
| | | logger.info("收到ACK,rtp/{}开始推流, 目标={}:{},SSRC={}, RTCP={}", sendRtpItem.getStream(), |
| | | sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc(), sendRtpItem.isRtcp()); |
| | | Map<String, Object> param = new HashMap<>(12); |
| | | param.put("vhost", "__defaultVhost__"); |