临时提交
This commit is contained in:
@@ -6,16 +6,16 @@ import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Platform;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcService;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
@@ -50,6 +50,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
|
||||
|
||||
@Autowired
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Autowired
|
||||
private IRedisRpcService redisRpcService;
|
||||
|
||||
@@ -57,7 +58,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
|
||||
private UserSetting userSetting;
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorage storager;
|
||||
private IPlatformService platformService;
|
||||
|
||||
@Autowired
|
||||
private IDeviceService deviceService;
|
||||
@@ -100,7 +101,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
|
||||
sendRtpItem.getSsrc(),
|
||||
sendRtpItem.isTcp()?(sendRtpItem.isTcpActive()?"TCP主动":"TCP被动"):"UDP"
|
||||
);
|
||||
Platform parentPlatform = storager.queryParentPlatByServerGBId(fromUserId);
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(fromUserId);
|
||||
|
||||
if (parentPlatform != null) {
|
||||
if (!userSetting.getServerId().equals(sendRtpItem.getServerId())) {
|
||||
|
||||
@@ -11,12 +11,12 @@ import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelPlayService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.gb28181.session.AudioBroadcastManager;
|
||||
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
|
||||
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPSender;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||
@@ -104,7 +104,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||
private IPlayService playService;
|
||||
|
||||
@Autowired
|
||||
private SIPSender sipSender;
|
||||
private IPlatformService platformService;
|
||||
|
||||
@Autowired
|
||||
private AudioBroadcastManager audioBroadcastManager;
|
||||
@@ -153,7 +153,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||
InviteInfo inviteInfo = decode(evt);
|
||||
|
||||
// 查询请求是否来自上级平台\设备
|
||||
Platform platform = storager.queryParentPlatByServerGBId(inviteInfo.getRequesterId());
|
||||
Platform platform = platformService.queryPlatformByServerGBId(inviteInfo.getRequesterId());
|
||||
if (platform == null) {
|
||||
inviteFromDeviceHandle(request, inviteInfo.getRequesterId(), inviteInfo.getChannelId());
|
||||
} else {
|
||||
@@ -266,7 +266,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||
//
|
||||
//
|
||||
// // 查询请求是否来自上级平台\设备
|
||||
// Platform platform = storager.queryParentPlatByServerGBId(requesterId);
|
||||
// Platform platform = platformService.queryPlatformByServerGBId(requesterId);
|
||||
//
|
||||
// if (platform == null) {
|
||||
// inviteFromDeviceHandle(request, requesterId, channelId);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
||||
}
|
||||
String platformId = SipUtils.getUserIdFromFromHeader(request);
|
||||
String deviceId = XmlUtil.getText(rootElement, "DeviceID");
|
||||
Platform platform = storager.queryParentPlatByServerGBId(platformId);
|
||||
Platform platform = platformService.queryPlatformByServerGBId(platformId);
|
||||
SubscribeInfo subscribeInfo = new SubscribeInfo(request, platformId);
|
||||
if (platform == null) {
|
||||
return;
|
||||
@@ -137,7 +137,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
||||
}
|
||||
|
||||
try {
|
||||
Platform parentPlatform = storager.queryParentPlatByServerGBId(platformId);
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(platformId);
|
||||
SIPResponse response = responseXmlAck(request, resultXml.toString(), parentPlatform, subscribeInfo.getExpires());
|
||||
if (subscribeInfo.getExpires() == 0) {
|
||||
subscribeHolder.removeMobilePositionSubscribe(platformId);
|
||||
@@ -163,7 +163,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
||||
}
|
||||
String platformId = SipUtils.getUserIdFromFromHeader(request);
|
||||
String deviceId = XmlUtil.getText(rootElement, "DeviceID");
|
||||
Platform platform = storager.queryParentPlatByServerGBId(platformId);
|
||||
Platform platform = platformService.queryPlatformByServerGBId(platformId);
|
||||
if (platform == null){
|
||||
return;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
||||
subscribeHolder.removeCatalogSubscribe(platformId);
|
||||
}
|
||||
try {
|
||||
Platform parentPlatform = storager.queryParentPlatByServerGBId(platformId);
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(platformId);
|
||||
SIPResponse response = responseXmlAck(request, resultXml.toString(), parentPlatform, subscribeInfo.getExpires());
|
||||
if (subscribeInfo.getExpires() == 0) {
|
||||
subscribeHolder.removeCatalogSubscribe(platformId);
|
||||
|
||||
@@ -4,15 +4,15 @@ import com.genersoft.iot.vmp.common.InviteInfo;
|
||||
import com.genersoft.iot.vmp.common.InviteSessionType;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IInviteStreamService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformService;
|
||||
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IInviteStreamService;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import gov.nist.javax.sip.message.SIPRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
@@ -40,7 +40,7 @@ public class InfoRequestProcessor extends SIPRequestProcessorParent implements I
|
||||
private SIPProcessorObserver sipProcessorObserver;
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorage storage;
|
||||
private IPlatformService platformService;
|
||||
|
||||
@Autowired
|
||||
private SipSubscribe sipSubscribe;
|
||||
@@ -77,7 +77,7 @@ public class InfoRequestProcessor extends SIPRequestProcessorParent implements I
|
||||
// 查询设备是否存在
|
||||
Device device = redisCatchStorage.getDevice(ssrcTransaction.getDeviceId());
|
||||
// 查询上级平台是否存在
|
||||
Platform parentPlatform = storage.queryParentPlatByServerGBId(ssrcTransaction.getDeviceId());
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(ssrcTransaction.getDeviceId());
|
||||
try {
|
||||
if (device != null && parentPlatform != null) {
|
||||
log.warn("[重复]平台与设备编号重复:{}", ssrcTransaction.getDeviceId());
|
||||
|
||||
@@ -2,9 +2,9 @@ package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Platform;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformService;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd.CatalogQueryMessageHandler;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import gov.nist.javax.sip.message.SIPRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dom4j.Element;
|
||||
@@ -26,7 +26,7 @@ public abstract class MessageHandlerAbstract extends SIPRequestProcessorParent i
|
||||
public Map<String, IMessageHandler> messageHandlerMap = new ConcurrentHashMap<>();
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorage storage;
|
||||
private IPlatformService platformService;
|
||||
|
||||
public void addHandler(String cmdType, IMessageHandler messageHandler) {
|
||||
messageHandlerMap.put(cmdType, messageHandler);
|
||||
@@ -49,7 +49,7 @@ public abstract class MessageHandlerAbstract extends SIPRequestProcessorParent i
|
||||
//两个国标平台互相级联时由于上一步判断导致本该在平台处理的消息 放到了设备的处理逻辑
|
||||
//所以对目录查询单独做了校验
|
||||
if(messageHandler instanceof CatalogQueryMessageHandler){
|
||||
Platform parentPlatform = storage.queryParentPlatByServerGBId(device.getDeviceId());
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(device.getDeviceId());
|
||||
messageHandler.handForPlatform(evt, parentPlatform, element);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ import com.genersoft.iot.vmp.gb28181.bean.DeviceNotFoundEvent;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Platform;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction;
|
||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformService;
|
||||
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import gov.nist.javax.sip.message.SIPRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dom4j.DocumentException;
|
||||
@@ -41,7 +41,7 @@ public class MessageRequestProcessor extends SIPRequestProcessorParent implement
|
||||
private SIPProcessorObserver sipProcessorObserver;
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorage storage;
|
||||
private IPlatformService platformService;
|
||||
|
||||
@Autowired
|
||||
private SipSubscribe sipSubscribe;
|
||||
@@ -78,7 +78,7 @@ public class MessageRequestProcessor extends SIPRequestProcessorParent implement
|
||||
// 查询设备是否存在
|
||||
Device device = redisCatchStorage.getDevice(deviceId);
|
||||
// 查询上级平台是否存在
|
||||
Platform parentPlatform = storage.queryParentPlatByServerGBId(deviceId);
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(deviceId);
|
||||
try {
|
||||
if (device != null && parentPlatform != null) {
|
||||
String hostAddress = request.getRemoteAddress().getHostAddress();
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Platform;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IInviteStreamService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformService;
|
||||
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
||||
@@ -16,9 +18,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.notify.
|
||||
import com.genersoft.iot.vmp.media.event.hook.Hook;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookType;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IInviteStreamService;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import gov.nist.javax.sip.message.SIPRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dom4j.Element;
|
||||
@@ -57,10 +57,7 @@ public class MediaStatusNotifyMessageHandler extends SIPRequestProcessorParent i
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorage storage;
|
||||
|
||||
@Autowired
|
||||
private VideoStreamSessionManager sessionManager;
|
||||
private IPlatformService platformService;
|
||||
|
||||
@Autowired
|
||||
private HookSubscribe subscribe;
|
||||
@@ -110,7 +107,7 @@ public class MediaStatusNotifyMessageHandler extends SIPRequestProcessorParent i
|
||||
// 如果级联播放,需要给上级发送此通知 TODO 多个上级同时观看一个下级 可能存在停错的问题,需要将点播CallId进行上下级绑定
|
||||
SendRtpItem sendRtpItem = redisCatchStorage.querySendRTPServer(null, ssrcTransaction.getChannelId(), null, null);
|
||||
if (sendRtpItem != null) {
|
||||
Platform parentPlatform = storage.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(sendRtpItem.getPlatformId());
|
||||
if (parentPlatform == null) {
|
||||
log.warn("[级联消息发送]:发送MediaStatus发现上级平台{}不存在", sendRtpItem.getPlatformId());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user