优化日志

结构优化
648540858 2024-01-03 15:12:04 +08:00
parent 96a16e94e0
commit 37fcc77c26
2 changed files with 6 additions and 5 deletions

View File

@ -956,6 +956,7 @@ public class PlayServiceImpl implements IPlayService {
// zlm 暂停RTP超时检查
JSONObject jsonObject = zlmresTfulUtils.pauseRtpCheck(mediaServerItem, streamId);
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
logger.warn("[暂停流] 暂停RTP接收失败 {}", jsonObject );
throw new ServiceException("暂停RTP接收失败");
}
Device device = storager.queryVideoDevice(inviteInfo.getDeviceId());
@ -976,9 +977,11 @@ public class PlayServiceImpl implements IPlayService {
logger.warn("mediaServer 不存在!");
throw new ServiceException("mediaServer不存在");
}
// zlm 暂停RTP超时检查
JSONObject jsonObject = zlmresTfulUtils.resumeRtpCheck(mediaServerItem, streamId);
if (jsonObject == null || jsonObject.getInteger("code") != 0) {
logger.info("[暂停RTP超时检查] 失败:" + jsonObject);
throw new ServiceException("继续RTP接收失败");
}
Device device = storager.queryVideoDevice(inviteInfo.getDeviceId());

View File

@ -145,9 +145,9 @@ public class PlaybackController {
}
try {
cmder.streamByeCmd(device, channelId, stream, null);
} catch (InvalidArgumentException | ParseException | SipException | SsrcTransactionNotFoundException e) {
} catch (InvalidArgumentException | ParseException | SipException e) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), "发送bye失败 " + e.getMessage());
}
} catch (SsrcTransactionNotFoundException ignored) {}
}
@ -159,9 +159,7 @@ public class PlaybackController {
try {
playService.pauseRtp(streamId);
} catch (ServiceException e) {
throw new ControllerException(ErrorCode.ERROR400.getCode(), e.getMessage());
} catch (InvalidArgumentException | ParseException | SipException e) {
}catch (ServiceException | InvalidArgumentException | ParseException | SipException e) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), e.getMessage());
}
}