From 87905dacb76b6cdb64e47e39c90c8a81cad8ba0a Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 2 Jul 2025 17:13:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E4=B8=BAcallkit=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/native/talk_view_native_decode_logic.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart b/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart index 9d9e0e40..17651ddf 100644 --- a/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart +++ b/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart @@ -36,6 +36,7 @@ import 'package:star_lock/talk/starChart/views/native/talk_view_native_decode_st import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart'; import 'package:star_lock/tools/G711Tool.dart'; import 'package:star_lock/tools/bugly/bugly_tool.dart'; +import 'package:star_lock/tools/callkit_handler.dart'; import 'package:star_lock/tools/commonDataManage.dart'; import 'package:star_lock/tools/storage.dart'; import 'package:video_decode_plugin/nalu_utils.dart'; @@ -159,6 +160,9 @@ class TalkViewNativeDecodeLogic extends BaseGetXController { // 拒绝 StartChartManage().startTalkRejectMessageTimer(); } + if (Platform.isIOS) { + CallKitHandler.endCall(); + } VideoDecodePlugin.releaseDecoder(); Get.back(); } @@ -172,7 +176,6 @@ class TalkViewNativeDecodeLogic extends BaseGetXController { int frameSeqI, ScpMessage scpMessage, ) { - // 动态回绕阈值判断,frameSeq较小时阈值也小 if (!_pendingStreamReset && _lastFrameSeq != null && @@ -181,7 +184,8 @@ class TalkViewNativeDecodeLogic extends BaseGetXController { int dynamicThreshold = _getFrameSeqRolloverThreshold(_lastFrameSeq!); if ((_lastFrameSeq! - frameSeq) > dynamicThreshold) { // 检测到新流I帧,frameSeq大幅回绕,进入loading并重置所有本地状态 - AppLog.log('检测到新流I帧,frameSeq大幅回绕,进入loading并重置: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq, 阈值=$dynamicThreshold'); + AppLog.log( + '检测到新流I帧,frameSeq大幅回绕,进入loading并重置: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq, 阈值=$dynamicThreshold'); Future.microtask(() => state.isLoading.value = true); _pendingStreamReset = true; // 先暂停帧处理定时器,防止竞态 @@ -198,7 +202,8 @@ class TalkViewNativeDecodeLogic extends BaseGetXController { // 继续往下执行 } else { // 小幅度乱序,直接丢弃 - AppLog.log('检测到I帧乱序(未超过回绕阈值$dynamicThreshold),丢弃: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq'); + AppLog.log( + '检测到I帧乱序(未超过回绕阈值$dynamicThreshold),丢弃: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq'); return; } }