优化国标级联点播逻辑

This commit is contained in:
648540858
2024-08-13 17:57:25 +08:00
parent 213b218efa
commit ad240ba9a4
7 changed files with 490 additions and 385 deletions

View File

@@ -7,6 +7,7 @@ import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.conf.MediaConfig;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.gb28181.bean.PlayException;
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
import com.genersoft.iot.vmp.media.bean.MediaInfo;
@@ -878,8 +879,8 @@ public class MediaServerServiceImpl implements IMediaServerService {
String app, String stream, String channelId, boolean tcp, boolean rtcp){
int localPort = sendRtpPortManager.getNextPort(serverItem);
if (localPort == 0) {
return null;
if (localPort <= 0) {
throw new PlayException(javax.sip.message.Response.SERVER_INTERNAL_ERROR, "server internal error");
}
SendRtpItem sendRtpItem = new SendRtpItem();
sendRtpItem.setIp(ip);