fix:调整对讲支持项判断逻辑
This commit is contained in:
parent
90f94e1a9a
commit
e2f8400ddc
@ -59,8 +59,11 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
|
|||||||
// 收到对讲请求的应答
|
// 收到对讲请求的应答
|
||||||
startChartManage.FromPeerId = scpMessage.ToPeerId!;
|
startChartManage.FromPeerId = scpMessage.ToPeerId!;
|
||||||
startChartManage.ToPeerId = scpMessage.FromPeerId!;
|
startChartManage.ToPeerId = scpMessage.FromPeerId!;
|
||||||
|
startChartManage.lockPeerId = scpMessage.FromPeerId!;
|
||||||
// 处理预期数据格式
|
// 处理预期数据格式
|
||||||
_handleResponseSendExpect();
|
_handleResponseSendExpect(
|
||||||
|
lockPeerID: scpMessage.FromPeerId!,
|
||||||
|
);
|
||||||
// 发送预期数据
|
// 发送预期数据
|
||||||
startChartManage.startTalkExpectTimer();
|
startChartManage.startTalkExpectTimer();
|
||||||
// 停止发送对讲请求
|
// 停止发送对讲请求
|
||||||
@ -247,12 +250,33 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// app主动发请求,收到回复后发送的预期数据
|
/// app主动发请求,收到回复后发送的预期数据
|
||||||
void _handleResponseSendExpect() {
|
void _handleResponseSendExpect({
|
||||||
|
required String lockPeerID,
|
||||||
|
}) async {
|
||||||
final LockListInfoItemEntity currentKeyInfo =
|
final LockListInfoItemEntity currentKeyInfo =
|
||||||
CommonDataManage().currentKeyInfo;
|
CommonDataManage().currentKeyInfo;
|
||||||
final isH264 = currentKeyInfo.lockFeature?.isH264 == 1;
|
|
||||||
final isMJpeg = currentKeyInfo.lockFeature?.isMJpeg == 1;
|
|
||||||
|
|
||||||
|
var isH264 = currentKeyInfo.lockFeature?.isH264 == 1;
|
||||||
|
var isMJpeg = currentKeyInfo.lockFeature?.isMJpeg == 1;
|
||||||
|
|
||||||
|
final LockListInfoGroupEntity? lockListInfoGroupEntity =
|
||||||
|
await Storage.getLockMainListData();
|
||||||
|
if (lockListInfoGroupEntity != null) {
|
||||||
|
lockListInfoGroupEntity!.groupList?.forEach((element) {
|
||||||
|
final lockList = element.lockList;
|
||||||
|
if (lockList != null && lockList.length != 0) {
|
||||||
|
for (var lockInfo in lockList) {
|
||||||
|
final peerId = lockInfo.network?.peerId;
|
||||||
|
if (peerId != null && peerId != '') {
|
||||||
|
if (peerId == lockPeerID) {
|
||||||
|
isH264 = lockInfo.lockFeature?.isH264 == 1;
|
||||||
|
isMJpeg = lockInfo.lockFeature?.isMJpeg == 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
// 优先使用H264,其次是MJPEG
|
// 优先使用H264,其次是MJPEG
|
||||||
if (isH264) {
|
if (isH264) {
|
||||||
// 锁支持H264,发送H264视频和G711音频期望
|
// 锁支持H264,发送H264视频和G711音频期望
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user