Feat: window capture via PrintWindow with server-side HWND routing by clientID

This commit is contained in:
yuanyuanxiang committed 2026-06-15 14:11:42 +02:00
1 parent 5757ec7965
commit d3b9e7faae
16 files changed
+210 -10

No files matched your search

+2
View File
@@ -170,6 +170,7 @@ public:
// 感兴趣区域 (ROI)
RECT m_ROI = {0,0,0,0};
bool m_bNeedRestart = false; // 捕获对象需要重建(如窗口尺寸变化)
int m_nScaleSendWidth = 0;
int m_nScaleSendHeight = 0;
@@ -859,6 +860,7 @@ public:
void ensureEncoder(int width, int height)
{
if (m_encoder) return;
if (width < 2 || height < 2) return; // x264 做偶数对齐 &~1,1→0,触发内部 strdup 泄漏;< 2 一并拦住
EncoderRequest req;
req.width = width;
req.height = height;