调整上级观看消息的发送

This commit is contained in:
648540858
2024-05-29 15:02:51 +08:00
parent bec35ebf94
commit 764d04b497
11 changed files with 43 additions and 64 deletions

View File

@@ -13,7 +13,6 @@ import com.genersoft.iot.vmp.media.bean.MediaServer;
import com.genersoft.iot.vmp.media.service.IMediaServerService;
import com.genersoft.iot.vmp.service.IDeviceService;
import com.genersoft.iot.vmp.service.IPlayService;
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcService;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
@@ -108,19 +107,16 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
if (!userSetting.getServerId().equals(sendRtpItem.getServerId())) {
WVPResult wvpResult = redisRpcService.startSendRtp(sendRtpItem.getRedisKey(), sendRtpItem);
if (wvpResult.getCode() == 0) {
MessageForPushChannel messageForPushChannel = MessageForPushChannel.getInstance(0, sendRtpItem.getApp(), sendRtpItem.getStream(),
sendRtpItem.getChannelId(), parentPlatform.getServerGBId(), parentPlatform.getName(), userSetting.getServerId(),
sendRtpItem.getMediaServerId());
messageForPushChannel.setPlatFormIndex(parentPlatform.getId());
redisCatchStorage.sendPlatformStartPlayMsg(messageForPushChannel);
redisCatchStorage.sendPlatformStartPlayMsg(sendRtpItem, parentPlatform);
}
} else {
try {
if (sendRtpItem.isTcpActive()) {
mediaServerService.startSendRtpPassive(mediaInfo, parentPlatform, sendRtpItem, null);
mediaServerService.startSendRtpPassive(mediaInfo,sendRtpItem, null);
} else {
mediaServerService.startSendRtp(mediaInfo, parentPlatform, sendRtpItem);
mediaServerService.startSendRtp(mediaInfo, sendRtpItem);
}
redisCatchStorage.sendPlatformStartPlayMsg(sendRtpItem, parentPlatform);
}catch (ControllerException e) {
logger.error("RTP推流失败: {}", e.getMessage());
playService.startSendRtpStreamFailHand(sendRtpItem, parentPlatform, callIdHeader);
@@ -142,9 +138,9 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
}
try {
if (sendRtpItem.isTcpActive()) {
mediaServerService.startSendRtpPassive(mediaInfo, null, sendRtpItem, null);
mediaServerService.startSendRtpPassive(mediaInfo, sendRtpItem, null);
} else {
mediaServerService.startSendRtp(mediaInfo, null, sendRtpItem);
mediaServerService.startSendRtp(mediaInfo, sendRtpItem);
}
}catch (ControllerException e) {
logger.error("RTP推流失败: {}", e.getMessage());

View File

@@ -466,7 +466,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
if (sendRtpItem.isTcpActive()) {
MediaServer mediaServer = mediaServerService.getOne(sendRtpItem.getMediaServerId());
try {
mediaServerService.startSendRtpPassive(mediaServer, platform, sendRtpItem, 5);
mediaServerService.startSendRtpPassive(mediaServer, sendRtpItem, 5);
redisCatchStorage.sendPlatformStartPlayMsg(sendRtpItem, platform);
}catch (ControllerException e) {}
}
} catch (SipException | InvalidArgumentException | ParseException e) {

View File

@@ -152,7 +152,7 @@ public class BroadcastNotifyMessageHandler extends SIPRequestProcessorParent imp
}else {
// 发流
try {
mediaServerService.startSendRtp(hookData.getMediaServer(),null, sendRtpItem);
mediaServerService.startSendRtp(hookData.getMediaServer(), sendRtpItem);
}catch (ControllerException e) {
logger.info("[语音喊话] 推流失败, 结果: {}", e.getMessage());
return;