fix:调整为callkit实现

This commit is contained in:
liyi 2025-07-02 17:13:05 +08:00
parent 4e08f57c48
commit 87905dacb7

View File

@ -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;
}
}