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++
fix: renew PS5 retry allowance after stable playback and release 1.0.2
Veyra Goal Agent09c054c7c67f
diff --git a/AGENTS.md b/AGENTS.mdindex 28bff2e7..ad2c2ee2 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,5 +1,7 @@# Veyra 项目 Agent 执行规则+> 2026-09-13 用户授权修复持续播放后重连额度不恢复并发布1.0.2。连续30秒有解码进展、帧间无1秒断档后恢复本轮3次重试;会话累计计数/源epoch不回退,短暂出帧不续次数。包含此前手动占用重试、首帧等待和日志保留修复。沿用七个运行组件及patched FFmpeg;不把软件恢复改善宣传成Wi-Fi断流已根治。+> 2026-09-13 用户授权发布1.0.1:采集音频10ms缓冲协商与输入诊断修复合入主线、更新双语说明和完整便携包。沿用1.0.0七文件运行组件,FFmpeg slice补丁和对应源码要求不变。用户日志约半秒音频落后与旧缓冲缺口高度一致;修复后的反馈者实卡结果尚未取得,不宣称所有设备延迟已消除。> 2026-09-13 用户授权整合已完成修复分支、替换透明 Logo,并向 Likely7/Veyra-NRVideo 发布正式应用版本 1.0.0。沿用七个已批准增强运行文件;保留 GPU DIS 为可选实验功能,NVOF 默认。必须使用带 PS5 H.264 slice 补丁的 FFmpeg,附对应源码、构建记录、补丁与开源许可证。正式应用版本号不改变 NR、DLSS FG、XeSS、GPU DIS、PSN/HDR 等功能的实验边界。SDK、DLL、模型、凭据、配置及测试媒体仍不得新增进入源码 Git。diff --git a/CMakeLists.txt b/CMakeLists.txtindex 034c3184..dbc4f3c5 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -1,6 +1,6 @@cmake_minimum_required(VERSION 3.24)-project(veyra VERSION 1.0.1 LANGUAGES CXX RC)+project(veyra VERSION 1.0.2 LANGUAGES CXX RC)# Match the compiler's actual bytes, including on localized Windows installs.# CMake's cached, decoded prefix can leave Ninja with zero header dependencies.diff --git a/README.md b/README.mdindex 47175095..c8a44e90 100644--- a/README.md+++ b/README.md@@ -13,7 +13,7 @@Windows 视频播放器与采集卡增强工具。支持视频、图片、采集卡实时预览和 PS5 局域网串流,可组合使用超分辨率、NR 画面增强与补帧。-[下载 1.0.1 免安装版](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v1.0.1) · [更新记录](docs/RELEASE_NOTES_1.0.1.md) · [反馈问题](https://github.com/Likely7/Veyra-NRVideo/issues)+[下载 1.0.2 免安装版](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v1.0.2) · [更新记录](docs/RELEASE_NOTES_1.0.2.md) · [反馈问题](https://github.com/Likely7/Veyra-NRVideo/issues)## 功能@@ -30,11 +30,11 @@ Windows 视频播放器与采集卡增强工具。支持视频、图片、采集日常模式以观看为主;专业模式展开增强参数、诊断和导出工具。切换模式不需要重新打开视频。-1.0.1 修复采集音频未协商低延迟缓冲的问题,增加音频输入与队列诊断;保留 1.0.0 的功能与修复。+1.0.2 修复 PS5 断流后的重连:连续稳定播放 30 秒后恢复重试次数,等待主机释放旧会话,并保留跨重启日志;包含此前的采集音频修复。## 下载与运行-1. 在 [Releases](https://github.com/Likely7/Veyra-NRVideo/releases) 下载 **Veyra-1.0.1-win64-portable.zip**,不要下载 Source code。+1. 在 [Releases](https://github.com/Likely7/Veyra-NRVideo/releases) 下载 **Veyra-1.0.2-win64-portable.zip**,不要下载 Source code。2. 完整解压到一个可写文件夹,双击 **Veyra.exe**。无需安装 SDK、Python 或开发工具。3. 使用当前显卡驱动。要使用 NVIDIA NR、DLSS、RTX Video SR 和 NVENC,需兼容的 NVIDIA RTX 显卡;本版本主要在 RTX 5070 上验证。@@ -113,7 +113,7 @@ NR 与 DLSS 帧生成属于 **community experimental / 社区实验集成**,## 开发与许可-[构建说明](docs/BUILD.md) · [组件清单](docs/RUNTIME_COMPONENTS_1.0.1.md) · [第三方许可](THIRD_PARTY_NOTICES.md)+[构建说明](docs/BUILD.md) · [组件清单](docs/RUNTIME_COMPONENTS_1.0.2.md) · [第三方许可](THIRD_PARTY_NOTICES.md)Veyra 原有源码采用 [GPLv3](LICENSE);含串流的组合程序同时适用 [AGPLv3 与上游 OpenSSL 例外](licenses/remoteplay/CHIAKI_AGPL3_OPENSSL.txt)。应用源码对应版本标签,Release 另附串流依赖与 FFmpeg 对应源码包,普通用户无需下载。SDK、模型和运行时不进入源码仓库;Release 组件按各自许可与实验发布范围单独提供。diff --git a/README_EN.md b/README_EN.mdindex 807743cc..ab5d1581 100644--- a/README_EN.md+++ b/README_EN.md@@ -14,7 +14,7 @@ English | [简体中文](README.md)A Windows video player and capture-card enhancement tool. Play videos, process images, and preview capture devices with optional super resolution, NR enhancement, and frame generation.-[Download 1.0.1 Portable](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v1.0.1) · [Release Notes](docs/RELEASE_NOTES_1.0.1.md) · [Report an Issue](https://github.com/Likely7/Veyra-NRVideo/issues)+[Download 1.0.2 Portable](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v1.0.2) · [Release Notes](docs/RELEASE_NOTES_1.0.2.md) · [Report an Issue](https://github.com/Likely7/Veyra-NRVideo/issues)## Features@@ -30,11 +30,11 @@ A Windows video player and capture-card enhancement tool. Play videos, process iDaily mode focuses on watching. Professional mode expands the controls, diagnostics, and export tools without reopening the video. The application currently uses a Chinese interface.-Version 1.0.1 adds low-latency capture-audio buffer negotiation and input diagnostics, retaining the features and repairs from 1.0.0.+Version 1.0.2 improves PS5 reconnection: retry allowance renews after 30 seconds of continuous decoded video, transient console occupancy is retried, and logs survive restarts. Previous capture-audio fixes are retained.## Download and Run-1. Download **Veyra-1.0.1-win64-portable.zip** from [Releases](https://github.com/Likely7/Veyra-NRVideo/releases). The Source code archives are for developers.+1. Download **Veyra-1.0.2-win64-portable.zip** from [Releases](https://github.com/Likely7/Veyra-NRVideo/releases). The Source code archives are for developers.2. Extract the entire archive into a writable directory and run **Veyra.exe**. No SDK, Python, or development tools are needed.3. Use a current GPU driver. NVIDIA NR, DLSS, RTX Video SR, and NVENC require compatible NVIDIA RTX hardware; this version was primarily tested on an RTX 5070.@@ -107,7 +107,7 @@ NR and DLSS frame generation are **community-experimental integrations**, not NV## Development and License-[Build Instructions](docs/BUILD.md) · [Runtime Components](docs/RUNTIME_COMPONENTS_1.0.1.md) · [Third-Party Notices](THIRD_PARTY_NOTICES.md)+[Build Instructions](docs/BUILD.md) · [Runtime Components](docs/RUNTIME_COMPONENTS_1.0.2.md) · [Third-Party Notices](THIRD_PARTY_NOTICES.md)Original Veyra source is [GPLv3](LICENSE); the combined streaming program also falls under [AGPLv3 and the upstream OpenSSL exception](licenses/remoteplay/CHIAKI_AGPL3_OPENSSL.txt). Application source matches the release tag. The RemotePlay-source and FFmpeg-source assets provide dependency source and are not needed to run the player. SDKs, models, and runtimes are excluded from this source repository. Release components retain their separate licenses and experimental distribution boundaries.@@ -140,7 +140,7 @@ Thank you to these projects and their contributors. Integrated code, dependencie| [AMD FidelityFX SDK](https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK) | Optical flow and its D3D12 backend. || [Lucide](https://github.com/lucide-icons/lucide) | UI icons, retaining Lucide and Feather-derived license notices. || [Intel XeSS / XeLL](https://github.com/intel/xess) | Experimental XeSS frame generation and related runtime interfaces. |-| [NVIDIA DLSS](https://github.com/NVIDIA/DLSS), [RTX Video SDK](https://developer.nvidia.com/rtx-video-sdk), [Optical Flow SDK](https://developer.nvidia.com/opticalflow-sdk), [Video Codec SDK](https://developer.nvidia.com/video-codec-sdk) | Upscaling, optical flow, encoding and enhancement interfaces. Experimental NR components have separate identities and boundaries in [Runtime Components](docs/RUNTIME_COMPONENTS_1.0.1.md); this is not vendor certification. |+| [NVIDIA DLSS](https://github.com/NVIDIA/DLSS), [RTX Video SDK](https://developer.nvidia.com/rtx-video-sdk), [Optical Flow SDK](https://developer.nvidia.com/opticalflow-sdk), [Video Codec SDK](https://developer.nvidia.com/video-codec-sdk) | Upscaling, optical flow, encoding and enhancement interfaces. Experimental NR components have separate identities and boundaries in [Runtime Components](docs/RUNTIME_COMPONENTS_1.0.2.md); this is not vendor certification. || [vcpkg](https://github.com/microsoft/vcpkg) | Dependency builds, version records and license provenance. |Remote Play also depends on **OpenSSL, Opus, json-c, libevent, miniupnpc, curl, nanopb, Jerasure and gf-complete**. Their attribution and license notices are retained in [licenses/remoteplay](licenses/remoteplay), with corresponding source supplied in Releases.diff --git a/docs/BUILD.md b/docs/BUILD.mdindex 16091bd1..2cc67c19 100644--- a/docs/BUILD.md+++ b/docs/BUILD.md@@ -5,8 +5,8 @@## Requirements- Windows 11 x64, Visual Studio 2022 C++ tools, Windows SDK, CMake 3.24+, Ninja.-- Local FFmpeg development libraries matching avcodec63 / avformat63 / avutil61 / swresample7 / swscale10. Release 1.0.1 uses the LGPL vcpkg FFmpeg 9.0.1#1 build with the Veyra H.264 slice-capacity patch.-- The PS5 H.264 repair included in 1.0.1 requires the additional [slice-capacity patch and matching rebuild](../scripts/ffmpeg/README.md). Stock 9.0.1 D3D12 H.264 has a 32-slice limit; the tested PS5 stream uses 68. Preserve `veyra-local-build.json` alongside the original vcpkg provenance in corresponding-source packages. Older 0.0.5 assets remain unchanged.+- Local FFmpeg development libraries matching avcodec63 / avformat63 / avutil61 / swresample7 / swscale10. Release 1.0.2 uses the LGPL vcpkg FFmpeg 9.0.1#1 build with the Veyra H.264 slice-capacity patch.+- The PS5 H.264 repair included in 1.0.2 requires the additional [slice-capacity patch and matching rebuild](../scripts/ffmpeg/README.md). Stock 9.0.1 D3D12 H.264 has a 32-slice limit; the tested PS5 stream uses 68. Preserve `veyra-local-build.json` alongside the original vcpkg provenance in corresponding-source packages. Older 0.0.5 assets remain unchanged.- NVIDIA DLSS SDK 310.7.0, Optical Flow SDK 5.0.7, RTX Video SDK 1.1.0, and nv-codec-headers. Prepare these under their respective licenses in ignored local directories.- Intel XeSS SDK 3.0.2 for the XeSS presenter; AMD FidelityFX SDK 1.1.4 optical-flow/backend static libraries for the AMD flow option.- Local NR runtime and NGX project configuration for experimental NR. The source repository intentionally does not contain them.@@ -36,7 +36,7 @@ The NGX configuration lives in `runtime_local/config/ngx-local.json` for develop## Dependency Sources-Release 1.0.1 includes `Veyra-1.0.1-FFmpeg-source.zip` separately: the patched FFmpeg source, SPDX-verified vcpkg port and patches, notices, and configuration queried from the shipped DLL. It is not needed to run Veyra.+Release 1.0.2 includes `Veyra-1.0.2-FFmpeg-source.zip` separately: the patched FFmpeg source, SPDX-verified vcpkg port and patches, notices, and configuration queried from the shipped DLL. It is not needed to run Veyra.- FFmpeg: https://github.com/FFmpeg/FFmpeg/tree/n9.0.1 ; vcpkg port source recorded in the distributed `licenses/FFMPEG-SPDX.json`.- vcpkg FFmpeg port: https://github.com/microsoft/vcpkg/tree/55cd8b8a4f19d8e6ba2ad114c8acacc4af5915a0/ports/ffmpeg . Its patches and the LGPL notices are part of the corresponding-source material.@@ -52,16 +52,16 @@ Veyra and FidelityFX code are compiled into the executable; FFmpeg is dynamicallRun targeted tests and `scripts/gates/delivery.ps1`; each individual test must stay below300seconds. Physical capture and screen scanout require separate hardware verification. The legacy Loop gate is not part of the current process.```powershell-powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/package-portable.ps1 -Root . -Version 1.0.1 -OutputDirectory out/releases/1.0.1+powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/package-portable.ps1 -Root . -Version 1.0.2 -OutputDirectory out/releases/1.0.2```The packager accepts `-BuildDirectory` for an isolated build, checks the publisher's fixed input files, copies an explicit payload, and emits a ZIP, checksums, and component manifests. It refuses to overwrite an existing candidate. This build-time audit does not restrict user DLL replacement. Do not upload SDK headers, samples, libraries, private media, logs, or development archives with the source.-## PS5 in 1.0.1+## PS5 in 1.0.2-The release enables Remote Play; the default non-RemotePlay command above is a reduced build. Follow [REMOTEPLAY_BUILD_1.0.1.md](REMOTEPLAY_BUILD_1.0.1.md) for the full build, dependency source, patches and licensing.+The release enables Remote Play; the default non-RemotePlay command above is a reduced build. Follow [REMOTEPLAY_BUILD_1.0.2.md](REMOTEPLAY_BUILD_1.0.2.md) for the full build, dependency source, patches and licensing.-## GPU DIS (1.0.1 experimental option)+## GPU DIS (1.0.2 experimental option)The open-source subset in `third_party/gpu-dis` compiles with the existing WindowsSDK DXC; no additional GPU vendor SDK is required for DIS. `cmake/VeyraGpuDis.cmake`diff --git a/docs/RELEASE_1.0.2_EXECUTION.md b/docs/RELEASE_1.0.2_EXECUTION.mdnew file mode 100644index 00000000..f921da4b--- /dev/null+++ b/docs/RELEASE_1.0.2_EXECUTION.md@@ -0,0 +1,38 @@+# 1.0.2 重连修复与发布记录++用户授权修复并发布1.0.2;基线aad8ce4,开工标签checkpoint/ps5-retry-budget-20260913,施工codex/release-1.0.2。包含此前未发布的PS5占用重试、30秒首帧等待、具体错误提示及日志跨重启保留。++## 现场与设计++现场副本logs/ps5-network-20260913/incident.log和analysis.json仅保留本地。23:16:42前约60fps/47–51Mbps,之后完整输入与解码停在8116,缺包/传输/组帧错误增加;decodeBusy=-1、队列0,未见增强超时。用户确认PS5使用Wi-Fi,电脑走1Gbps以太网;事后12次ping均2–4ms无丢包,不能排除瞬时无线故障,也不能由上游统计直接认定路由器丢包。23:16:48软件因之前已累计重试3次而放弃,再次证明“一整个用户连接只许3次”不适用于持续游玩。++改为最多3次/连续故障:连续解码30秒、相邻帧间隔均小于1秒后恢复额度;断档、倒退时间、新会话重新计连续时间。保留累计重连次数用于sourceEpoch与历史隔离;UI/退避使用本轮次数,避免额度归零导致epoch回退或移位异常。1/2/4秒退避、用户停止优先、明确拒绝不重试仍保留。仅测试显式环境变量可在额度恢复后再次停止测试自身传输,以验证第二次断流;正常GUI不设置该变量。++## 验证与发布++待补构建、离线回归、重复断流实机、包内启动和上传校验结果。七个增强运行文件与patched FFmpeg不变,源码/运行包分离,发布完整便携ZIP、RemotePlay/FFmpeg对应源码ZIP及各自SHA256文件。所有测试单次不超过300秒。不宣称Wi-Fi断流根因已修复。++### 实际构建与恢复回归++- `cmd.exe /c out\ps5-reconnect-build.cmd`通过相关产品/核心测试构建;`cmd.exe /c out\gpu-dis-build-all.cmd`完整21步增量构建通过。EXE ProductVersion=1.0.2,SHA256 B693547F722C01E583F1B549507E355540618B628740147154A212F61D3BFFE2;桌面快捷方式指向同一out/remoteplay/product-repair/veyra.exe。+- `scripts/run-short-test.ps1 -Exe out/remoteplay/core-windows/veyra_remoteplay_core_tests.exe -TimeoutSeconds 30 -LogPrefix logs/release-1.0.2/core`:77/77。新增三次耗尽后连续30秒恢复、累计编号保持3→4、断续帧不恢复额度检查。此前aad8ce4的107项产品合同/GUI日志保留/手动实机记录另见PS5_RECONNECT_REPAIR文档,本轮不冒充重跑。+- `scripts/run-short-test.ps1 -Exe out/remoteplay/product-repair/veyra_live_presentation_tests.exe -Arguments @('--last-paired-ps5','logs/release-1.0.2/repeat-outage','--repeat-outage') -TimeoutSeconds 150 -LogPrefix logs/release-1.0.2/repeat-outage`:115秒观察PASS,episodes=2、resumedWithFgAndAudio=1、postHealthySamples=2319、idle=1。第一次15:23:51.837Z恢复;15:24:21.847Z额度续期,随即测试第二次停止自身传输;15:24:31.655Z再次出帧;15:25:01.683Z再次续期。是可控故障,不是复现Wi-Fi自然断流。+- 实机NR Feature18 Create=0x1/非空handle/SEH=0,DLSSG 3840x2160 Create=0x1、Release=0x1、evaluates=4851。第二次恢复后呈现约100–118fps,音频输出推进;没有宣称固定120fps或主观手柄/声音验收。++### 便携包与源码++`scripts/package-portable.ps1 -Root . -Version 1.0.2 -OutputDirectory out/releases/1.0.2 -BuildDirectory out/remoteplay/product-repair`成功。`package-remoteplay-source.py --version 1.0.2 --output out/releases/1.0.2/Veyra-1.0.2-RemotePlay-source.zip`与`package-ffmpeg-source.py --version 1.0.2 --prefix C:/veyra-deps/installed/x64-windows --vcpkg C:/veyra-deps/vcpkg --source C:/veyra-deps/ffmpeg-ps5-slices-source --output out/releases/1.0.2/Veyra-1.0.2-FFmpeg-source.zip`成功。Python使用Codex本地runtime。++| 资产 | 字节 | SHA256 |+| --- | ---: | --- |+| Veyra-1.0.2-win64-portable.zip | 303913945 | 12D8B1F3CA891EF14B76117E43093A814CC8C2DC76D874B17B62FFD2C10D152D |+| Veyra-1.0.2-RemotePlay-source.zip | 143744092 | 9DA3A6B6CD51BB137249311765457B6C4B708F5159AEA679E9DC69969D3C152E |+| Veyra-1.0.2-FFmpeg-source.zip | 23253198 | 3E885B2A9FE33867B9F2C9DF0C098A32CEF480083C2391A40E9E2691C15AD747 |++各附.sha256,共六个发布资产。便携99文件,远程源码17714文件,FFmpeg源码10451文件;路径/逐文件大小与哈希/源码禁用二进制检查通过,FFmpeg上游.mp4后缀文本参考按内容核实保留。README相对链接通过。七运行文件身份与1.0.1一致,原版签名Valid、社区NR仍HashMismatch,许可证见RUNTIME_COMPONENTS_1.0.2;FFmpeg avcodec保持0710F0D87A7FFCC9F998F1A35D0500345F6C66EB9A5A39C51D60D293142BD84F。++独立便携smoke初次7秒检查在原版DLSS组合失败:初始化和自动seek后只有1个处理帧、0生成帧,NGX没有失败,但测试结束前只走完预热。保留logs/release-1.0.2/portable-smoke,不计作通过。脚本新增可选CaseSeconds(默认仍7,范围7–20),本轮使用15;保持真实生成数、模块路径、截图、manifest可移除等原断言及35秒单项硬超时,没有放宽产品FG准入。++最终命令:`powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/acceptance/portable-smoke.ps1 -PackageDirectory out/releases/1.0.2-verify/Veyra-1.0.2-win64-portable -InputFile loop/local/fixed_clips/test_av_1080p.mp4 -OutputDirectory logs/release-1.0.2/portable-smoke-15s -CaseSeconds 15`。5/5 PASS,每项15.54–15.85秒;基线817帧,社区528处理/526生成,原版562/560,Video SR707/665。精简PATH、独立解压目录、manifest临时禁用仍加载包内模块成功;结果和失败日志均保留。未改ZIP中的产品文件,源码包只需随标签提供新增测试脚本,无依赖源码变化。++源码改变:StreamRecovery.h、RemotePlaySessionSource.cpp、CoreTests.cpp、LivePresentationTests.cpp、portable-smoke.ps1、版本/README/构建组件说明与本记录。上一修复aad8ce4同时随本次标记发布。git diff --check及变更路径检查通过,不含SDK、运行二进制、日志或凭据。下一步推送main/版本标记、上传六资产、核验服务端SHA256后公开为latest。diff --git a/docs/RELEASE_NOTES_1.0.2.md b/docs/RELEASE_NOTES_1.0.2.mdnew file mode 100644index 00000000..56c7c6c9--- /dev/null+++ b/docs/RELEASE_NOTES_1.0.2.md@@ -0,0 +1,33 @@+# Veyra 1.0.2++## 中文++下载 **Veyra-1.0.2-win64-portable.zip**,完整解压后运行 **Veyra.exe**。其余源码包供开发者使用。++- 修复 PS5 恢复播放后仍永久耗尽重连次数的问题。连续正常解码30秒后,下一次断流重新获得最多3次重试;短暂恢复一两帧不会刷新次数。+- 手动连接遇到主机暂时被旧串流会话占用时,会有限等待重试,不再立即放弃。不强制抢占其他用户的会话。+- 每次重新建立会话都给予30秒等待首帧,避免沿用旧会话的6秒断流计时;认证拒绝等明确终止仍停止重试。+- 连接失败显示具体原因和错误码,不再一律要求重新配对。增加会话清理日志;重启保留之前的日志,多实例分别记录。+- 保留1.0.1的采集音频缓冲修复,以及现有PS5、增强、补帧、截图和导出功能。++这是恢复逻辑修复,不保证消除Wi-Fi丢包或主机断流。电脑和PS5优先使用有线连接。++升级:退出旧版,解压到新目录运行。已保存的PS5配对保留在当前Windows用户目录,无需重新输入配对码。需要保留增强设置时迁移 `runtime_local/*.v1` 与 `veyra.ini`。++七个增强运行文件与实验功能边界不变,社区NR仍标注 `HashMismatch`;允许用户替换DLL。SDK/运行时不进入源码Git,附FFmpeg和串流依赖对应源码、补丁及许可证。PS5 H.264硬解切片补丁继续保留。++## English++Download **Veyra-1.0.2-win64-portable.zip**, extract it completely and run **Veyra.exe**. The source archives are for developers.++- Fixed PS5 retry allowance remaining exhausted after playback recovered. Thirty seconds of continuous decoded progress renews up to three retries for the next outage. Brief recovery does not renew the allowance.+- Manual connections now retry temporary console session occupancy within a bounded allowance, without forcibly taking over another session.+- Every new session receives a 30-second first-frame window instead of inheriting the previous session's six-second stall deadline. Explicit terminal failures still stop retries.+- Connection failures retain their actual reason and codes instead of always suggesting pairing again. Added teardown diagnostics; GUI logs survive restarts and concurrent instances use separate files.+- Retains the capture-audio buffering repair from 1.0.1 and existing streaming, enhancement, frame generation, screenshot and export features.++These changes improve recovery; they do not eliminate Wi-Fi packet loss or console outages. Wired networking is recommended for the PC and PS5.++Close the old version and extract to a new directory. Saved pairing remains in the Windows user profile. Presets can be migrated using `runtime_local/*.v1` and `veyra.ini`.++The same seven enhancement runtimes and experimental boundaries remain. Community NR retains `HashMismatch`; user DLL replacement is allowed. Proprietary SDKs/runtimes stay out of source Git. Matching streaming and patched FFmpeg source, patches and licenses are supplied separately, including the PS5 H.264 hardware-decoding slice fix.diff --git a/docs/REMOTEPLAY_BUILD_1.0.2.md b/docs/REMOTEPLAY_BUILD_1.0.2.mdnew file mode 100644index 00000000..f4a0ddbc--- /dev/null+++ b/docs/REMOTEPLAY_BUILD_1.0.2.md@@ -0,0 +1,30 @@+# Remote Play build and corresponding source / 串流构建与对应源码++1.0.2 portable enables VEYRA_ENABLE_REMOTEPLAY. The default build without that option does not include PS5.++## Sources and licenses++Application: https://github.com/Likely7/Veyra-NRVideo/tree/v1.0.2+Chiaki: https://github.com/streetpea/chiaki-ng at 0e16950165f06e5c3291537c2eeba6e852be7120, with scripts/remoteplay/patches/0001 and 0002. AGPL-3.0-only with upstream OpenSSL exception. The combined program is subject to this license as well as the retained component notices. Original Veyra source remains GPLv3.++The Release's RemotePlay-source ZIP supplies the clean pinned Chiaki tree and recursive submodule files, reviewed patches, installed dependency SPDX records, patched source directories and vcpkg port recipes for json-c, libevent, miniupnpc, OpenSSL, Opus and SDL3. It also includes the local FidelityFX source used by the existing static optical flow backend. No NVIDIA or Intel SDK, runtime, model, private configuration or credential is included. FFmpeg source is a separate asset.++licenses/remoteplay/ contains the retained notices. source-manifest.json records source hashes; dependency pins and port provenance are also retained. The source bundle is not required by ordinary users.++## Build++Use Visual Studio 2022 x64 tools, CMake, Ninja, Python and protobuf tooling. FFmpeg and enhancement SDK requirements remain in BUILD.md.++1. Clone Veyra at v1.0.2.+2. Clone Chiaki recursively and checkout the above pin, then update submodules recursively. The supplied clean source and submodule manifest provide an offline reference of the exact source.+3. Prepare static dependencies with the supplied vcpkg port versions and x64-windows-static triplet. The release used C:/veyra-deps/remoteplay-installed/x64-windows-static. The source archive's installed-status.txt and port recipes record versions; adapt paths to your machine.+4. Run scripts/remoteplay/build-native.ps1 with -ChiakiCheckout, -StageDirectory, -PrefixPath, -ProtocPath and -PkgConfigPath. This creates a separate stage, applies both patches and verifies its complete contents.+5. Run scripts/build.ps1 -Root . -Preset x64-release -RemotePlay -BuildDirectory out/build/release-1.0.2 with the same -ChiakiCheckout, -ChiakiStage, -RemotePlayPrefixPath, -ProtocPath and -PkgConfigPath. This explicitly enables the real backend and compiles it from source.++The 1.0.2 build uses static MSVC runtime and static Chiaki/SDL/dependencies, with the existing five dynamic FFmpeg libraries. System networking, WinHTTP, DPAPI, WASAPI, DirectX and driver libraries are not redistributed.++The source bundle's vcpkg-port-scripts directory includes the port helper sources and x64-windows-static triplet. Source builds still require ordinary compiler/build tools and separately licensed enhancement SDKs; no proprietary SDK is included in corresponding-source assets.++## Scope++The PS5 connection and normal USB controller path have user test evidence. Build/offline GPU tests do not prove Sony authorization, physical HDR output, Bluetooth support on all devices or uninterrupted long sessions. README and release notes preserve these limits.diff --git a/docs/RUNTIME_COMPONENTS_1.0.2.md b/docs/RUNTIME_COMPONENTS_1.0.2.mdnew file mode 100644index 00000000..657e7626--- /dev/null+++ b/docs/RUNTIME_COMPONENTS_1.0.2.md@@ -0,0 +1,60 @@+# Veyra 1.0.2 Runtime Components++发布包组件清单 / Shipped components. NVIDIA/Intel DLLs are separate Release assets, never source Git content. NR and DLSS FG are community-experimental integrations, not vendor endorsement or certification.++## Locations and Replacement++NVIDIA components: `runtime/experimental/`. XeSS/XeLL: `runtime_local/intel/experimental/`. Exit Veyra before replacing a DLL and preserve its filename. No runtime hash, signature, or manifest lock is enforced. Manifests describe the original package only; users do not need to edit them after replacement. ABI/API and hardware compatibility still determine whether a feature works.++允许自行替换DLL,但替换不代表兼容。出现初始化错误时还原原件或关闭对应增强。清单是发布记录,不是加载锁。退出软件并删除解压目录即可卸载;需要保留设置时先备份`runtime_local`中的设置文件。移除某个增强DLL会使对应功能不可用。++## NVIDIA and Intel++The six original publisher-provided DLLs below have valid Authenticode signatures. The additional community NR variant does NOT: its recorded status is `HashMismatch`. Names and SHA256 describe the approved files used to build this release. The JSON manifests also record file size, signer, source category, and removability.++| File | Fixed file version | Source / use |+| --- | --- | --- |+| nvngx_dlss.dll | 310.7.0.0 | Official DLSS SDK 310.7.0 release runtime; DLSS SR |+| nvngx_dlssg.dll | 310.7.0.0 | DLSS SDK release runtime; experimental Veyra DLSS FG integration |+| nvngx_dlssnr.dll | 310.8.0.0 | User-provided pinned experimental NR runtime; 165840496 bytes |+| nvngx_vsr.dll | 1.6.0.0 | RTX Video SDK 1.1.0; RTX Video SR |+| libxess_fg.dll | 1.3.1.78 | Official Intel XeSS SDK 3.0.2; preview FG |+| libxell.dll | 1.3.2.10 | Official Intel XeSS SDK 3.0.2; XeLL timing |++```text+nvngx_dlss.dll BE6E434A94CA32499515EB62CA0E6C274526055D568D0426E4C652DCDFB6EE6E+nvngx_dlssg.dll 135EAF0733C1E37381A8C28ABCF7A862404A54132B81787C04E35D09EFC5E36F+nvngx_dlssnr.dll E16BCF15E16E13F527491CDF7845B2FE6521A738D8F7C9C721866A8496E1FC8E+nvngx_vsr.dll C3D88EEA5FF7A548EDEFA66414CF6E77464D0947277C904F324DD23ABF58A1ED+libxess_fg.dll EC5E0C65E075570C6EDE72618BB666D0BE0C2E10B2EA9762C0FE8CB8E375AB27+libxell.dll D2030DCD694FDA8F2EC7E044B13E6DB8F0B56D4BA9113A5EFAD334E3F3DED8C7+```++NVIDIA license files: `licenses/NVIDIA_RTX_SDK_LICENSE.txt`, `NVIDIA_RTX_VIDEO_SDK_LICENSE.pdf`, `NVIDIA_OPTICAL_FLOW_SDK_LICENSE.pdf`. Intel terms: `licenses/INTEL_XESS_LICENSE.txt`, `INTEL_THIRD_PARTY_PROGRAMS.txt`. Experimental NR distribution follows the publisher's explicitly approved Release-only policy; the included official SDK terms are not a claim that the experimental runtime has a general redistribution grant.++## Community NR Variant++The user-selected community NR file is also included, unmodified, in `runtime/experimental/nr-community/nvngx_dlssnr.dll`. Source category: user-provided community-modified RTX40/RTX50 runtime. File version: 310.8.0.0. Size: 165840496 bytes. SHA256: `984BEE0F775C277D5829B8FD6775D53A7B0F75396C852B3AAF06A18375F81014`. Authenticode: **HashMismatch**; retained signer metadata does not make this a valid NVIDIA signature.++社区版为用户指定的实验文件,本次明确授权随Release分发;与原版独立存放,默认仍选原版。不能把NVIDIA SDK许可证解释为对社区修改文件的通用授权。未修改、重签名或隐藏该文件。要移除社区版,先切回原版、退出Veyra,再删除`nr-community`目录;主包manifest仅为发布记录,无需修改。RTX40实机兼容性未验证,不将本机RTX5070结果扩大为全系列支持。++Both variants are recorded with distinct paths in `runtime/experimental/release-runtime-manifest.json`. Delete only the community subdirectory to remove that variant. Neither DLL, the SDKs, nor models are part of source Git history.++## Other Dependencies++- FFmpeg 9.0.1#1: `avcodec-63.dll`, `avformat-63.dll`, `avutil-61.dll`, `swresample-7.dll`, `swscale-10.dll`; LGPL configuration. Full notices and source provenance are in `licenses/FFMPEG-COPYRIGHT.txt`, `FFMPEG-SPDX.json`, and [BUILD.md](BUILD.md).+- Microsoft `vcruntime140.dll`, `vcruntime140_1.dll`, `msvcp140.dll`: application-local x64 Visual C++ redistributables from the Visual Studio Redistributables directory; needed by FFmpeg and XeSS. Windows11 supplies UCRT.+- AMD FidelityFX optical flow: linked into Veyra, no AMD runtime DLL or NR model required. MIT terms in `licenses/AMD_FIDELITYFX_LICENSE.txt`.+- Lucide icon paths: built into Veyra, with ISC/MIT terms in `licenses/LUCIDE-LICENSE.txt`.+- Own compiled shader files: `shaders/*.dxil`. No local SDK headers or samples are required at runtime.++GPU drivers supply `nvofapi64.dll` and `nvEncodeAPI64.dll`; they are not redistributed. ReShade/RenoDX add-ons, FRUC, SDK archives, development libraries, depth weights, and AMD NR networks are not part of this package.+++## PS5 Remote Play in 1.0.2++Chiaki core, SDL3, Opus, OpenSSL, json-c, libevent, miniupnpc, curl, nanopb, Jerasure and gf-complete are linked statically; no extra controller SDK installation is required. The pinned Chiaki revision is 0e16950165f06e5c3291537c2eeba6e852be7120. The combined executable must comply with AGPLv3 and upstream OpenSSL exception, in addition to component notices. See licenses/remoteplay/ in the package, THIRD_PARTY_NOTICES.md, and the release's RemotePlay-source archive for source, build recipes, provenance and dependency notices. Pairing credentials and personal configuration are never packaged.++GPU DIS: the open-source DIS subset is compiled into Veyra, with shaders under shaders/dis/. Apache/BSD terms and provenance are included under licenses/gpu-dis/. No additional runtime DLL or model is needed.++FFmpeg includes the Veyra PS5 H.264 32→256 slice capacity patch. FFMPEG-VEYRA-BUILD.json identifies the five rebuilt DLLs; the matching FFmpeg-source asset includes actual patched source and rebuild instructions.diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 17e7db7a..42723d7a 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -1890,3 +1890,11 @@ GitHub Release https://github.com/Likely7/Veyra-NRVideo/releases/tag/v1.0.0 于用户明确停流授权实机:旧可控自动恢复PASS,未复现自然停帧;新版同一进程取消恢复后手动重连两轮PASS,真实捕获占用码4,第二轮3次占用后恢复,画面/FG/音频均推进且idle=1。新版可控自动恢复PASS(attempt2,463健康采样),真实NR/4K DLSSG Create=0x1、SEH=0。core75/75、contract107/0、boundary通过,完整99步构建通过;双GUI日志重启检查PASS。每次测试210秒以内上限。详细命令、修改清单、证据及限制见docs/PS5_RECONNECT_REPAIR_2026-09-13.md,logs/ps5-reconnect-20260913/。已正常关闭用户空闲旧GUI,更新桌面快捷方式的同一EXE,SHA256 23791CE1A316A4CFDAA9D292502E4620CB9E74BAA07E5310F82D843A53FAE326;FFmpeg切片补丁不变。无SDK/二进制/配对进入Git,不改已发布1.0.1,不push。下一步用户长时游玩确认;最初自然停帧原因仍需新日志,不能宣称全部断流根除。++## 2026-09-13 1.0.2 连续故障重试额度修复与发布准备++新现场23:16:42完整输入停止、缺包/组帧/传输错误激增,用户确认PS5 Wi-Fi,事后ping正常不能排除瞬时故障;23:16:48因累计3次已耗尽而不再重连。用户授权修复并发布1.0.2,checkpoint/ps5-retry-budget-20260913,codex/release-1.0.2。改为连续解码30秒、无1秒断档后恢复本轮3次重试;累计连接编号不归零,sourceEpoch保持隔离,退避和UI改用本轮次数。包含此前aad8ce4的占用重试/首帧等待/日志保留。++完整构建21步通过;核心77/77;真实PS5两次可控断流115秒PASS,第二次在稳定30秒续期后注入,画面/NR/SR/DLSSG/音频恢复,2319健康采样,idle=1,NGX Create/Release=0x1、SEH0。便携初次7秒smoke在原版FG初始化/seek后仅预热即结束,不能计通过;添加可选测试时长参数,15秒观察5/5通过,保留真实生成及包内模块路径断言。EXE B693547F722C01E583F1B549507E355540618B628740147154A212F61D3BFFE2,桌面同路径已为1.0.2。++七运行文件和patched FFmpeg不变;便携/两对应源码ZIP及SHA256共六资产,逐文件和源码排除检查通过,未放入SDK/用户媒体/凭据。更新双语README及Release Notes、组件和构建说明。详见docs/RELEASE_1.0.2_EXECUTION.md,证据logs/release-1.0.2。软件恢复改善不等于无线故障根治。下一步推送并核验公开发布,后续由用户长时网络环境验收。diff --git a/include/veyra/remoteplay/StreamRecovery.h b/include/veyra/remoteplay/StreamRecovery.hindex f49bde38..a755295d 100644--- a/include/veyra/remoteplay/StreamRecovery.h+++ b/include/veyra/remoteplay/StreamRecovery.h@@ -1,13 +1,19 @@#pragma once#include <cstdint>namespace veyra::remoteplay {-// Local monotonic milliseconds. Bounded for the entire user-started session;-// one recovered frame does not replenish reconnects and create a retry loop.+// Local monotonic milliseconds. Three retries per outage; only sustained+// decoded progress replenishes them. Lifetime attempts remain monotonic so+// source epochs cannot collide when the retry allowance is renewed.class StreamRecovery {public:enum class Action {Wait,Keyframe,Reconnect,Fail};- void beginAttempt(int64_t now){lastProgress_=now;keyframes_=0;currentVideo_=false;}- void frame(int64_t now){lastProgress_=now;keyframes_=0;everVideo_=currentVideo_=true;}+ void beginAttempt(int64_t now){lastProgress_=now;healthySince_=-1;keyframes_=0;currentVideo_=false;}+ bool frame(int64_t now){+ if(!currentVideo_||healthySince_<0||now<lastProgress_||now-lastProgress_>=1000)healthySince_=now;+ lastProgress_=now;keyframes_=0;everVideo_=currentVideo_=true;+ if(episodeRetries_&&now-healthySince_>=30000){episodeRetries_=0;return true;}+ return false;+ }Action poll(int64_t now,bool loginPin,bool failed,bool retryAllowed=true,bool startupRetryAllowed=false){const auto silent=now-lastProgress_;if(loginPin)return silent>=120000?Action::Fail:Action::Wait;@@ -15,15 +21,16 @@ public:// Each rebuilt session needs its own handshake/first-frame allowance.// A previous session having video must not shorten a new handshake.if(failed||silent>=(currentVideo_?6000:30000)){- if((!everVideo_&&!(failed&&startupRetryAllowed))||reconnects_>=3)return Action::Fail;- ++reconnects_;return Action::Reconnect;+ if((!everVideo_&&!(failed&&startupRetryAllowed))||episodeRetries_>=3)return Action::Fail;+ ++episodeRetries_;++reconnects_;return Action::Reconnect;}if(currentVideo_&&keyframes_<2&&silent>=1000+int64_t(keyframes_)*2000){++keyframes_;return Action::Keyframe;}return Action::Wait;}unsigned reconnects()const{return reconnects_;}+ unsigned episodeRetries()const{return episodeRetries_;}private:- int64_t lastProgress_=0;unsigned keyframes_=0,reconnects_=0;+ int64_t lastProgress_=0,healthySince_=-1;unsigned keyframes_=0,reconnects_=0,episodeRetries_=0;bool everVideo_=false,currentVideo_=false;};}diff --git a/scripts/acceptance/portable-smoke.ps1 b/scripts/acceptance/portable-smoke.ps1index 4a74011f..47acd2ac 100644--- a/scripts/acceptance/portable-smoke.ps1+++ b/scripts/acceptance/portable-smoke.ps1@@ -1,4 +1,4 @@-param([Parameter(Mandatory=$true)][string]$PackageDirectory,[Parameter(Mandatory=$true)][string]$InputFile,[Parameter(Mandatory=$true)][string]$OutputDirectory)+param([Parameter(Mandatory=$true)][string]$PackageDirectory,[Parameter(Mandatory=$true)][string]$InputFile,[Parameter(Mandatory=$true)][string]$OutputDirectory,[ValidateRange(7,20)][int]$CaseSeconds=7)$ErrorActionPreference='Stop'# A PowerShell 7 parent may omit Windows PowerShell's Utility module from the# inherited module paths. Load this host's hashing/JSON cmdlets explicitly.@@ -23,7 +23,7 @@ try {@{name='video-sr-nr-fg';args=@($inputPath,'--video-sr','1','--nr','--fg','--realtime');modules=@('nvngx_dlssnr.dll','nvngx_dlssg.dll')})) {$name=$case.name- $argv=@($case.args)+@('--smoke-seconds','7')+ $argv=@($case.args)+@('--smoke-seconds',"$CaseSeconds")if($name -ne 'empty'){$argv+=@('--smoke-controls','--smoke-save',"$output/$name.jpg")}$p=Start-Process -FilePath $exe -ArgumentList @($argv|ForEach-Object{'"'+$_+'"'}) -WorkingDirectory $env:TEMP -WindowStyle Hidden -PassThru -RedirectStandardOutput "$output/$name.stdout.log" -RedirectStandardError "$output/$name.stderr.log"$handle=$p.Handlediff --git a/src/source/RemotePlaySessionSource.cpp b/src/source/RemotePlaySessionSource.cppindex 60eeb44a..c25ae8c7 100644--- a/src/source/RemotePlaySessionSource.cpp+++ b/src/source/RemotePlaySessionSource.cpp@@ -19,6 +19,7 @@ bool RemotePlaySessionSource::connect(RemotePlayConnectDesc desc) {void RemotePlaySessionSource::run(std::stop_token stop, RemotePlayConnectDesc desc) {RemotePlaySource source;remoteplay::StreamRecovery recovery;+ bool repeatedTestDisconnect=false;const auto milliseconds=[] {return remoteplay::monotonic100ns()/10000;};// Keep the existing in-memory credentials only for this user-started run.// Their move-only destructor wipes them; never reread another saved profile.@@ -108,7 +109,14 @@ void RemotePlaySessionSource::run(std::stop_token stop, RemotePlayConnectDesc defirstFrame=false;publishDecoded(frame,packet,source.info());lastFrame=now;- recovery.frame(milliseconds());+ const bool renewed=recovery.frame(milliseconds());+ if(renewed){+ log::info("remoteplay-recovery",std::format("retry allowance renewed after 30s continuous decoded progress; lifetimeAttempts={}",recovery.reconnects()));+ if(!repeatedTestDisconnect&&GetEnvironmentVariableW(L"VEYRA_TEST_REMOTEPLAY_REPEAT_OUTAGE",nullptr,0)){+ repeatedTestDisconnect=true;const auto r=source.disconnectTransportForTest();+ log::warn("remoteplay-recovery-test",std::format("second owned transport stop after renewal ok={} code={}",r.ok,r.code));+ }+ }{std::lock_guard lock(mutex_);recovery_.active=false;recovery_.message.clear();}if(testDisconnectFrames&&!testDisconnected&&snapshot.decodedFrames>=testDisconnectFrames){testDisconnected=true;const auto r=source.disconnectTransportForTest();@@ -137,7 +145,7 @@ void RemotePlaySessionSource::run(std::stop_token stop, RemotePlayConnectDesc deready_.notify_all();}if(retry&&!stop.stop_requested()){- std::lock_guard lock(mutex_);recovery_={true,recovery.reconnects(),std::format(L"串流中断,正在重新连接({}/3)…",recovery.reconnects())};+ std::lock_guard lock(mutex_);recovery_={true,recovery.episodeRetries(),std::format(L"串流中断,正在重新连接({}/3)…",recovery.episodeRetries())};latest_.reset();pendingControllers_.clear();controller_={};feedback_={};}log::info("remoteplay-recovery",std::format("teardown begin attempt={} retry={} cancelled={}",recovery.reconnects(),retry,stop.stop_requested()));@@ -149,7 +157,7 @@ void RemotePlaySessionSource::run(std::stop_token stop, RemotePlayConnectDesc deif(!retry||stop.stop_requested())break;log::warn("remoteplay-recovery",std::format("old session joined; reconnect={} using existing in-memory pairing",recovery.reconnects()));// Interruptible 1/2/4 second backoff; manual Stop prevents the next start.- for(unsigned i=0;i<(1u<<(recovery.reconnects()-1))*20&&!stop.stop_requested();++i)std::this_thread::sleep_for(std::chrono::milliseconds(50));+ for(unsigned i=0;i<(1u<<(recovery.episodeRetries()-1))*20&&!stop.stop_requested();++i)std::this_thread::sleep_for(std::chrono::milliseconds(50));if(stop.stop_requested())break;}{std::lock_guard lock(mutex_);recovery_.active=false;}diff --git a/tests/integration/LivePresentationTests.cpp b/tests/integration/LivePresentationTests.cppindex a403e84e..6e497211 100644--- a/tests/integration/LivePresentationTests.cpp+++ b/tests/integration/LivePresentationTests.cpp@@ -17,7 +17,8 @@ int wmain(int argc,wchar_t**argv){#ifdef VEYRA_ENABLE_REMOTEPLAY// Explicit opt-in; uses existing local pairing without changing it. Runs// the actual shared engine, audio endpoint, GPU admission and presenter.- if((argc==3||(argc==4&&(std::wstring_view(argv[3])==L"--reconnect"||std::wstring_view(argv[3])==L"--cancel-reconnect"||std::wstring_view(argv[3])==L"--manual-reconnect")))&&std::wstring_view(argv[1])==L"--last-paired-ps5"){+ if((argc==3||(argc==4&&(std::wstring_view(argv[3])==L"--reconnect"||std::wstring_view(argv[3])==L"--cancel-reconnect"||std::wstring_view(argv[3])==L"--manual-reconnect"||std::wstring_view(argv[3])==L"--repeat-outage")))&&std::wstring_view(argv[1])==L"--last-paired-ps5"){+ const bool repeatOutage=argc==4&&std::wstring_view(argv[3])==L"--repeat-outage";const bool manualReconnect=argc==4&&std::wstring_view(argv[3])==L"--manual-reconnect";const bool reconnect=argc==4,cancelReconnect=reconnect&&(std::wstring_view(argv[3])==L"--cancel-reconnect"||manualReconnect);const auto dir=remoteplay::profileDirectory();wchar_t name[80]{};@@ -31,10 +32,12 @@ int wmain(int argc,wchar_t**argv){engine::PlayerOptions options;options.nr=options.sr=options.fg=true;options.fgMultiplier=2;options.settings.videoSrQuality=2;source::RemotePlayConnectDesc request;request.request=std::move(*saved);request.request.video={1920,1080,60,80000,remoteplay::Codec::H264};request.decodeMode=source::RemotePlayConnectDesc::DecodeMode::Hardware;if(reconnect)SetEnvironmentVariableW(L"VEYRA_TEST_REMOTEPLAY_DISCONNECT_AFTER_FRAMES",cancelReconnect?L"120":L"600");+ if(repeatOutage)SetEnvironmentVariableW(L"VEYRA_TEST_REMOTEPLAY_REPEAT_OUTAGE",L"1");engine.openRemotePlay(window,std::move(request),options);const auto start=std::chrono::steady_clock::now();unsigned overloadSamples=0,overloadTimings=0;double early=-1,late=-1;uint64_t maxGenerated=0;bool failed=false;int lastSecond=-1;+ unsigned recoveryEpisodes=0;bool wasRecovering=false;bool sawRecovery=false,resumed=false,cancelled=false,playedBefore=false;uint64_t recoveryFrames=0,recoveryGenerated=0;unsigned attempts=0,postHealthySamples=0;- while(std::chrono::steady_clock::now()-start<(reconnect?50s:120s)){+ while(std::chrono::steady_clock::now()-start<(repeatOutage?115s:reconnect?50s:120s)){const int second=int(std::chrono::duration_cast<std::chrono::seconds>(std::chrono::steady_clock::now()-start).count());SetEnvironmentVariableW(L"VEYRA_TEST_VIDEO_WORK_MS",!reconnect&&second>=30&&second<38?L"35":nullptr);MSG msg;while(PeekMessageW(&msg,nullptr,0,0,PM_REMOVE)){TranslateMessage(&msg);DispatchMessageW(&msg);}@@ -42,6 +45,7 @@ int wmain(int argc,wchar_t**argv){maxGenerated=std::max(maxGenerated,s.generated);attempts=std::max(attempts,s.remoteReconnectAttempts);if(!sawRecovery&&s.frames>30&&s.generated>20)playedBefore=true;+ if(s.remoteRecovering&&!wasRecovering)++recoveryEpisodes;wasRecovering=s.remoteRecovering;if(s.remoteRecovering){sawRecovery=true;recoveryFrames=s.frames;recoveryGenerated=s.generated;}if(sawRecovery&&!s.remoteRecovering&&attempts>=1&&attempts<=3&&s.frames>recoveryFrames+60&&s.metrics.flow.validGeneratedFps>10&&s.captureAudio.bufferedMs>0)resumed=true;if(resumed&&s.frames>recoveryFrames+300&&s.generated>recoveryGenerated+100&&s.nrActive&&s.srActive&&s.captureAudio.running&&s.captureAudio.error.empty())++postHealthySamples;@@ -54,6 +58,7 @@ int wmain(int argc,wchar_t**argv){}SetEnvironmentVariableW(L"VEYRA_TEST_VIDEO_WORK_MS",nullptr);SetEnvironmentVariableW(L"VEYRA_TEST_REMOTEPLAY_DISCONNECT_AFTER_FRAMES",nullptr);+ SetEnvironmentVariableW(L"VEYRA_TEST_REMOTEPLAY_REPEAT_OUTAGE",nullptr);const auto final=engine.snapshot();engine.stop();const auto stopDeadline=std::chrono::steady_clock::now()+10s;while(!engine.idle()&&std::chrono::steady_clock::now()<stopDeadline)std::this_thread::sleep_for(10ms);if(reconnect){@@ -83,8 +88,8 @@ int wmain(int argc,wchar_t**argv){}// Observe beyond the first retry backoff: Stop must not reopen the session.if(cancelReconnect)std::this_thread::sleep_for(2s);- const bool ok=!failed&&engine.idle()&&sawRecovery&&attempts>=1&&attempts<=3&&(cancelReconnect?cancelled:playedBefore&&resumed&&postHealthySamples>=250&&final.captureAudio.compensationMs<150);- std::cout<<(ok?"PASS ":"FAIL ")<<"PS5 owned transport interruption playedBefore="<<playedBefore<<" recovery="<<sawRecovery<<" attempts="<<attempts<<" resumedWithFgAndAudio="<<resumed<<" postHealthySamples="<<postHealthySamples<<" manualCancel="<<cancelled<<" idle="<<engine.idle()<<std::endl;+ const bool ok=(!repeatOutage||(recoveryEpisodes>=2&&!final.remoteRecovering&&final.frames>recoveryFrames+300&&final.metrics.flow.validGeneratedFps>10))&&!failed&&engine.idle()&&sawRecovery&&attempts>=1&&attempts<=3&&(cancelReconnect?cancelled:playedBefore&&resumed&&postHealthySamples>=250&&final.captureAudio.compensationMs<150);+ std::cout<<(ok?"PASS ":"FAIL ")<<"PS5 owned transport interruption episodes="<<recoveryEpisodes<<" playedBefore="<<playedBefore<<" recovery="<<sawRecovery<<" attempts="<<attempts<<" resumedWithFgAndAudio="<<resumed<<" postHealthySamples="<<postHealthySamples<<" manualCancel="<<cancelled<<" idle="<<engine.idle()<<std::endl;DestroyWindow(window);CoUninitialize();return ok?0:1;}const bool ok=!failed&&engine.idle()&&maxGenerated>100&&final.metrics.flow.validGeneratedFps>10&&overloadSamples>0&&overloadTimings*100>=overloadSamples*95&&early>=0&&late>=0&&late<150&&std::abs(late-early)<40;diff --git a/tests/remoteplay/CoreTests.cpp b/tests/remoteplay/CoreTests.cppindex 24e18067..a904ddc8 100644--- a/tests/remoteplay/CoreTests.cpp+++ b/tests/remoteplay/CoreTests.cpp@@ -176,6 +176,20 @@ TEST(recovery_busy_then_slow_handshake){r.frame(31999);CHECK(r.poll(32999,false,false)==A::Keyframe);CHECK(r.poll(37999,false,false)==A::Reconnect);}+TEST(recovery_stable_progress_renews_outage_budget_not_identity){+ StreamRecovery r;using A=StreamRecovery::Action;+ for(int i=0;i<3;++i){r.beginAttempt(i*10000);r.frame(i*10000+100);CHECK(r.poll(i*10000+6100,false,false)==A::Reconnect);}+ r.beginAttempt(30000);CHECK(!r.frame(30100));+ for(int64_t t=30200;t<60100;t+=100)CHECK(!r.frame(t));+ CHECK(r.episodeRetries()==3);CHECK(r.frame(60100));CHECK(r.episodeRetries()==0);CHECK(r.reconnects()==3);+ CHECK(!r.frame(60200));CHECK(r.poll(66200,false,false)==A::Reconnect);+ CHECK(r.episodeRetries()==1);CHECK(r.reconnects()==4);+}+TEST(recovery_intermittent_frames_do_not_renew_budget){+ StreamRecovery r;using A=StreamRecovery::Action;r.beginAttempt(0);r.frame(100);CHECK(r.poll(6100,false,false)==A::Reconnect);r.beginAttempt(7000);+ for(int64_t t=7100;t<150000;t+=1000)CHECK(!r.frame(t));+ CHECK(r.episodeRetries()==1);CHECK(r.reconnects()==1);+}int main(int argc,char**argv){std::string filter;if(argc==2&&std::string_view(argv[1])=="--list"){for(auto [name,f]:tests()){(void)f;std::cout<<name<<'\n';}return 0;}