fix: 增加调试页面
This commit is contained in:
parent
21aa3adf7b
commit
6cc00ca348
@ -25,7 +25,7 @@ class ThirdPartyPlatformState {
|
||||
// 响应式字符串集合(自动触发 UI 更新)
|
||||
final RxList<TppSupportInfo> tppSupportList = RxList<TppSupportInfo>([]);
|
||||
|
||||
RxInt selectPlatFormIndex = (0).obs;
|
||||
RxInt selectPlatFormIndex = 0.obs;
|
||||
RxBool openNumber = false.obs;
|
||||
RxString registerKey = ''.obs;
|
||||
|
||||
|
||||
@ -93,8 +93,8 @@ class _TalkViewNativeDecodePageDebugState extends State<TalkViewNativeDecodePage
|
||||
child: RepaintBoundary(
|
||||
key: state.globalKey,
|
||||
child: SizedBox(
|
||||
width: StartChartManage().videoHeight.w,
|
||||
height: StartChartManage().videoWidth.h,
|
||||
width: StartChartManage().videoHeight.w,
|
||||
height: StartChartManage().videoWidth.h,
|
||||
child: RotatedBox(
|
||||
// 解码器不支持硬件旋转,使用RotatedBox
|
||||
quarterTurns: startChartManage.rotateAngle ~/ 90,
|
||||
@ -106,10 +106,18 @@ class _TalkViewNativeDecodePageDebugState extends State<TalkViewNativeDecodePage
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
)
|
||||
: Texture(
|
||||
textureId: state.textureId.value!,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
: state.isFullScreen.isFalse
|
||||
? AspectRatio(
|
||||
aspectRatio: StartChartManage().videoWidth / StartChartManage().videoHeight,
|
||||
child: Texture(
|
||||
textureId: state.textureId.value!,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
)
|
||||
: Texture(
|
||||
textureId: state.textureId.value!,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -117,7 +125,14 @@ class _TalkViewNativeDecodePageDebugState extends State<TalkViewNativeDecodePage
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
state.isFullScreen.value = !state.isFullScreen.value;
|
||||
},
|
||||
child: Obx(
|
||||
() => Text(state.isFullScreen.isTrue ? '退出全屏' : '全屏'),
|
||||
),
|
||||
),
|
||||
Obx(() => state.isLoading.isTrue
|
||||
? Positioned(
|
||||
bottom: 310.h,
|
||||
|
||||
@ -37,8 +37,7 @@ class TalkViewNativeDecodeState {
|
||||
Future<String?> userMobileIP = NetworkInfo().getWifiIP();
|
||||
Future<String?> userUid = Storage.getUid();
|
||||
|
||||
RxInt udpStatus =
|
||||
0.obs; //0:初始状态 1:等待监视 2: 3:监视中 4:呼叫成功 5:主角通话中 6:被叫通话 8:被叫通话中 9:长按说话
|
||||
RxInt udpStatus = 0.obs; //0:初始状态 1:等待监视 2: 3:监视中 4:呼叫成功 5:主角通话中 6:被叫通话 8:被叫通话中 9:长按说话
|
||||
TextEditingController passwordTF = TextEditingController();
|
||||
|
||||
RxList<int> listAudioData = <int>[].obs; //得到的音频流字节数据
|
||||
@ -63,8 +62,7 @@ class TalkViewNativeDecodeState {
|
||||
RxBool isPlaying = false.obs; // 是否开始播放
|
||||
Rx<TalkStatus> talkStatus = TalkStatus.none.obs; //星图对讲状态
|
||||
// 获取 startChartTalkStatus 的唯一实例
|
||||
final StartChartTalkStatus startChartTalkStatus =
|
||||
StartChartTalkStatus.instance;
|
||||
final StartChartTalkStatus startChartTalkStatus = StartChartTalkStatus.instance;
|
||||
|
||||
// 通话数据流的单例流数据处理类
|
||||
final TalkDataRepository talkDataRepository = TalkDataRepository.instance;
|
||||
@ -81,6 +79,7 @@ class TalkViewNativeDecodeState {
|
||||
RxBool isLongPressing = false.obs; // 旋转角度(以弧度为单位)
|
||||
// 视频解码器纹理ID
|
||||
Rx<int?> textureId = Rx<int?>(null);
|
||||
|
||||
// FPS监测相关变量
|
||||
|
||||
RxInt lastFpsUpdateTime = 0.obs; // 上次FPS更新时间
|
||||
@ -107,7 +106,7 @@ class TalkViewNativeDecodeState {
|
||||
|
||||
// 帧跟踪Map,记录每个提交的帧,key为textureId_frameSeq
|
||||
Map<String, Map<String, dynamic>> frameTracker = {};
|
||||
|
||||
|
||||
// H264帧缓冲区相关
|
||||
final List<Map<String, dynamic>> h264FrameBuffer = <Map<String, dynamic>>[]; // H264帧缓冲区,存储帧数据和类型
|
||||
final int maxFrameBufferSize = 50; // 最大缓冲区大小
|
||||
@ -122,6 +121,8 @@ class TalkViewNativeDecodeState {
|
||||
// 当前清晰度选项,初始为'高清'
|
||||
RxString currentQuality = '高清'.obs; // 可选:高清、标清、流畅
|
||||
|
||||
RxString currentLanguage =
|
||||
CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
||||
RxString currentLanguage = CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
||||
|
||||
// 是否拉伸至全屏
|
||||
RxBool isFullScreen = false.obs;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user