| | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.notify.NotifyMessageHandler; |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam; |
| | | import com.genersoft.iot.vmp.service.IDeviceService; |
| | |
| | | private AudioBroadcastManager audioBroadcastManager; |
| | | |
| | | @Autowired |
| | | private ZLMRTPServerFactory zlmrtpServerFactory; |
| | | private ZLMServerFactory zlmServerFactory; |
| | | |
| | | @Autowired |
| | | private IRedisCatchStorage redisCatchStorage; |
| | |
| | | logger.info("[国标级联] 语音喊话 设备正在使用中 platform: {}, channel: {}", |
| | | platform.getServerGBId(), deviceChannel.getChannelId()); |
| | | // 查看语音通道已经建立且已经占用 回复BYE |
| | | try { |
| | | platformService.stopBroadcast(platform, deviceChannel.getChannelId(), streamChangedHookParam.getStream()); |
| | | } catch (InvalidArgumentException | ParseException | SsrcTransactionNotFoundException | |
| | | SipException e) { |
| | | logger.info("[消息发送失败] 国标级联 语音喊话 platform: {}, channel: {}", platform.getServerGBId(), deviceChannel.getChannelId()); |
| | | } |
| | | platformService.stopBroadcast(platform, deviceChannel, streamChangedHookParam.getStream(), true, mediaServerItem); |
| | | }else { |
| | | // 查看语音通道已经建立但是未占用 |
| | | broadcastCatch.setApp(streamChangedHookParam.getApp()); |
| | |
| | | } |
| | | }else { |
| | | // 发流 |
| | | JSONObject jsonObject = zlmrtpServerFactory.startSendRtp(mediaServerItem, sendRtpItem); |
| | | JSONObject jsonObject = zlmServerFactory.startSendRtp(mediaServerItem, sendRtpItem); |
| | | if (jsonObject != null && jsonObject.getInteger("code") == 0 ) { |
| | | logger.info("[语音喊话] 自动推流成功, device: {}, channel: {}", device.getDeviceId(), targetId); |
| | | }else { |