feat(ext-image-capture): Add ext-image-capture components for screen …#761
Merged
deepin-bot[bot] merged 1 commit intoNov 27, 2025
Merged
feat(ext-image-capture): Add ext-image-capture components for screen …#761deepin-bot[bot] merged 1 commit into
deepin-bot[bot] merged 1 commit into
Conversation
…recording - Introduce core management classes including ExtCaptureManager, ExtCaptureSession, ExtCaptureRecorder, and ExtCaptureFrame - Implement ExtCaptureBridge to facilitate data transfer between the capture source and the recording process - Integrate support for image capture protocols to enhance overall screen recording capabilities - Update project configuration to include new source and header files for the ext-image-capture module - Lay the groundwork for advanced screen recording features integrating with Wayland protocols 特性(ext-image-capture): 添加屏幕录制相关的 ext-image-capture 组件 - 引入核心管理类,包括 ExtCaptureManager、ExtCaptureSession、ExtCaptureRecorder 和 ExtCaptureFrame - 实现 ExtCaptureBridge 以促进捕获源与录制流程之间的数据传输 - 集成图像捕获协议支持,以增强整体屏幕录制能力 - 更新工程配置,包含 ext-image-capture 模块的新源文件和头文件
deepin pr auto review我来对这段代码进行审查:
a) 添加更详细的文档注释: /**
* @brief 处理帧数据
* @param maxFramesPerRound 每轮最大处理帧数
* @return 实际处理的帧数
*/
int processFrames(int maxFramesPerRound = 5);b) 使用枚举替代魔法数字: enum class FrameFormat {
XBGR8888 = 0,
// 其他格式...
};c) 添加配置参数的验证: bool ExtCaptureRecorder::setFrameRate(int fps) {
if (fps < 1 || fps > 60) {
qWarning() << "Invalid frame rate:" << fps;
return false;
}
m_frameRate = fps;
return true;
}d) 改进错误处理机制: class ExtCaptureError : public std::exception {
public:
explicit ExtCaptureError(const QString& message) : m_message(message) {}
const char* what() const noexcept override {
return m_message.toLocal8Bit().constData();
}
private:
QString m_message;
};e) 添加性能监控: class PerformanceMonitor {
public:
void startFrame() { m_frameStart = std::chrono::high_resolution_clock::now(); }
void endFrame() {
auto duration = std::chrono::high_resolution_clock::now() - m_frameStart;
m_frameTime = std::chrono::duration_cast<std::chrono::microseconds>(duration).count();
}
qint64 getFrameTime() const { return m_frameTime; }
private:
std::chrono::time_point<std::chrono::high_resolution_clock> m_frameStart;
qint64 m_frameTime = 0;
};
a) 添加单元测试 总体来说,代码结构清晰,功能完整,但在错误处理、性能优化和安全性方面还有改进空间。建议按照上述建议逐步改进代码质量。 |
lzwind
approved these changes
Nov 27, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev, lzwind 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 |
Member
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
3a366f1
into
linuxdeepin:develop/snipe
7 of 9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…recording
特性(ext-image-capture): 添加屏幕录制相关的 ext-image-capture 组件