From: xue <2144439972@qq.com> Date: Sun, 28 Sep 2025 05:54:14 +0000 (+0800) Subject: 增加视频帧率操作 X-Git-Tag: V1.0.9_20251128_194606_LN~307 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=ccf1056ebaf29268121fdc54c19c865b93a96d7d;p=mirrors%2FFD230.git 增加视频帧率操作 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp index e66b3a61f..5cdf7439a 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdDialogueView.cpp @@ -162,6 +162,7 @@ namespace OHOS { case THUNDERBIRD_DIALOGUEVIEW_SPEAKING: { + ThunderBirdModel::GetInstance()->LowFrequence();//减低视频帧率 ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); if (TextLabel) { diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp index bd6177e8b..b30a8cf90 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp @@ -354,6 +354,7 @@ namespace OHOS } case THUNDERBIRD_LULLABYVIEW_4: { + ThunderBirdModel::GetInstance()->LowFrequence();//减低视频帧率 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdLullabyView::Show: THUNDERBIRD_LULLABYVIEW_4"); //ThunderBirdModel::GetInstance()->StartCountUpTimer(15 * 60); if (TextLabel) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp index 9d16d3c02..fb2db2fc1 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp @@ -292,11 +292,12 @@ namespace OHOS //ChangeView(MAXVIEW, THUNDERBIRD_GUIDEVIEW, 0); // 文字显示图层 if(ThunderBirdModel::GetInstance()->StartBootOperation() == 0) { - ChangeView(MAXVIEW, THUNDERBIRD_GUIDEVIEW, ThunderBirdGuideView::THUNDERBIRD_GUIDEVIEW_1); // 文字显示图层 + ChangeView(MAXVIEW, THUNDERBIRD_GUIDEVIEW, ThunderBirdGuideView::THUNDERBIRD_GUIDEVIEW_3); // 文字显示图层 } else if(ThunderBirdModel::GetInstance()->StartBootOperation() == 1) { - ChangeView(MAXVIEW, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING); + // ChangeView(MAXVIEW, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING); + ChangeView(MAXVIEW, THUNDERBIRD_LULLABYVIEW, ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_4); } ScrollView_->Add(InitBaseData()); // 最上面状态栏 @@ -549,9 +550,14 @@ namespace OHOS // 同用遮罩,部分界面在内部自行开启,其余界面关闭 iconView->SetVisible(false); backGroundView->SetVisible(false); - if(showView != THUNDERBIRD_DIALOGUEVIEW) + if(showView != THUNDERBIRD_DIALOGUEVIEW && showView != THUNDERBIRD_LULLABYVIEW) { - ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON); // 关闭屏幕常亮 + ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON); // 关闭屏幕常亮 + } + if(currentSubView_ == ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING || currentSubView_ == ThunderBirdLullabyView::THUNDERBIRD_LULLABYVIEW_4) + { + //恢复视频帧率 + ThunderBirdModel::GetInstance()->HighFrequence(); } // OTA界面已独立为slice,不再需要此检查 // 保存上一级视图信息 diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 9874994cd..3810a5761 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -1545,21 +1545,21 @@ if((chatLeft < 20 && chatLeft > 0))//对话不足 { ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_DIALOGUE_NOT_ENOUGH); - ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("对话额度不足20轮可扫码续充"); + ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("对话额度不足20è½®\n可扫码续充"); } else if(flowLeft < 80 && flowLeft > 0)//流量不足 { - ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_DIALOGUE_USE_UP); - ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("流量不足100M了哦扫码可重置流量"); + ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_DIALOGUE_NOT_ENOUGH); + ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("流量不足100M了哦\n扫码可重置流量"); } else if(chatLeft == 0)//对话用尽 { - ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_DIALOGUE_USE_UP); - ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("啊哦,对话轮数已用完,扫码续上吧"); + ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_DIALOGUE_NOT_ENOUGH); + ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("啊哦,对话轮数已用完,\n扫码续上吧"); } else if(flowLeft == 0)//流量用尽 { - ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_FLOW_USE_UP); + ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_REMINDERVIEW, ThunderBirdReminderView::THUNDERBIRD_REMINDERVIEW_DIALOGUE_NOT_ENOUGH); ThunderBirdReminderView::GetInstance()->UpdateTaskReminderText("流量用完了哦"); } diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp index 8c95b1452..caef377da 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp @@ -58,13 +58,6 @@ namespace OHOS TextLabel->SetStyle(STYLE_LETTER_SPACE, 1); group->Add(TextLabel); } - if(RemindLabel) - { - RemindLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); - RemindLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20); - RemindLabel->SetVisible(false); - group->Add(RemindLabel); - } RemindButton = new UILabelButton(); if (RemindButton) { @@ -90,6 +83,14 @@ namespace OHOS RemindIcon2->SetResizeMode(UIImageView::CONTAIN); group->Add(RemindIcon2); } + RemindLabel = new UILabelExt(); + if(RemindLabel) + { + RemindLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + RemindLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20); + RemindLabel->SetVisible(false); + group->Add(RemindLabel); + } VolumeProgress = new UIBoxProgress(); if (VolumeProgress) { @@ -200,7 +201,7 @@ namespace OHOS RemindIcon->SetSrc("/user/res/low_battery.bin"); RemindIcon->SetVisible(true); } - if(RemindLabel) + if(RemindButton) { if (ThunderBirdMainView::GetInstance()->Batteryvalue <= 20 && ThunderBirdMainView::GetInstance()->Batteryvalue > 10) { @@ -260,8 +261,9 @@ namespace OHOS ThunderBirdMainView::GetInstance()->OpenBackGround(); if(TextLabel) { - TextLabel->SetPosition(57, 69, 246, 84); - TextLabel->SetText("对话额度不足20轮可扫码续充"); + TextLabel->SetPosition(57, 69, 266, 84); + TextLabel->SetText("对话额度不足20è½®\n可扫码续充"); + TextLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); TextLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); TextLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); TextLabel->SetVisible(true); @@ -278,6 +280,7 @@ namespace OHOS { RemindLabel->SetPosition(132, 296, 96, 28); RemindLabel->SetText("按 确认"); + RemindLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 20); RemindLabel->SetVisible(true); } if(RemindIcon2)