修复上级播放后未发送redis通知的BUG

This commit is contained in:
lin
2025-11-08 21:55:38 +08:00
parent 869953b08d
commit b2f9492cc8
4 changed files with 28 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
import com.genersoft.iot.vmp.media.bean.MediaServer;
import com.genersoft.iot.vmp.service.bean.RequestPushStreamMsg;
import lombok.Data;
@@ -236,4 +237,13 @@ public class SendRtpInfo {
}
public void setPlayTypeByChannelDataType(Integer dataType, String sessionName) {
if (dataType == ChannelDataType.STREAM_PUSH) {
this.setPlayType(InviteStreamType.PUSH);
}else if (dataType == ChannelDataType.STREAM_PROXY){
this.setPlayType(InviteStreamType.PROXY);
}else {
this.setPlayType("Play".equalsIgnoreCase(sessionName) ? InviteStreamType.PLAY : InviteStreamType.PLAYBACK);
}
}
}

View File

@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl;
import com.genersoft.iot.vmp.common.InviteSessionType;
import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.conf.UserSetting;
@@ -190,7 +191,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
}
sendRtpItem.setStatus(1);
sendRtpItem.setCallId(inviteInfo.getCallId());
sendRtpItem.setPlayType("Play".equalsIgnoreCase(inviteInfo.getSessionName()) ? InviteStreamType.PLAY : InviteStreamType.PLAYBACK);
sendRtpItem.setPlayTypeByChannelDataType(channel.getDataType(), inviteInfo.getSessionName());
sendRtpItem.setServerId(streamInfo.getServerId());
sendRtpServerService.update(sendRtpItem);
String sdpIp = streamInfo.getMediaServer().getSdpIp();