From 72b437cc52e2907c9a66d6bda60acbffc736cdb8 Mon Sep 17 00:00:00 2001 From: BradyXu <brady_xu@outlook.com> Date: 星期日, 12 五月 2024 02:15:41 +0800 Subject: [PATCH] 修复当上级平台点播时,上级平台和下级平台局域网不通时,导致推流失败。推流目标IP地址改为配置的SDP发流IP,如果SDP发流IP存在的话。否则还是从连接中获取推流目标IP --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java old mode 100644 new mode 100755 index 6e5c42e..c910451 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java @@ -1,6 +1,5 @@ package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.cmd; -import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.gb28181.bean.AudioBroadcastCatch; import com.genersoft.iot.vmp.gb28181.bean.AudioBroadcastCatchStatus; @@ -53,16 +52,21 @@ @Override public void handForDevice(RequestEvent evt, Device device, Element rootElement) { - String channelId = getText(rootElement, "DeviceID"); SIPRequest request = (SIPRequest) evt.getRequest(); try { + String channelId = getText(rootElement, "DeviceID"); if (!audioBroadcastManager.exit(device.getDeviceId(), channelId)) { // 鍥炲410 responseAck((SIPRequest) evt.getRequest(), Response.GONE); return; } String result = getText(rootElement, "Result"); - logger.info("[璇煶骞挎挱]鍥炲锛歿}, {}/{}", result, device.getDeviceId(), channelId ); + Element infoElement = rootElement.element("Info"); + String reason = null; + if (infoElement != null) { + reason = getText(infoElement, "Reason"); + } + logger.info("[璇煶骞挎挱]鍥炲锛歿}, {}/{}", reason == null? result : result + ": " + reason, device.getDeviceId(), channelId ); // 鍥炲200 OK responseAck(request, Response.OK); @@ -70,12 +74,6 @@ AudioBroadcastCatch audioBroadcastCatch = audioBroadcastManager.get(device.getDeviceId(), channelId); audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.WaiteInvite); audioBroadcastManager.update(audioBroadcastCatch); - // 绛夊緟invite娑堟伅锛� 瓒呮椂鍒欑粨鏉� - String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId() + channelId; - dynamicTask.startDelay(key, ()->{ - logger.info("[璇煶骞挎挱]绛夊緟invite娑堟伅瓒呮椂锛歿}/{}", device.getDeviceId(), channelId); - playService.stopAudioBroadcast(device.getDeviceId(), channelId); - }, 2000); }else { playService.stopAudioBroadcast(device.getDeviceId(), channelId); } -- Gitblit v1.8.0