尝试 添加其他 各种 子码流 参数

This commit is contained in:
zxb 2024-01-03 10:13:55 +08:00
parent 6ee9f00bcd
commit 0c0ee3e7d9
2 changed files with 5 additions and 5 deletions

View File

@ -354,6 +354,9 @@ public class SIPCommander implements ISIPCommander {
}else { }else {
if (device.isSwitchPrimarySubStream()){ if (device.isSwitchPrimarySubStream()){
content.append("a=streamprofile:1\r\n"); content.append("a=streamprofile:1\r\n");
content.append("a=stream:1\r\n");
content.append("a=stream:SUB\r\n");
content.append("a=streamnumber:1\r\n");
}else { }else {
content.append("a=streamprofile:0\r\n"); content.append("a=streamprofile:0\r\n");
} }

View File

@ -136,10 +136,7 @@ public class DeviceServiceImpl implements IDeviceService {
} }
sync(device); sync(device);
}else { }else {
device.setSwitchPrimarySubStream(deviceInDb.isSwitchPrimarySubStream());
if (deviceInDb != null) {
device.setSwitchPrimarySubStream(deviceInDb.isSwitchPrimarySubStream());
}
if(!device.isOnLine()){ if(!device.isOnLine()){
device.setOnLine(true); device.setOnLine(true);
device.setCreateTime(now); device.setCreateTime(now);
@ -156,7 +153,7 @@ public class DeviceServiceImpl implements IDeviceService {
// TODO 如果设备下的通道级联到了其他平台那么需要发送事件或者notify给上级平台 // TODO 如果设备下的通道级联到了其他平台那么需要发送事件或者notify给上级平台
} }
}else { }else {
if (deviceChannelMapper.queryAllChannels(device.getDeviceId()).size() == 0) { if (deviceChannelMapper.queryAllChannels(device.getDeviceId()).isEmpty()) {
logger.info("[设备上线]: {}通道数为0,查询通道信息", device.getDeviceId()); logger.info("[设备上线]: {}通道数为0,查询通道信息", device.getDeviceId());
sync(device); sync(device);
} }