fix: 增加调试页面

This commit is contained in:
liyi 2025-10-29 18:02:55 +08:00
parent 21aa3adf7b
commit 6cc00ca348
3 changed files with 31 additions and 15 deletions

View File

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

View File

@ -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,

View File

@ -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 {
// Mapkey为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;
}