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

This commit is contained in:
yuanyuanxiang
2026-06-15 13:08:23 +02:00
parent 5757ec7965
commit d3b9e7faae
16 changed files with 210 additions and 10 deletions

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 做偶数对齐 &~11→0触发内部 strdup 泄漏;< 2 一并拦住
EncoderRequest req;
req.width = width;
req.height = height;