|
|
7 mesi fa | |
|---|---|---|
| .. | ||
| CMakeLists.txt | 7 mesi fa | |
| CMakeLists_simple.txt | 7 mesi fa | |
| README.md | 7 mesi fa | |
| README_simple.md | 7 mesi fa | |
| main111.cpp | 7 mesi fa | |
| main_simple.cpp | 7 mesi fa | |
| screenwall_simple.cpp | 7 mesi fa | |
| screenwall_simple.h | 7 mesi fa | |
| screenwall_widget.cpp | 7 mesi fa | |
| screenwall_widget.h | 7 mesi fa | |
屏幕墙是一个基于Qt和AvRecorder开发的实时窗口预览系统,提供了完整的桌面和窗口内容捕获与显示功能。
ScreenWallWidget (主组件)
├── DesktopPreviewWidget (桌面预览)
├── WindowIconListWidget (窗口列表)
└── WindowPreviewWidget (窗口预览)
EnhancedWindowFinder (窗口查找)
└── 扩展WindowFinder,支持图标和缩略图
ResourceManager (资源管理)
└── 管理捕获会话和缓存
克隆项目
cd LearningSmartClient
创建构建目录
mkdir build
cd build
配置CMake
cmake ../ScreenWall -G "Visual Studio 16 2019" -A x64
# 或使用Ninja
cmake ../ScreenWall -G Ninja
编译项目
cmake --build . --config Release
运行程序
./bin/ScreenWall.exe
确保以下库文件可用:
AvRecorder.lib - 视频录制库avcodec.lib, avformat.lib, avutil.lib - FFmpeg库struct ScreenWallConfig {
int desktopFrameRate = 15; // 桌面捕获帧率
int windowFrameRate = 30; // 窗口捕获帧率
int updateInterval = 2000; // 窗口列表更新间隔(ms)
QSize thumbnailSize = {120, 90}; // 缩略图尺寸
int maxConcurrentCaptures = 3; // 最大同时捕获数
};
class ScreenWallWidget : public QWidget {
public:
// 配置和控制
void setConfig(const ScreenWallConfig& config);
void startScreenWall();
void stopScreenWall();
void refreshWindowList();
// 信号
void windowSelected(HWND hwnd, const QString& title);
void desktopSelected();
};
class EnhancedWindowFinder {
public:
struct ExtendedInfo {
HWND hwnd;
QString title;
QIcon icon;
QPixmap thumbnail;
bool isMinimized;
bool isVisible;
// ... 更多属性
};
static QVector<ExtendedInfo> GetExtendedList(bool includeMinimized = true);
static QIcon GetWindowIcon(HWND hwnd);
static QPixmap GetWindowThumbnail(HWND hwnd, const QSize& size = QSize());
};
编译错误
运行时错误
性能问题
显示问题
在Debug模式下,程序会输出详细的调试信息:
// 启用调试输出
QLoggingCategory::setFilterRules("*.debug=true");
IVideoCapturer接口VideoRecorder中注册新方法// 添加性能计数器
class PerformanceMonitor {
public:
void recordFrameTime(qint64 time);
double getAverageFrameRate() const;
void logPerformanceStats();
};
本项目基于现有的LearningSmartClient项目开发,遵循相同的许可证条款。
如有问题或建议,请通过以下方式联系:
注意: 本项目仅用于学习和研究目的,请遵守相关法律法规和隐私政策。