Skip to content

Conversation

@rb-union
Copy link
Contributor

完善 initFFmpegVideoThumbnailer() ,添加备用的查找库方式
和提示信息。在 QLibrary 无法查找时尝试使用手动查找方式取得
其它版本的 libffmpegthumbnailer.so 动态库。

Log: 补充适配缩略图查找方式和UT
Bug: https://pms.uniontech.com/bug-view-213565.html
Bug: https://pms.uniontech.com/bug-view-221557.html
Influence: VideoThumbnailer

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Oct 3, 2023

Deepin ChatOps Bot
Deepin redeliveried failed, need update or recreate pull request!!!

@chenchongbiao
Copy link

/check obs

@rb-union
Copy link
Contributor Author

/check obs

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Nov 14, 2023

Deepin Obs Bot
Starting find obs webhook event and retrigger!

@rb-union rb-union force-pushed the test_213565 branch 3 times, most recently from e3bc86d to d1bc1ed Compare November 17, 2023 05:07
@deepin-bot
Copy link
Contributor

deepin-bot bot commented Dec 25, 2023

TAG Bot

New tag: 1.0.40
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #112

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 10, 2024

TAG Bot

New tag: 1.0.41
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #114

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Feb 5, 2024

TAG Bot

New tag: 1.0.42
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #127

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Feb 21, 2024

TAG Bot

New tag: 1.0.43
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #129

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Mar 27, 2024

TAG Bot

New tag: 1.0.44
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #134

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jun 26, 2024

TAG Bot

New tag: 1.0.45
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #140

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Sep 20, 2024

TAG Bot

New tag: 1.0.46
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #145

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Nov 15, 2024

TAG Bot

New tag: 1.0.47
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #153

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 20, 2025

TAG Bot

New tag: 6.5.0
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #156

完善 initFFmpegVideoThumbnailer() ,添加备用的查找库方式
和提示信息。在 QLibrary 无法查找时尝试使用手动查找方式取得
其它版本的 libffmpegthumbnailer.so 动态库。

Log: 补充适配缩略图查找方式和UT
Bug: https://pms.uniontech.com/bug-view-213565.html
Bug: https://pms.uniontech.com/bug-view-221557.html
Influence: VideoThumbnailer
Change-Id: Id33c13f1c5d9b4c6ecaada2ae50e714f2d40a3d6
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码注释

    • libPath函数和initFFmpegVideoThumbnailer函数中,注释应该更详细地解释函数的目的、参数、返回值和可能的副作用。例如,libPath函数的注释应该说明它是如何处理动态库查找的,以及为什么需要这个函数。
  2. 错误处理

    • initFFmpegVideoThumbnailer函数中,当QLibrary加载失败时,应该有更详细的错误处理逻辑,比如记录错误日志或者抛出异常。当前的实现只是简单地返回false,这可能不足以诊断问题。
  3. 代码重复

    • initFFmpegVideoThumbnailer函数中,qWarningqInfo的日志输出重复了多次,可以考虑将日志输出封装成一个函数,以减少代码重复。
  4. 资源管理

    • QLibrary对象在initFFmpegVideoThumbnailer函数中创建,但没有看到相应的资源释放代码。如果initFFmpegVideoThumbnailer函数可能会被多次调用,应该考虑如何管理QLibrary对象的生命周期。
  5. 测试代码

    • ut_ffmpegvideothumbnailer测试类中,SetUpTearDown函数应该有更明确的注释,说明它们的作用。此外,测试用例initFFmpegVideoThumbnailerrunFFmpegVideoThumbnailer应该有更详细的测试描述,说明它们测试的具体行为。
  6. 代码风格

    • initFFmpegVideoThumbnailer函数中,if语句的缩进不一致,应该保持一致的缩进风格以提高代码的可读性。
  7. 安全性

    • runFFmpegVideoThumbnailer函数中,直接使用QUrl::fromLocalFile可能会导致安全问题,应该验证文件路径是否合法,避免路径遍历攻击。
  8. 性能

    • libPath函数中,dir.entryList调用可能会影响性能,如果目录中包含大量文件,可以考虑使用异步方式或者缓存结果来提高性能。

综上所述,代码需要改进的地方包括:增加详细的注释、优化错误处理、减少代码重复、管理资源生命周期、改进测试描述、保持一致的代码风格、增强安全性以及考虑性能优化。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pengfeixx, rb-union

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rb-union rb-union merged commit 125f12c into linuxdeepin:master Mar 17, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants