feat(ext-image-capture): Add multi-screen recording support#765
Merged
deepin-bot[bot] merged 1 commit intoNov 27, 2025
Merged
Conversation
- Introduce `MultiScreenCaptureCoordinator` and `MultiScreenFrameCompositor` classes to manage multi-screen capture functionality and composite captured frames. - Enhance `ExtCaptureIntegration` to support starting and stopping multi-screen recordings. - Add new signals to `ExtCaptureIntegration` for handling multi-screen frame readiness and error reporting. - Update relevant header and source files to include the new multi-screen components, significantly improving overall screen recording capabilities. 特性(ext-image-capture): 添加多屏幕录制支持 - 引入 `MultiScreenCaptureCoordinator` 和 `MultiScreenFrameCompositor` 类,用于管理多屏幕捕获功能和进行帧合成。 - 增强 `ExtCaptureIntegration`,以支持多屏幕录制的启动和停止操作。 - 为 `ExtCaptureIntegration` 添加新信号,用于处理多屏幕帧准备就绪和错误报告。 - 更新相关的头文件和源文件,纳入新的多屏幕组件,显著提升了整体屏幕录制能力。
deepin pr auto review我来对这段代码进行详细审查:
// 在MultiScreenFrameCompositor::performFrameStitching()中
// 建议:使用QImage::Format_RGB32代替Format_RGBA8888,在不需要alpha通道时性能更好
QImage compositeImage(m_outputSize, QImage::Format_RGB32);
// 在MultiScreenCaptureCoordinator::extractDmaBufferData()中
// 建议:添加内存对齐检查,避免性能下降
if (stride % 4 != 0) {
qCWarning(dsrApp) << "Warning: Unaligned stride may affect performance";
}
// 在MultiScreenCaptureCoordinator::onScreenFrameReady()中
// 建议:添加frameData大小检查
if (frameInfo.frameData.size() != size) {
qCWarning(dsrApp) << "Frame data size mismatch";
return;
}
// 在MultiScreenFrameCompositor::convertDmaBufferToQImage()中
// 建议:添加空指针检查
if (!frameInfo.frameData.constData()) {
qCWarning(dsrApp) << "Invalid frame data";
return QImage();
}
// 在MultiScreenCaptureCoordinator::startMultiScreenCapture()中
// 建议:添加屏幕数量限制
const int MAX_SCREENS = 4;
if (screens.size() > MAX_SCREENS) {
qCWarning(dsrApp) << "Too many screens requested";
return false;
}
// 在MultiScreenFrameCompositor::addScreenFrame()中
// 建议:添加帧时间戳同步检查
if (abs(frameInfo.timestamp - latestTimestamp) > MAX_TIMESTAMP_DIFF) {
qCWarning(dsrApp) << "Frame timestamp out of sync";
}
// 在MultiScreenCaptureCoordinator::~MultiScreenCaptureCoordinator()中
// 建议:确保所有资源被正确释放
for (auto& layout : m_screenLayouts) {
if (layout.session) {
layout.session->disconnect();
layout.session->deleteLater();
layout.session = nullptr;
}
}
// 在MultiScreenFrameCompositor::addScreenFrame()中
// 建议:使用QMutexLocker保护共享数据
QMutexLocker locker(&m_frameMutex);
if (!m_frameMutex.tryLock(1000)) {
qCWarning(dsrApp) << "Frame mutex timeout";
return false;
}
// 在MultiScreenCaptureCoordinator::startMultiScreenCapture()中
// 建议:添加更详细的错误信息
if (!m_manager) {
emit error(tr("Capture manager not initialized"));
return false;
}
// 在关键函数中添加性能监控
QElapsedTimer timer;
timer.start();
// ... 函数执行 ...
qCDebug(dsrApp) << "Function execution time:" << timer.elapsed() << "ms";总结: |
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) |
2f7e3dd
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.
MultiScreenCaptureCoordinatorandMultiScreenFrameCompositorclasses to manage multi-screen capture functionality and composite captured frames.ExtCaptureIntegrationto support starting and stopping multi-screen recordings.ExtCaptureIntegrationfor handling multi-screen frame readiness and error reporting.特性(ext-image-capture): 添加多屏幕录制支持
MultiScreenCaptureCoordinator和MultiScreenFrameCompositor类,用于管理多屏幕捕获功能和进行帧合成。ExtCaptureIntegration,以支持多屏幕录制的启动和停止操作。ExtCaptureIntegration添加新信号,用于处理多屏幕帧准备就绪和错误报告。