临时提交

This commit is contained in:
panlinlin
2024-08-10 23:27:21 +08:00
parent d8d9f76d89
commit 76a0d248ef
65 changed files with 421 additions and 601 deletions

View File

@@ -234,7 +234,7 @@ public class MediaServiceImpl implements IMediaService {
inviteInfo.getChannelId());
if (!sendRtpItems.isEmpty()) {
for (SendRtpItem sendRtpItem : sendRtpItems) {
ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
Platform parentPlatform = storager.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
try {
commanderForPlatform.streamByeCmd(parentPlatform, sendRtpItem.getCallId());
} catch (SipException | InvalidArgumentException | ParseException e) {

View File

@@ -5,7 +5,7 @@ import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.gb28181.bean.AlarmChannelMessage;
import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.bean.Platform;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
import com.genersoft.iot.vmp.gb28181.service.IDeviceChannelService;
@@ -89,9 +89,9 @@ public class RedisAlarmMsgListener implements MessageListener {
if (ObjectUtils.isEmpty(gbId)) {
if (userSetting.getSendToPlatformsWhenIdLost()) {
// 发送给所有的上级
List<ParentPlatform> parentPlatforms = storage.queryEnableParentPlatformList(true);
List<Platform> parentPlatforms = storage.queryEnableParentPlatformList(true);
if (parentPlatforms.size() > 0) {
for (ParentPlatform parentPlatform : parentPlatforms) {
for (Platform parentPlatform : parentPlatforms) {
try {
deviceAlarm.setChannelId(parentPlatform.getDeviceGBId());
commanderForPlatform.sendAlarmMessage(parentPlatform, deviceAlarm);
@@ -102,9 +102,9 @@ public class RedisAlarmMsgListener implements MessageListener {
}
}else {
// 获取开启了消息推送的设备和平台
List<ParentPlatform> parentPlatforms = storage.queryEnablePlatformListWithAsMessageChannel();
List<Platform> parentPlatforms = storage.queryEnablePlatformListWithAsMessageChannel();
if (parentPlatforms.size() > 0) {
for (ParentPlatform parentPlatform : parentPlatforms) {
for (Platform parentPlatform : parentPlatforms) {
try {
deviceAlarm.setChannelId(parentPlatform.getDeviceGBId());
commanderForPlatform.sendAlarmMessage(parentPlatform, deviceAlarm);
@@ -130,7 +130,7 @@ public class RedisAlarmMsgListener implements MessageListener {
}else {
Device device = deviceService.getDevice(gbId);
ParentPlatform platform = storage.queryParentPlatByServerGBId(gbId);
Platform platform = storage.queryParentPlatByServerGBId(gbId);
if (device != null && platform == null) {
try {
commander.sendAlarmMessage(device, deviceAlarm);

View File

@@ -8,7 +8,7 @@ import com.genersoft.iot.vmp.conf.redis.RedisRpcConfig;
import com.genersoft.iot.vmp.conf.redis.bean.RedisRpcMessage;
import com.genersoft.iot.vmp.conf.redis.bean.RedisRpcRequest;
import com.genersoft.iot.vmp.conf.redis.bean.RedisRpcResponse;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.bean.Platform;
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
@@ -318,7 +318,7 @@ public class RedisRpcController {
}
log.info("[redis-rpc] 推流已经停止: {}/{}, 目标地址: {}{}", sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getIp(), sendRtpItem.getPort() );
String platformId = sendRtpItem.getPlatformId();
ParentPlatform platform = storager.queryParentPlatByServerGBId(platformId);
Platform platform = storager.queryParentPlatByServerGBId(platformId);
if (platform == null) {
return response;
}