Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.
C++
Recover static WGC resize and scope capture picker to Basic controls
Veyra Goal Agent83884092e64d
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 4dc1846c..a001498a 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -9699,3 +9699,10 @@ final-audit.py pre已通过82旧树/94旧分支/509脏文件与main b571a44不## 2026-10-17 PR57接手Windows验收用户要求合入云端Agent PR57并做好测试。已读PR正文/29文件清单/两提交/空评论,明确云端仅Linux/Wine/MinGW与Qt离屏,不能代替Windows验收。archive.py保护84旧树/96分支/509未提交文件、原PRJSON/patch、dirty备份和75114019字节source-before.bundle(verify通过);main/远端d68d6be,head09ac54b固定。建立E盘codex/pr57-capture-window-20261017,no-ff合入原贡献,无冲突;main暂不推进。方案PR57_INTEGRATION_PLAN_2026-10-17.md,所有产物E:/项目/Veyra/{用途}/pr57-capture-window-20261017。不派Agent,不改运行库/驱动/真实配置/33ms或250ms;本轮不改2.0.9包/标签/Release或代发/关机,后续真实构建/测试/失败单独记录。+++### 2026-10-17 PR57 native follow-up: static WGC resize and Windows control style+- Final native run `E:/项目/Veyra/logs/pr57-capture-window-20261017/native-20261017-215502` independently reproduced a static-source resize failure: pool Recreate completed at13:55:13Z, but no new frame arrived before timeout. This is an actual source defect, not the earlier QML observer timing assumption. Retain failing receipt.+- Preserve300ms pool debounce and existing queue/PTS contracts. After a resized pool supplies no frame for another300ms, restart its WGC session once, preserving cursor/border settings. No target repaint, synthetic pixels/PTS, perpetual retry or change to UI cadence. Animated sources keep their session. Native regression must confirm the actual new-size frame and reset metadata.+- Actual final GUI run `window-20261017-215528` passed aspect/input/rapid double-click/portrait/exit checks, but flagged the legacy search TextField's custom background as unsupported by the Windows native Controls style. Use explicitly scoped Qt Basic TextField/ItemDelegate/ScrollBar, consistent with existing custom controls; do not change the application's global style.+- Related16-process run `checks-20261017-215403` passed, including82 Qt Quick cases. These predate the two follow-up changes and do not substitute their final regression.diff --git a/qml/Veyra/CaptureLegacyPicker.qml b/qml/Veyra/CaptureLegacyPicker.qmlindex c143116f..0caac7ce 100644--- a/qml/Veyra/CaptureLegacyPicker.qml+++ b/qml/Veyra/CaptureLegacyPicker.qml@@ -1,5 +1,6 @@import QtQuickimport QtQuick.Controls+import QtQuick.Controls.Basic as Basicimport QtQuick.LayoutsPopup {@@ -45,7 +46,7 @@ Popup {text: qsTr("分辨率、帧率和像素格式合并显示;包含非常用帧率,与主界面共用同一个精确选择。范围候选将在连接时验证。")color: Theme.t3; font.family: Theme.fontUi; font.pixelSize: 11; wrapMode: Text.WordWrap}- TextField {+ Basic.TextField {id: searchobjectName: "capture-legacy-search"Layout.fillWidth: true@@ -63,8 +64,8 @@ Popup {clip: truemodel: picker.filteredreuseItems: true- ScrollBar.vertical: ScrollBar {}- delegate: ItemDelegate {+ ScrollBar.vertical: Basic.ScrollBar {}+ delegate: Basic.ItemDelegate {required property var modelDatawidth: list.widthheight: 46diff --git a/src/source/ScreenCaptureSource.cpp b/src/source/ScreenCaptureSource.cppindex aafa69e6..d6381849 100644--- a/src/source/ScreenCaptureSource.cpp+++ b/src/source/ScreenCaptureSource.cpp@@ -170,6 +170,8 @@ struct ScreenCaptureSource::Impl {// (the new content clipped or padded) until the size has held for settle100ns.winrt::Windows::Graphics::SizeInt32 pendingSize{};int64_t pendingSince=0;+ int64_t resizedAt=0;+ bool resizeNeedsFrame=false,borderDisabled=false;static constexpr int64_t settle100ns=3000000;bool resizeSettled(winrt::Windows::Graphics::SizeInt32 size,int64_t now){if(size.Width!=pendingSize.Width||size.Height!=pendingSize.Height){pendingSize=size;pendingSince=now;}@@ -177,8 +179,22 @@ struct ScreenCaptureSource::Impl {}void applyPendingSize(){poolSize=pendingSize;pendingSize={};pool.Recreate(wrapped,DirectXPixelFormat(format),2,poolSize);wasWaiting=true;+ resizedAt=host100ns();resizeNeedsFrame=true;log::info("screen",std::format("capture size {}x{} after resizing settled",poolSize.Width,poolSize.Height));}+ void recoverStaticResize(int64_t now){+ if(!resizeNeedsFrame||now-resizedAt<settle100ns)return;+ // Recreate discards pending frames and WGC need not issue another for a+ // static window. Restart this session once, after a grace period, to+ // obtain a real new-size frame. Never repaint the target or fabricate+ // pixels/timestamps; moving sources keep their existing session.+ resizeNeedsFrame=false;+ session.Close();session=pool.CreateCaptureSession(item);+ session.IsCursorCaptureEnabled(options.cursor);+ if(borderDisabled)session.IsBorderRequired(false);+ session.StartCapture();wasWaiting=true;+ log::info("screen","restarted WGC session once for a static resized target");+ }std::array<std::shared_ptr<Surface>,6> slots;AVFrame* frame=nullptr;uint64_t signal=0,sequence=0;int64_t lastPts=0,nextPts=0,clockOffset=0,lastColorCheck=0;@@ -227,6 +243,7 @@ struct ScreenCaptureSource::Impl {}const auto access=GraphicsCaptureAccess::RequestAccessAsync(GraphicsCaptureAccessKind::Borderless).get();session.IsBorderRequired(false);+ borderDisabled=!session.IsBorderRequired();log::info("screen",std::format("capture border: off access={} required={}",int(access),session.IsBorderRequired()));}catch(const winrt::hresult_error& e){log::warn("screen",std::format("capture border kept hr=0x{:08X} {}",uint32_t(e.code()),winrt::to_string(e.message())));@@ -323,9 +340,9 @@ SourceReadStatus ScreenCaptureSource::read(pipeline::FramePacket& packet,const A}else{for(unsigned i=0;i<2;++i){auto next=p.pool.TryGetNextFrame();if(!next)break;if(captured){captured.Close();++p.metrics.dropped;}captured=std::move(next);++p.metrics.received;}if(!captured){- // A window whose content stops changing sends no further frame:- // apply a settled size here, and the recreated pool delivers one.+ // Apply a settled size even when no further frame arrives.if(p.pendingSize.Width>0&&p.pendingSize.Height>0&&p.resizeSettled(p.pendingSize,now))p.applyPendingSize();+ else p.recoverStaticResize(now);return SourceReadStatus::Waiting;}const auto size=captured.ContentSize();@@ -334,6 +351,7 @@ SourceReadStatus ScreenCaptureSource::read(pipeline::FramePacket& packet,const Aif(p.resizeSettled(size,now)){captured.Close();captured=nullptr;p.applyPendingSize();return SourceReadStatus::Waiting;}// Still resizing: deliver this frame at the current size below.}else p.pendingSize={};+ p.resizeNeedsFrame=false;auto access=captured.Surface().as<::Windows::Graphics::DirectX::Direct3D11::IDirect3DDxgiInterfaceAccess>();check(access->GetInterface(IID_PPV_ARGS(&texture)),"capture surface");pts=captured.SystemRelativeTime().count()+p.clockOffset;}