Release/eagle#467
Conversation
Unify video format selection logic across all devices. Change default format from mp4 to webm for better compatibility. 统一所有设备的视频格式选择逻辑,将默认格式从 mp4 改为 webm 以提升兼容性。 Log: 修改默认录制视频格式为 webm PMS: https://pms.uniontech.com/bug-view-358869.html Influence: 新用户默认使用 webm 格式录制视频,用户仍可在设置中切换为 mp4。已有用户配置不受影响。
bump version Log: bump version
|
CLA Assistant Lite bot:
|
|
TAG Bot TAG: 6.0.13 |
|
Hi @Resurgamz. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideStandardizes video format selection to use webm as the default regardless of board performance, simplifies the configuration-dependent format choice, and aligns the settings UI list ordering with the new default/backup format semantics. Flow diagram for runtime video format selection in videowidgetflowchart TD
A[Start videowidget constructor] --> B[Check encodeEnv == FFmpeg_Env]
B -->|No| C[Set m_videoFormat = webm]
B -->|Yes| D[Check encExists]
D -->|No| C
D -->|Yes| E[Read formatIndex = option outsetting.outformat.vidformat]
E -->|formatIndex == 1| F[Set m_videoFormat = mp4]
E -->|formatIndex != 1| C
C --> G[End]
F --> G
Flow diagram for Settings init video format list populationflowchart TD
A[Start Settings init] --> B[Check encodeEnv == FFmpeg_Env]
B -->|No| H[videoFormatList << webm]
B -->|Yes| C[Check encExists]
C -->|No| D[videoFormatList << webm]
D --> E[Set option outsetting.outformat.vidformat = 0]
C -->|Yes| F[loadCameraConf]
F --> G[videoFormatList << webm << mp4]
H --> I[End]
E --> I
G --> I
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The previous special-casing for low-performance boards has been removed; if that constraint is still relevant, consider either preserving a guard (e.g., disallowing mp4 on low-performance boards) or explicitly documenting why it is now safe to honor the user setting there.
- In videowidget and Settings, the video format index is assumed to be 0 or 1; it might be safer to clamp or validate the
vidformatoption value before using it so unexpected values don't silently map to the wrong format. - The literal format strings ("webm"/"mp4") and their index meanings are now duplicated across
videowidgetandSettings; consider centralizing this mapping (e.g., constants or an enum) to keep behavior consistent if formats change in the future.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The previous special-casing for low-performance boards has been removed; if that constraint is still relevant, consider either preserving a guard (e.g., disallowing mp4 on low-performance boards) or explicitly documenting why it is now safe to honor the user setting there.
- In videowidget and Settings, the video format index is assumed to be 0 or 1; it might be safer to clamp or validate the `vidformat` option value before using it so unexpected values don't silently map to the wrong format.
- The literal format strings ("webm"/"mp4") and their index meanings are now duplicated across `videowidget` and `Settings`; consider centralizing this mapping (e.g., constants or an enum) to keep behavior consistent if formats change in the future.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Reorder video format list based on performance board check.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: max-lvs, Resurgamz The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot ✅ Tag created successfully 📋 Tag Details
|
Summary by Sourcery
Standardize video output format selection to use webm as the default and honor configuration where supported.
Bug Fixes:
Enhancements: