修复rtp暂停检查调用失败

pull/1270/head
648540858 2024-01-12 15:03:11 +08:00
parent e5a9dd24ef
commit 674ab18c02
2 changed files with 13 additions and 4 deletions

View File

@ -116,6 +116,9 @@ public class InviteStreamServiceImpl implements IInviteStreamService {
":" + (stream != null ? stream : "*")
+ ":*";
List<Object> scanResult = RedisUtil.scan(redisTemplate, key);
if (scanResult.isEmpty()) {
return null;
}
if (scanResult.size() != 1) {
logger.warn("[获取InviteInfo] 发现 key: {}存在多条", key);
}

View File

@ -955,8 +955,11 @@ public class PlayServiceImpl implements IPlayService {
}
// zlm 暂停RTP超时检查
// 使用zlm中的流ID
String ssrc = Long.toHexString(Long.parseLong(ssrcTransaction.getSsrc())).toUpperCase();
JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, ssrc);
String streamKey = inviteInfo.getStream();
if (!mediaServerItem.isRtpEnable()) {
streamKey = Long.toHexString(Long.parseLong(inviteInfo.getSsrcInfo().getSsrc())).toUpperCase();
}
JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, streamKey);
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
throw new ServiceException("暂停RTP接收失败");
}
@ -980,8 +983,11 @@ public class PlayServiceImpl implements IPlayService {
}
// zlm 暂停RTP超时检查
// 使用zlm中的流ID
String ssrc = Long.toHexString(Long.parseLong(ssrcTransaction.getSsrc())).toUpperCase();
JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, ssrc);
String streamKey = inviteInfo.getStream();
if (!mediaServerItem.isRtpEnable()) {
streamKey = Long.toHexString(Long.parseLong(inviteInfo.getSsrcInfo().getSsrc())).toUpperCase();
}
JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, streamKey);
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
throw new ServiceException("继续RTP接收失败");
}