合并分支
parent
6bd3a187a0
commit
5e359b64d6
|
@ -108,10 +108,11 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
|
|||
if (!userSetting.getServerId().equals(sendRtpItem.getServerId())) {
|
||||
WVPResult wvpResult = redisRpcService.startSendRtp(sendRtpItem.getRedisKey(), sendRtpItem);
|
||||
if (wvpResult.getCode() == 0) {
|
||||
RequestPushStreamMsg requestPushStreamMsg = RequestPushStreamMsg.getInstance(sendRtpItem);
|
||||
redisGbPlayMsgListener.sendMsgForStartSendRtpStream(sendRtpItem.getServerId(), requestPushStreamMsg, () -> {
|
||||
playService.startSendRtpStreamFailHand(sendRtpItem, parentPlatform, callIdHeader);
|
||||
});
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
|
|
|
@ -27,16 +27,11 @@ import com.genersoft.iot.vmp.media.event.hook.HookType;
|
|||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
||||
import com.genersoft.iot.vmp.service.IInviteStreamService;
|
||||
import com.genersoft.iot.vmp.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.service.IStreamProxyService;
|
||||
import com.genersoft.iot.vmp.service.IStreamPushService;
|
||||
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
|
||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcService;
|
||||
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.*;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
||||
import com.genersoft.iot.vmp.service.*;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
||||
|
@ -598,8 +593,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
sendRtpItem.setServerId(pushListItem.getServerId());
|
||||
sendRtpItem.setMediaServerId(pushListItem.getMediaServerId());
|
||||
|
||||
StreamPushItem transform = streamPushService.transform(pushListItem);
|
||||
transform.setSelf(userSetting.getServerId().equals(pushListItem.getServerId()));
|
||||
pushListItem.setSelf(userSetting.getServerId().equals(pushListItem.getServerId()));
|
||||
redisCatchStorage.updateSendRTPSever(sendRtpItem);
|
||||
// 开始推流
|
||||
sendPushStream(sendRtpItem, mediaServerItem, platform, request);
|
||||
|
@ -677,7 +671,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
sendRtpItem.setStatus(1);
|
||||
sendRtpItem.setLocalIp(mediaServerItem.getSdpIp());
|
||||
|
||||
SIPResponse response = sendStreamAck(mediaServerItem, request, sendRtpItem, platform);
|
||||
SIPResponse response = sendStreamAck(request, sendRtpItem, platform);
|
||||
if (response != null) {
|
||||
sendRtpItem.setToTag(response.getToTag());
|
||||
}
|
||||
|
@ -703,7 +697,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
}
|
||||
// 写入redis, 超时时回复
|
||||
sendRtpItem.setStatus(1);
|
||||
SIPResponse response = sendStreamAck(mediaServerItem, request, sendRtpItem, platform);
|
||||
SIPResponse response = sendStreamAck(request, sendRtpItem, platform);
|
||||
if (response != null) {
|
||||
sendRtpItem.setToTag(response.getToTag());
|
||||
}
|
||||
|
@ -859,7 +853,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
redisCatchStorage.updateSendRTPSever(sendRtpItem);
|
||||
}
|
||||
|
||||
public SIPResponse sendStreamAck(MediaServer mediaServerItem, SIPRequest request, SendRtpItem sendRtpItem, ParentPlatform platform) {
|
||||
public SIPResponse sendStreamAck(SIPRequest request, SendRtpItem sendRtpItem, ParentPlatform platform) {
|
||||
|
||||
String sdpIp = sendRtpItem.getLocalIp();
|
||||
if (!ObjectUtils.isEmpty(platform.getSendStreamIp())) {
|
||||
|
@ -1005,7 +999,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
logger.info("设备{}请求语音流,地址:{}:{},ssrc:{}, {}", requesterId, addressStr, port, gb28181Sdp.getSsrc(),
|
||||
mediaTransmissionTCP ? (tcpActive ? "TCP主动" : "TCP被动") : "UDP");
|
||||
|
||||
MediaServer mediaServerItem = broadcastCatch.getMediaServer();
|
||||
MediaServer mediaServerItem = broadcastCatch.getMediaServerItem();
|
||||
if (mediaServerItem == null) {
|
||||
logger.warn("未找到语音喊话使用的zlm");
|
||||
try {
|
||||
|
|
|
@ -1413,12 +1413,7 @@ public class PlayServiceImpl implements IPlayService {
|
|||
// 开始发流
|
||||
MediaServer mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
|
||||
|
||||
if (mediaInfo == null) {
|
||||
RequestPushStreamMsg requestPushStreamMsg = RequestPushStreamMsg.getInstance(sendRtpItem);
|
||||
redisGbPlayMsgListener.sendMsgForStartSendRtpStream(sendRtpItem.getServerId(), requestPushStreamMsg, () -> {
|
||||
startSendRtpStreamFailHand(sendRtpItem, platform, callIdHeader);
|
||||
});
|
||||
} else {
|
||||
if (mediaInfo != null) {
|
||||
try {
|
||||
if (sendRtpItem.isTcpActive()) {
|
||||
mediaServerService.startSendRtpPassive(mediaInfo, platform, sendRtpItem, null);
|
||||
|
|
|
@ -8,10 +8,7 @@ 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.SendRtpItem;
|
||||
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
|
||||
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeFactory;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForStreamChange;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.HookParam;
|
||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcService;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
|
@ -34,7 +31,7 @@ public class RedisRpcServiceImpl implements IRedisRpcService {
|
|||
private UserSetting userSetting;
|
||||
|
||||
@Autowired
|
||||
private ZlmHttpHookSubscribe hookSubscribe;
|
||||
private HookSubscribe hookSubscribe;
|
||||
|
||||
@Autowired
|
||||
private SSRCFactory ssrcFactory;
|
||||
|
|
Loading…
Reference in New Issue