限制单个设备/通道 回放数
This commit is contained in:
parent
f88ff28dc4
commit
e3d28ae139
@ -480,6 +480,17 @@ public class PlayServiceImpl implements IPlayService {
|
||||
if (device == null) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "设备: " + deviceId + "不存在");
|
||||
}
|
||||
// 限制同时只能存在一个回放流, 如果已有回放流就关闭
|
||||
InviteInfo oldInviteInfo = inviteStreamService.getInviteInfoByDeviceAndChannel(InviteSessionType.PLAYBACK, device.getDeviceId(), channelId);
|
||||
try {
|
||||
if(oldInviteInfo != null){
|
||||
logger.info("已存在回放流, 关闭已有回放流 {}", oldInviteInfo);
|
||||
inviteStreamService.removeInviteInfo(oldInviteInfo);
|
||||
cmder.streamByeCmd(device, oldInviteInfo.getChannelId(),
|
||||
oldInviteInfo.getStream(), null);
|
||||
}
|
||||
} catch (Exception ignore) {}
|
||||
|
||||
logger.info("[录像回放] deviceId: {}, channelId: {}, 开始时间: {}, 结束时间: {}, 收流端口:{}, 收流模式:{}, SSRC: {}, SSRC校验:{}",
|
||||
device.getDeviceId(), channelId, startTime, endTime, ssrcInfo.getPort(), device.getStreamMode(),
|
||||
ssrcInfo.getSsrc(), device.isSsrcCheck());
|
||||
|
Loading…
Reference in New Issue
Block a user