修复并发点播时可能出现的rtpServer开启但是还未收到流的情况,编码类型136,137,138默认开启音频通道

This commit is contained in:
648540858
2022-09-07 16:18:35 +08:00
parent e7bdcc1f8d
commit ec0ec5eb54
11 changed files with 85 additions and 33 deletions

View File

@@ -203,6 +203,12 @@ public class XmlUtil {
return null;
}
deviceChannel.setChannelId(channelId);
int channelTypeCode = Integer.parseInt(channelId.substring(10, 13));
if (channelTypeCode == 136 || channelTypeCode == 137 || channelTypeCode == 138) {
deviceChannel.setHasAudio(true);
}else {
deviceChannel.setHasAudio(false);
}
if (event != null && !event.equals(CatalogEvent.ADD) && !event.equals(CatalogEvent.UPDATE)) {
// 除了ADD和update情况下需要识别全部内容
return deviceChannel;
@@ -396,7 +402,6 @@ public class XmlUtil {
} else {
deviceChannel.setPTZType(Integer.parseInt(XmlUtil.getText(itemDevice, "PTZType")));
}
deviceChannel.setHasAudio(true); // 默认含有音频播放时再检查是否有音频及是否AAC
return deviceChannel;
}
}