-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add mp4movie custom resolution support #30
Conversation
审阅者指南 by Sourcery这个拉取请求通过为 mp4 电影添加自定义分辨率支持来增强 MovieLoader。更改包括更新配置优先级,引入异步回调以根据视频的长宽比调整视频尺寸,并修改检索电影尺寸的方式。 MovieLoader 中异步视频分辨率调整的序列图sequenceDiagram
participant VP as VideoPlayer
participant ML as MovieLoader
VP->>ML: Trigger prepareCompleted(source)
activate ML
ML->>ML: Retrieve width & height from VideoPlayer
ML->>ML: Calculate new bgaSize based on:
ML->>ML: if (height > width) then [1080, 1080 * width/height]
ML->>ML: else [1080 * height/width, 1080]
ML-->>VP: bgaSize updated
deactivate ML
带有自定义分辨率支持的 MovieLoader 更新类图classDiagram
class MovieLoader {
-bool loadSourceMovie
-bool loadMp4Movie = false
-string movieAssetsDir = "LocalAssets"
-bool jacketAsMovie
-uint[] bgaSize = [0, 0]
-Dictionary~string, string~ optionFileMap
+LoadLocalBgaAwake(____movieMaskObj: GameObject, ___monitorIndex: int)
+GetMovieHeightPostfix(ref __result: uint)
+GetMovieWidthPostfix(ref __result: uint)
}
%% Note: LoadLocalBgaAwake now attaches an asynchronous callback to VideoPlayer.prepareCompleted
note for MovieLoader "处理 mp4 电影的自定义分辨率调整"
文件级更改
提示和命令与 Sourcery 交互
自定义您的体验访问您的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis pull request enhances the MovieLoader by adding custom resolution support for mp4 movies. The changes include updating configuration priorities, introducing an asynchronous callback to adjust the video dimensions based on the video's aspect ratio, and modifying how the movie dimensions are retrieved. Sequence diagram for asynchronous video resolution adjustment in MovieLoadersequenceDiagram
participant VP as VideoPlayer
participant ML as MovieLoader
VP->>ML: Trigger prepareCompleted(source)
activate ML
ML->>ML: Retrieve width & height from VideoPlayer
ML->>ML: Calculate new bgaSize based on:
ML->>ML: if (height > width) then [1080, 1080 * width/height]
ML->>ML: else [1080 * height/width, 1080]
ML-->>VP: bgaSize updated
deactivate ML
Updated class diagram for MovieLoader with custom resolution supportclassDiagram
class MovieLoader {
-bool loadSourceMovie
-bool loadMp4Movie = false
-string movieAssetsDir = "LocalAssets"
-bool jacketAsMovie
-uint[] bgaSize = [0, 0]
-Dictionary~string, string~ optionFileMap
+LoadLocalBgaAwake(____movieMaskObj: GameObject, ___monitorIndex: int)
+GetMovieHeightPostfix(ref __result: uint)
+GetMovieWidthPostfix(ref __result: uint)
}
%% Note: LoadLocalBgaAwake now attaches an asynchronous callback to VideoPlayer.prepareCompleted
note for MovieLoader "Handles custom resolution adjustment for mp4 movies via bgaSize"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嘿 @ck2739046 - 我已经审查了你的更改 - 以下是一些反馈:
整体评论:
- 考虑将 bgaSize 数组重命名并重构为专门的结构,以更清晰地表示宽度和高度。
- 仔细检查将 loadMp4Movie 的默认值从 true 更改为 false 是否符合预期行为。
以下是我在审查期间查看的内容
- 🟢 一般问题:一切看起来都很好
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我变得更有用!请在每条评论上点击 👍 或 👎,我将使用这些反馈来改进你的评论。
Original comment in English
Hey @ck2739046 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider renaming and refactoring the bgaSize array into a dedicated structure to more clearly represent width and height.
- Double-check that changing the default of loadMp4Movie from true to false aligns with the intended behavior.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This reverts commit 4c0367f.
我就说为什么我视频放进去会变成方的 |
前两天修的封面比例问题,也可以适用于mp4movie比例
这样就能正常播放非16:9的mp4文件了,不知道有没有人会用到这个需求...
Summary by Sourcery
添加对 mp4 电影自定义分辨率的支持。更新配置描述以反映新功能。
新功能:
测试:
Original summary in English
Summary by Sourcery
Add support for custom resolutions for mp4 movies. Update the configuration descriptions to reflect the new functionality.
New Features:
Tests: