Skip to content

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++

test(recording): verify handoff on real player and document local delivery

Veyra Goal Agent8277ac7e9473
diff --git a/docs/CLAUDE_HANDOFF_REPORT_2026-10-22.md b/docs/CLAUDE_HANDOFF_REPORT_2026-10-22.md
new file mode 100644
index 00000000..25de1534
--- /dev/null
+++ b/docs/CLAUDE_HANDOFF_REPORT_2026-10-22.md
@@ -0,0 +1,83 @@
+# Claude 中断任务接手记录
+
+本轮在用户当地 2026-10-21 执行;任务目录保留原中断任务的 20261022 标识。用户要求接手完成后,明确决定“Lecram,先放着,不弄了”,因此本轮交付仅包含 AMD 超分关闭与录制修复。Lecram 原树、原件与资料保留。
+
+## 源码与存档
+
+- 工作树:`E:/项目/Veyra/worktrees/screen-recording-fix-20261022`。
+- 分支:`codex/claude-handoff-20261022`,基线包含原录制分支 aa27732。
+- 20 个 Claude 未提交文件的原始 ZIP、二进制 patch、逐文件 SHA:`E:/项目/Veyra/archives/codex-claude-handoff-20261022`。
+- `5614e8d` / `checkpoint/claude-recording-before-handoff-20261022`:未经验证的原始实现存档。
+- `88dbc26`:移入 AMD 修复 1b94bae。
+- `20a30a6`:录制生命周期、资源释放、队列计数、MFT 收尾、界面与翻译修复。
+- 本轮不合 main、不 push、不发布、不改驱动或专有运行库,不触碰真实配对主机和其他工作树。
+
+## 实际修改与原因
+
+承接 Claude 的呈现命令列表取帧、异步 NVENC/系统编码器、音频挂钩、AAC 与分段封装实现,补齐以下问题:
+
+1. 码流队列的字节数原先在解锁后增加,写线程可能先扣减导致无符号下溢,误判磁盘过慢。改为锁内发布计数。
+2. UI 可在 record 与 submitted 之间停止录制,原先编码线程可能过早退出。保留待提交捕获,提交/丢弃之后再关闭输入队列。
+3. 编码失败后的呈现命令可能仍使用录制纹理,完成判断现在等待相关 GPU fence 已完成才回收,不在正常播放线程逐帧等待。
+4. 音轨状态跨线程改写改成原子值;限制未收尾分段数量,上一段仍保存时拒绝新录制,避免资源无界增长。
+5. MFStartup/MFShutdown 生命周期串行化,防止旧分段退出与新分段启动交错;系统实时编码事件等待按录制超时配置限制,导出既有超时不改。
+6. 退出超时保留的工作线程使用进程生命周期存储,避免静态容器析构时释放仍在使用的 Segment。
+7. 保存中/无播放内容时禁用录制点击;倒计时期间片源消失会取消;补齐繁中、英文、日文录制提示。没有提高既有 UI 轮询频率。
+
+NVIDIA 使用 GPU NV12/P010 + D3D12 NVENC,压缩码流在工作线程回收、落盘。系统编码器沿用 MF 后端,NV12 回读发生在录制工作线程;这一后端不是零拷贝。声音取自播放器实际送出的 PCM、在音量/静音之前,不能录到没有开启监听的采集音频。XeSS 插件内部生成帧不在共享纹理池,仍不宣称录到这些帧。
+
+## 构建与自动回归
+
+可复现命令(在本工作树运行):
+
+```powershell
+python -X utf8 -B -I scripts/acceptance/build-recording-handoff.py --task codex-claude-handoff-20261022 --root E:/项目/Veyra/worktrees/screen-recording-fix-20261022 --build-dir E:/项目/Veyra/build/claude-screen-recording-20261022 --label 2.1.0-rec veyra_qml_ui veyra_qml_quick_tests veyra_ui_contract_tests veyra_ui_i18n_tests veyra_repair_contract_tests
+python -X utf8 -B scripts/i18n/extract.py --check
+python -X utf8 -B -I scripts/acceptance/amd-sr-handoff.py after
+python -X utf8 -B -I scripts/acceptance/recording-handoff.py long
+python -X utf8 -B -I scripts/acceptance/recording-handoff.py real4k --media 4k
+```
+
+沿用 2.1.0 已验依赖,-j2,所有构建在单次 900 秒内。最后五目标增量构建收据:`logs/codex-claude-handoff-20261022/build-20261021-203437/receipt.json`。
+
+实际执行结果:Repair 272 checks / 0 failures;UI contract 通过(含 384 布局情况);UI i18n 0 failures;Qt Quick 105 passed / 0 failed;翻译提取 2659 条、三目标语言缺译和占位符错误均为 0。最后回归日志:`logs/codex-claude-handoff-20261022/regression-204301`。
+
+应用 EXE SHA256:`37d18c58ddb7378ac2149812b6c4b87c3c3350e8ee32aacd97be90323a0e4ea2`。C++ 产品源码对应 20a30a6;后续提交的产品变动仅录制 MouseArea 的 objectName,另含测试与文档收尾。每次录制报告记录所用 EXE SHA,测试包另有完整清单。
+
+## 实际播放器与文件验收
+
+所有案例使用独立数据目录、AppData、缓存与 TEMP,不操作用户真实配置。通过生产 bridge 打开片源、录制并实际解码分析输出;退出码 0 单独不算通过。脚本拒绝无帧、缺音轨、引擎卡住、编码错误及不完整分段。合成片用每秒闪光/蜂鸣对齐;30fps 限帧测试使用 50ms 闪光,避免一帧脉冲恰好被抽掉。以产品规格既有 ±50ms 作为本机音画偏移检查范围,但本轮不是 30 分钟稳定性验收。
+
+| 项目 | 证据与结果 |
+|---|---|
+| AMD 超分开关 | `sr-toggle-after-203525`:真实 Radeon 核显上 FSR 开启后 3840×2160 / sr=1,关闭后恢复 1920×1080 / sr=0,UI srActive 同步 |
+| 约62秒连续录制 | `rec-long-203814`:3702帧,61.78秒,H.264+AAC,61次闪光/蜂鸣;偏移中位 -1.3ms、范围 -2.4至-0.2ms;编码器报告丢帧0 |
+| 原生4K素材 | `rec-real4k-204145`:3840×2160、248帧、8.29秒、有AAC音轨;不是1080放大冒充4K。此素材不作闪光音画同步证明 |
+| 系统编码器 | `rec-mf-203937`:1080p60,745帧,有AAC;偏移中位 -0.5ms |
+| AMD核显录制 | `rec-amd-202714`:真实 AMD 硬件 MFT 输出1080p60及AAC;后续更改只涉及失败/收尾边界,未外推独显AMD型号 |
+| 30fps限速 | `rec-limited-203619`:250帧、8.36秒,帧间隔中位33.32ms,偏移中位-1.0ms |
+| 连续启停 | `rec-rapid-203638`:5次独立录制均收尾并保存 |
+| 录制按钮 | `rec-button-204058`:真实界面处理函数与计时器,3→2倒计时、取消、再次开始、停止保存;494帧,音画偏移中位-0.9ms。通过 MouseArea 信号触发,不冒充原生坐标点击或视觉验收 |
+| 播放器静音 | `rec-muted-203754`:仍录到AAC与蜂鸣,偏移中位-1.1ms |
+| 关闭录音/HEVC | `rec-silent-203134` 确实无音轨;`rec-hevc-203114` 为HEVC+AAC |
+| 停止播放自动保存 | `rec-stop-203718`:文件正确收尾,AAC保留 |
+| 无效目录 | `rec-bad-directory-204049`:明确错误,无录制开始、无输出文件 |
+| 改调色设置 | `rec-settings-204656`:同一文件继续录863帧,音画偏移-47.1至-0.3ms,不能称切设置时零卡顿 |
+| FSR切输出尺寸 | `rec-resize-fsr-204724`:1080→4K→1080三段均有画面和AAC,分别253/300/364帧(按时间顺序) |
+| 暂停恢复 | `rec-pause-204755`:620帧,约3.8秒暂停间隔保留,声音持续时间线,恢复后的音画偏移在-9.9至-0.4ms |
+| 4倍补帧录制 | `rec-fg-204821`:2966帧/约12.44秒,音画偏移-6.2至-0.6ms;DLSSG真实Create和Release返回0x1,evaluates=2314,日志确认真实生成帧呈现,不把文件帧率当物理屏幕刷新率 |
+
+上述日志、报告、输出片统一位于 `E:/项目/Veyra/{logs,tests}/codex-claude-handoff-20261022`。切效果、FSR切尺寸、暂停恢复与4倍补帧的最终重跑回执在该目录对应最新 `rec-settings-*`、`rec-resize-fsr-*`、`rec-pause-*`、`rec-fg-*`。
+
+低延迟限制:本机 CPU 呈现日志抽样,不录制基线14样本与连续录制64样本的 recordSubmitMs 中位分别0.139/0.147ms,slotWaitMs 中位均0。它只能说明这些抽样没有明显的 CPU 等待增长,不能据此声称 GPU 增量为零或屏幕光学延迟不变。显示/采集硬件端到端延迟本轮未测。
+
+## 失败与边界
+
+- 隔离环境(新 CUDA 缓存、关闭预热)中切到 DLSS SR,CreateFeature 期间超过8秒没有播放进展。接手版本不录制的对照同样复现;未修改的2.1.0 EXE(SHA 5b8a8920…a03a65)在 `rec-released-resize-204431` 也复现,堆栈位于 NVIDIA PTX JIT 编译器。该案例明确失败,不计入验收。不将首次编译卡顿直接断言为永久死锁,也不宣称本轮已修复 DLSS 初始化。
+- 首轮限帧测试因为单帧闪光被30fps抽样全部错过,不能计算同步;修正为50ms闪光后重跑通过。首轮无效目录夹具忽略了设置拒绝,实际落到默认目录;该报告标记失败、测试输出已移回E盘,夹具修正后真正验证失败路径。
+- 一次停止案例仅出现 Qt 剪贴板重试错误;验收只排除此条已知外部提示,其他引擎/编码错误仍失败。
+- 未验证真实采集卡、真实主机串流、HDR录制、RTX20/30/40与其他AMD/Intel型号、长时间显存稳定和光学显示延迟。测试窗口与本机短测不能外推所有硬件。
+
+## 本地测试包
+
+供体为已发布2.1.0 NVIDIA/AMD便携目录,原样运行库/模型/着色器逐文件验证,仅替换本轮程序、QML、翻译和说明。打包脚本 `scripts/acceptance/package-recording-handoff.py --zip`,产物 `E:/项目/Veyra/test-packages/codex-claude-handoff-20261022`,回执 `reports/codex-claude-handoff-20261022/packages.json`。包内仍显示 `2.1.0-rec`,外部 `rec2` 用来区分旧无声录制包;不是正式发布。
diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.md
index 6bb8ea18..2f3d9f1d 100644
--- a/docs/CURRENT_STATUS.md
+++ b/docs/CURRENT_STATUS.md
@@ -1,5 +1,9 @@
# 当前项目状态 / Current Status
+## 2026-10-21 Claude 中断任务本地接手
+
+隔离分支 `codex/claude-handoff-20261022` 完成 AMD 超分关闭修复与带声音实时录制的生命周期/队列/收尾修复,真实 Radeon 核显开关、NVENC/MF实录、约62秒录制、4K文件、限帧/静音/暂停/改效果/尺寸分段/补帧及错误路径有本机证据。详细范围、命令、已测与未测见 [接手报告](CLAUDE_HANDOFF_REPORT_2026-10-22.md)。Lecram 按用户明确指令暂停。此分支没有合并 main、推送或发布,正式版本仍为2.1.0;隔离环境中 DLSS SR 首次初始化卡顿在原2.1.0也复现,未算通过。
+
## 2026-10-11 当前 Codex / Claude 修复合并完成
本地main已通过功能merge `d2e1396`合入已验整合tip `adcf509`,合并完整Git树相同;后续仅补四份收尾文档。包含DLSS SR K/M/L选择与持久化、正常去重/同步/限速状态和设置事务确认,以及VFG三种混合档/每对帧GPU镜头切换判断。此前六Claude分支/UI裁剪修复继续保留,默认档和33ms统计/250ms状态节奏不变,负优化未恢复。
diff --git a/docs/SCREEN_RECORDING_PLAN_2026-10-20.md b/docs/SCREEN_RECORDING_PLAN_2026-10-20.md
index 4ba684c0..c9b8981b 100644
--- a/docs/SCREEN_RECORDING_PLAN_2026-10-20.md
+++ b/docs/SCREEN_RECORDING_PLAN_2026-10-20.md
@@ -1,5 +1,7 @@
# 实时录制(处理后画面)施工方案 — 2026-10-20
+> 后续修复已扩展为带声音、后台编码/收尾、输出变化自动分段,取代下文首版“无音频”“设置变化结束录制”的行为。当前实现与验收见 [Claude 接手报告](CLAUDE_HANDOFF_REPORT_2026-10-22.md)。下文保留为首版设计历史。
+
## 一、需求
用户要求给软件增加录制功能:
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index e2622d08..4b1d5218 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -9863,3 +9863,18 @@ Branch claude/aa-53-20261017 from main 26c0d61. Archive E:/项目/Veyra/archives
用户提供“群聊:Veyra Dlss5 交流 7.png”并要求替换 GitHub 已满群二维码。从最新 nrvideo/main 7ec143c 在 codex/community-qr7-20261020 修改;原图原样复制 docs/images/community/group-7-20261020.png,SHA256 1cf67beb48815bd53999bf17252e74de4bb617c6c47846252ff89a0e417ade84。中英 README、RELEASE_SUPPORT 和 2.1.0 更新说明同步新图、7群标记及图片注明的 2026-10-27 前有效期。微信赞助图、width220、Discord、Ko-fi、知识库和其他内容保留。
工具命令:git fetch nrvideo main;bundled Python -X utf8 -B E:/项目/Veyra/tmp/community-qr7-20261020/update.py;git diff --check。Release v2.1.0 / v2.1.0-sources 修改前完整 JSON 与精确替换后的正文保存在 E:/项目/Veyra/reports/community-qr7-20261020;提交后普通 push HEAD:main,再 gh release edit --notes-file 更新两页正文。只改群信息,不重建/打包、不移动发布标签、不修改资产;远端正文、图片实际字节、赞助链接及资产身份的核验结果记该目录 final.json。
+
+
+## 2026-10-21 Claude 中断任务接手(Codex;目录沿用20261022标识)
+
+用户要求读取Claude两条对话后“把后续工作接上,然后完成他”,后明确“Lecram,先放着,不弄了”。复用E盘screen-recording-fix-20261022,切codex/claude-handoff-20261022。原20个未提交文件SHA/patch/ZIP在archives/codex-claude-handoff-20261022;检查点5614e8d及标签保存未经验证的原实现;AMD修复1b94bae移入88dbc26。旧桌面/其他树/真实配置/运行库/驱动不改,无子Agent/main合并/push/发布。
+
+20a30a6补录制队列字节数发布竞态、record/submitted间停止、GPU在途资源保活、音轨跨线程状态、分段上限、MF启动/收尾等待与退出时工作线程保活,保存中禁用按钮及取消失源倒计时,补36条三语言翻译。保留Claude呈现端捕获与工作线程编码/封装,NVENC不回读像素;MF仍为工作线程NV12回读,不称零拷贝。Lecram只保留已读取资料,后续不继续。
+
+命令:python -X utf8 -B -I scripts/acceptance/build-recording-handoff.py --task codex-claude-handoff-20261022 --root E:/项目/Veyra/worktrees/screen-recording-fix-20261022 --build-dir E:/项目/Veyra/build/claude-screen-recording-20261022 --label 2.1.0-rec veyra_qml_ui veyra_qml_quick_tests veyra_ui_contract_tests veyra_ui_i18n_tests veyra_repair_contract_tests(-j2,最终增量2秒);scripts/i18n/extract.py --check(2659条零缺译/占位符问题);scripts/acceptance/amd-sr-handoff.py after(真实核显开4K、关1080);scripts/acceptance/recording-handoff.py的long/button/settings/resize-fsr/pause/fg/mf/amd/limited/hevc/silent/muted/rapid/stop/bad-directory/real4k --media 4k等独立真实进程测试。日志、独立profile、输出全部E:/项目/Veyra/{logs,tests,tmp,reports}/codex-claude-handoff-20261022;复用构建E:/项目/Veyra/build/claude-screen-recording-20261022。
+
+实际回归:Repair272 checks0fail,UI contract通过,UI i18n0fail,QtQuick105pass0fail,最后regression-204301。约62秒实录3702帧,AAC+H264,闪光/蜂鸣61组,偏移中位-1.3ms(-2.4至-0.2ms);真实4K素材录3840x2160/248帧、有AAC;按钮倒计时/取消/再开始/停止用真实MouseArea信号验证(不冒充原生鼠标坐标测试)。生成帧录制/暂停/分段/连续启停/错误路径详情和失败证据见docs/CLAUDE_HANDOFF_REPORT_2026-10-22.md。
+
+失败真实保留:DLSS SR CreateFeature在新缓存/无预热环境卡住,录制与不录制均复现,未改2.1.0 EXE也复现(rec-released-resize-204431,PTX JIT堆栈);不能宣称DLSS初始化已修好或永久死锁。首版限帧夹具单帧闪光被抽帧错过,改50ms后通过;首版错误目录夹具忽略setPreference拒绝,实际默认录制文件已精确移回E盘测试目录,原报告标失败,修正为无效私有profile后验证明确拒绝且无输出。仅忽略Qt剪贴板重试这一条无关日志。未做真实采集/主机串流/HDR/其他GPU/长期/光学延迟验收。
+
+本地包按scripts/acceptance/package-recording-handoff.py --zip生成,原2.1.0双GPU供体运行组件/模型/着色器原样SHA审计;准确包/ZIP哈希、源码提交及冷启动回执保存在reports/codex-claude-handoff-20261022。产物目录test-packages/codex-claude-handoff-20261022;正式版本与Release不动。
diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qml
index ae1d5e0e..9511f400 100644
--- a/qml/Veyra/ProPage.qml
+++ b/qml/Veyra/ProPage.qml
@@ -672,6 +672,7 @@ VPage {
}
MouseArea {
id: recordMouse
+ objectName: "pro-record-mouse"
anchors.fill: parent
enabled: veyra.hasSource && !recordControl.saving
hoverEnabled: true
diff --git a/scripts/acceptance/amd-sr-handoff.py b/scripts/acceptance/amd-sr-handoff.py
new file mode 100644
index 00000000..c0b1636b
--- /dev/null
+++ b/scripts/acceptance/amd-sr-handoff.py
@@ -0,0 +1,81 @@
+"""AMD SR toggle reproduction on this PC's AMD Radeon iGPU (the engine adapter is
+chosen with VEYRA_COMPUTE_ADAPTER_LUID, so the real non-NVIDIA paths run).
+
+ before: the released 2.1.0 AMD package
+ after: the same package with this task's veyra_qml_ui.exe
+
+Each app is a hard-linked copy of the package; files this script changes are
+replaced (unlink + new file), never written through a link.
+
+usage: py -3.11 -X utf8 -I run_sr_toggle.py before|after
+"""
+from pathlib import Path
+import json, os, re, shutil, subprocess, sys, time
+
+B = Path('E:/项目/Veyra'); T = 'codex-claude-handoff-20261022'
+PKG = B / 'test-packages/bilibili-2.1.0-20261019/Veyra-2.1.0-test-AMD-win64-portable'
+HERE = Path(__file__).resolve().parent
+os.environ['PATH'] = str(next((Path(os.environ['LOCALAPPDATA'])/'Microsoft/WinGet/Packages/Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe').glob('*/bin'))) + os.pathsep + os.environ['PATH']
+which = sys.argv[1]; assert which in ('before', 'after')
+APP = B / 'tests' / T / ('app-' + which)
+MEDIA = B / 'tests' / T / 'media' / 'sr-clip1080.mp4'
+stamp = time.strftime('%H%M%S')
+OUT = B / 'logs' / T / ('sr-toggle-' + which + '-' + stamp); OUT.mkdir(parents=True)
+running = [l for l in subprocess.check_output(['tasklist', '/fo', 'csv', '/nh'], text=True, encoding='mbcs', errors='replace').splitlines() if l.lower().startswith('"veyra')]
+assert not running, 'another Veyra process is running: ' + repr(running)
+
+
+def replace(path, data):
+ if path.exists(): path.unlink()
+ path.write_bytes(data)
+
+
+if not APP.exists():
+ for src in PKG.rglob('*'):
+ dst = APP / src.relative_to(PKG)
+ if src.is_dir(): dst.mkdir(parents=True, exist_ok=True)
+ else: dst.parent.mkdir(parents=True, exist_ok=True); os.link(src, dst)
+if which == 'after':
+ replace(APP / 'veyra_qml_ui.exe', (B / 'build/claude-screen-recording-20261022/veyra_qml_ui.exe').read_bytes())
+main = APP / 'qml/Veyra/Main.qml'
+original = (HERE.parents[1] / 'qml/Veyra/Main.qml').read_text('utf8')
+if which == 'after':
+ for source in (HERE.parents[1]/'qml/Veyra').rglob('*'):
+ if source.is_file():
+ target=APP/'qml/Veyra'/source.relative_to(HERE.parents[1]/'qml/Veyra');target.parent.mkdir(parents=True,exist_ok=True);replace(target,source.read_bytes())
+at = original.rfind('}')
+replace(main, (original[:at] + '\nLoader { source: ' + json.dumps((HERE / 'amd-sr-handoff.qml').as_uri()) + ' }\n' + original[at:]).encode('utf8'))
+
+if not MEDIA.exists():
+ MEDIA.parent.mkdir(parents=True, exist_ok=True)
+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-f', 'lavfi', '-i', 'testsrc2=size=1920x1080:rate=30', '-t', '40',
+ '-c:v', 'libx264', '-preset', 'veryfast', '-pix_fmt', 'yuv420p', str(MEDIA)], check=True, timeout=120)
+
+adapters = subprocess.check_output([sys.executable, '-X', 'utf8', '-I', str(HERE / 'dxgi-adapters-handoff.py')], text=True)
+amd = [re.search(r'luid=([0-9A-F]{16})', l).group(1) for l in adapters.splitlines() if 'vendor=0x1002' in l]
+assert amd, adapters
+profile = B / 'tests' / T / 'profiles' / (which + '-' + stamp); profile.mkdir(parents=True)
+(profile / 'qml-preferences.v1.json').write_text(json.dumps(dict(language='zh-CN', autoResume=False, prewarmEnhancement=False, monitorGpu='1002:13c0:88771043', computeOnMonitorGpu=True)), 'utf8')
+tmp = B / 'tmp' / T / ('run-' + which + '-' + stamp); tmp.mkdir(parents=True)
+env = {k: v for k, v in os.environ.items() if not k.upper().startswith(('VEYRA_', 'QT_', 'QSG_', 'QML_'))}
+env.update(TEMP=str(tmp), TMP=str(tmp), VEYRA_LOG_FILE=str(OUT / 'engine.log'), VEYRA_COMPUTE_ADAPTER_LUID=amd[0],
+ QT_FORCE_STDERR_LOGGING='1', QML_DISABLE_DISK_CACHE='1')
+env.update(APPDATA=str(profile/'AppData'),LOCALAPPDATA=str(profile/'LocalAppData'),CUDA_CACHE_PATH=str(tmp/'cuda'))
+with (OUT / 'console.log').open('wb') as log:
+ rc = subprocess.run([str(APP / 'veyra_qml_ui.exe'), '--page', 'pro', '--size', '1280x800', '--data-dir', str(profile),
+ '--exit-after', '85000', str(MEDIA)], cwd=APP, env=env, stdout=log, stderr=subprocess.STDOUT, timeout=150).returncode
+console = (OUT / 'console.log').read_text('utf8', errors='replace')
+engine = (OUT / 'engine.log').read_text('utf8', errors='replace') if (OUT / 'engine.log').exists() else ''
+print('exit', rc, 'adapter', amd[0], OUT)
+for line in console.splitlines():
+ if 'SRTEST' in line: print(' |', line[line.find('SRTEST'):][:400])
+for line in engine.splitlines():
+ if re.search(r'\[resolution\] source=|\[capability\]|Applied revision|device context initialized', line): print(' >', line[25:330])
+
+assert rc==0 and "SRTEST DONE" in console and "SRTEST FAIL" not in console
+if which=="after":
+ assert re.search(r"SRTEST after-on srEnabled=true srActive=true",console), OUT
+ assert re.search(r"SRTEST after-off srEnabled=false srActive=false",console), OUT
+ graphs=re.findall(r"initialized src=1920x1080 work=(\d+x\d+) sr=(\d)",engine)
+ assert ("3840x2160","1") in graphs and graphs[-1]==("1920x1080","0"),graphs
+assert "[engine-hang]" not in engine
diff --git a/scripts/acceptance/amd-sr-handoff.qml b/scripts/acceptance/amd-sr-handoff.qml
new file mode 100644
index 00000000..77be0e0e
--- /dev/null
+++ b/scripts/acceptance/amd-sr-handoff.qml
@@ -0,0 +1,47 @@
+// Loaded only into a private test copy of Main.qml (production bridge).
+// AMD field report 2026-10-22: SR cannot be turned off. Turns FSR SR on in list
+// mode, then off, and logs what the interface and the engine report each time.
+import QtQuick
+Item {
+ id: test
+ property int step: 0
+ property int ticks: 0
+ property int mark: 0
+ function state(tag) {
+ console.log("SRTEST", tag, "srEnabled=" + veyra.srEnabled, "srActive=" + veyra.srActive,
+ "videoSrQuality=" + veyra.videoSrQuality, "status=" + veyra.statusText)
+ }
+ Connections {
+ target: veyra
+ function onNotice(message, error) { console.log("SRTEST notice", error, message) }
+ }
+ Timer {
+ interval: 200; repeat: true; running: true
+ onTriggered: {
+ ++test.ticks
+ if (test.ticks > 400) { console.log("SRTEST FAIL deadline"); Qt.quit(); return }
+ if (test.step === 0) {
+ if (!veyra.hasSource || test.ticks < 20) return
+ veyra.nodeMode = 0
+ veyra.nrEnabled = false
+ veyra.fgEnabled = false
+ veyra.videoSrQuality = 5
+ veyra.srTargetIndex = 2
+ veyra.srEnabled = true
+ test.state("requested-on")
+ test.mark = test.ticks; test.step = 1
+ } else if (test.step === 1) {
+ if (test.ticks - test.mark < 30) return
+ test.state("after-on")
+ veyra.srEnabled = false
+ test.state("requested-off")
+ test.mark = test.ticks; test.step = 2
+ } else if (test.step === 2) {
+ if (test.ticks - test.mark < 30) return
+ test.state("after-off")
+ console.log("SRTEST DONE")
+ Qt.quit()
+ }
+ }
+ }
+}
diff --git a/scripts/acceptance/dxgi-adapters-handoff.py b/scripts/acceptance/dxgi-adapters-handoff.py
new file mode 100644
index 00000000..dc4e7f19
--- /dev/null
+++ b/scripts/acceptance/dxgi-adapters-handoff.py
@@ -0,0 +1,44 @@
+"""List DXGI adapters with the LUID format VEYRA_COMPUTE_ADAPTER_LUID expects (16 hex digits)."""
+import ctypes
+from ctypes import wintypes
+
+
+class GUID(ctypes.Structure):
+ _fields_ = [('Data1', ctypes.c_uint32), ('Data2', ctypes.c_uint16), ('Data3', ctypes.c_uint16), ('Data4', ctypes.c_ubyte * 8)]
+
+
+class LUID(ctypes.Structure):
+ _fields_ = [('LowPart', wintypes.DWORD), ('HighPart', wintypes.LONG)]
+
+
+class DESC1(ctypes.Structure):
+ _fields_ = [('Description', ctypes.c_wchar * 128), ('VendorId', ctypes.c_uint), ('DeviceId', ctypes.c_uint),
+ ('SubSysId', ctypes.c_uint), ('Revision', ctypes.c_uint), ('DedicatedVideoMemory', ctypes.c_size_t),
+ ('DedicatedSystemMemory', ctypes.c_size_t), ('SharedSystemMemory', ctypes.c_size_t),
+ ('AdapterLuid', LUID), ('Flags', ctypes.c_uint)]
+
+
+# IID_IDXGIFactory1 {770aae78-f26f-4dba-a829-253c83d1b387}
+iid = GUID(0x770aae78, 0xf26f, 0x4dba, (ctypes.c_ubyte * 8)(0xa8, 0x29, 0x25, 0x3c, 0x83, 0xd1, 0xb3, 0x87))
+factory = ctypes.c_void_p()
+assert ctypes.windll.dxgi.CreateDXGIFactory1(ctypes.byref(iid), ctypes.byref(factory)) == 0
+
+
+def method(obj, index, *argtypes):
+ vtable = ctypes.cast(ctypes.cast(obj, ctypes.POINTER(ctypes.c_void_p))[0], ctypes.POINTER(ctypes.c_void_p))
+ return ctypes.WINFUNCTYPE(ctypes.c_long, ctypes.c_void_p, *argtypes)(vtable[index])
+
+
+i = 0
+while True:
+ adapter = ctypes.c_void_p()
+ if method(factory, 12, ctypes.c_uint, ctypes.POINTER(ctypes.c_void_p))(factory, i, ctypes.byref(adapter)) != 0:
+ break
+ desc = DESC1()
+ method(adapter, 10, ctypes.POINTER(DESC1))(adapter, ctypes.byref(desc))
+ luid = (ctypes.c_uint32(desc.AdapterLuid.HighPart).value << 32) | desc.AdapterLuid.LowPart
+ print(f'{i} vendor=0x{desc.VendorId:04X} device=0x{desc.DeviceId:04X} luid={luid:016X} flags={desc.Flags} '
+ f'vram={desc.DedicatedVideoMemory >> 20}MiB name={desc.Description}')
+ method(adapter, 2)(adapter)
+ i += 1
+method(factory, 2)(factory)
diff --git a/scripts/acceptance/package-recording-handoff.py b/scripts/acceptance/package-recording-handoff.py
new file mode 100644
index 00000000..e98ddbec
--- /dev/null
+++ b/scripts/acceptance/package-recording-handoff.py
@@ -0,0 +1,104 @@
+"""Stage local handoff packages, audit unchanged donor runtimes and optionally ZIP.
+
+No existing output is overwritten. All replacements unlink hard links first.
+usage: python -X utf8 -B scripts/acceptance/package-recording-handoff.py [--zip]
+"""
+from pathlib import Path
+import argparse, hashlib, json, os, subprocess, time, zipfile
+
+BASE = Path('E:/项目/Veyra')
+TASK = 'codex-claude-handoff-20261022'
+ROOT = Path(__file__).resolve().parents[2]
+BUILD = BASE / 'build/claude-screen-recording-20261022'
+OUT = BASE / 'test-packages' / TASK
+REPORT = BASE / 'reports' / TASK
+parser = argparse.ArgumentParser()
+parser.add_argument('--zip', action='store_true')
+args = parser.parse_args()
+OUT.mkdir(parents=True, exist_ok=True)
+REPORT.mkdir(parents=True, exist_ok=True)
+head = subprocess.check_output(['git', '-C', str(ROOT), 'rev-parse', 'HEAD'], text=True).strip()
+
+def sha(path):
+ with path.open('rb') as f:
+ return hashlib.file_digest(f, 'sha256').hexdigest()
+
+def replace(path, data):
+ path.parent.mkdir(parents=True, exist_ok=True)
+ if path.exists():
+ path.unlink()
+ path.write_bytes(data)
+
+note = '''# Veyra 2.1.0 录制修复测试版(rec2)
+
+完整解压后运行 veyra_qml_ui.exe。软件内仍显示 2.1.0-rec;这是本地测试构建。
+
+- AMD 超分关闭修复已包含。
+- 专业模式截图旁录制按钮:3 秒倒计时,可取消;录制中显示时间,点击停止。
+- 设置 → 播放 → 录制:保存位置、自动/指定码率、帧率、H.264/HEVC、录制声音。
+- 录制处理后的画面和播放器的声音,播放器音量/静音不影响录音;采集卡需开启音频监听。
+- 改效果继续录制,输出尺寸或 HDR 模式变化时接着写 -2、-3 等新文件。
+- 暂停保留真实时间间隔,播放器停止或换片源会保存录制。
+- XeSS 插件内部生成帧不在引擎纹理池里,不能宣称录到这些生成帧。
+- NVIDIA 录制使用 D3D12 NVENC。AMD/Intel 使用系统硬件编码器,像素回读和编码在录制工作线程上;不把这个后端称为零拷贝。
+- HDR 录制仅 NVIDIA HEVC 10bit;本轮未做 HDR 录制验收。
+
+本机通过:AMD 核显超分开关、1080p60 带声录制、约62秒连续录制、4倍补帧、FSR切分辨率、暂停恢复、4K文件录制、H.264/HEVC、限帧/静音/关闭音轨、连续启停和错误目录。
+详见 docs/CLAUDE_HANDOFF_REPORT_2026-10-22.md。未做长时间稳定性、真实采集卡/主机串流、其他显卡和屏幕光学延迟验收。
+隔离环境中切到 DLSS SR 有 CreateFeature 卡住的问题,不录制对照也会出现;此项单列,不能说已经修复。
+Lecram 按用户要求暂停,不包含在此包。未合并 main、未推送或公开发布。
+'''
+receipts = []
+for vendor in ('NVIDIA', 'AMD'):
+ donor = BASE / 'test-packages/bilibili-2.1.0-20261019' / f'Veyra-2.1.0-test-{vendor}-win64-portable'
+ package = OUT / f'Veyra-2.1.0-rec2-{vendor}-win64-portable'
+ assert donor.is_dir() and not package.exists(), package
+ for source in donor.rglob('*'):
+ target = package / source.relative_to(donor)
+ if source.is_dir():
+ target.mkdir(parents=True, exist_ok=True)
+ elif source.is_file():
+ target.parent.mkdir(parents=True, exist_ok=True)
+ os.link(source, target)
+ replace(package / 'veyra_qml_ui.exe', (BUILD / 'veyra_qml_ui.exe').read_bytes())
+ for folder in ('qml', 'i18n'):
+ for source in (ROOT / folder).rglob('*'):
+ if source.is_file():
+ target = package / folder / source.relative_to(ROOT / folder)
+ if not target.exists() or target.read_bytes() != source.read_bytes():
+ replace(target, source.read_bytes())
+ for name in ('CLAUDE_HANDOFF_PLAN_2026-10-22.md', 'CLAUDE_HANDOFF_REPORT_2026-10-22.md'):
+ replace(package / 'docs' / name, (ROOT / 'docs' / name).read_bytes())
+ replace(package / 'README-TEST.zh-CN.md', note.encode('utf8'))
+ # Every publisher-supplied runtime, model and shader must stay byte-identical.
+ original = json.loads((donor / 'package-manifest.json').read_text('utf8'))
+ unchanged = []
+ for entry in original['files']:
+ rel = entry['path']
+ if rel.lower().endswith(('.dll', '.onnx', '.tflite', '.dxil', '.hsaco')):
+ actual = sha(package / rel)
+ assert actual == entry['sha256'].lower() == sha(donor / rel), rel
+ unchanged.append(rel)
+ files = [{'path': p.relative_to(package).as_posix(), 'size': p.stat().st_size, 'sha256': sha(p)}
+ for p in sorted(package.rglob('*')) if p.is_file() and p.name != 'package-manifest.json']
+ manifest = dict(original)
+ manifest.update(candidate='2.1.0-rec2-local', displayVersion='2.1.0-rec', localOnly=True,
+ releaseReady=False, sourceArchiveCommit=head, mainCommit=subprocess.check_output(["git", "-C", str(ROOT), "rev-parse", "main"], text=True).strip(), productSourceCommit=head,
+ validationRecord='docs/CLAUDE_HANDOFF_REPORT_2026-10-22.md',
+ exeSha256=sha(package / 'veyra_qml_ui.exe'), files=files)
+ replace(package / 'package-manifest.json', json.dumps(manifest, ensure_ascii=False, indent=2).encode('utf8'))
+ result = dict(vendor=vendor, package=str(package), source=head, exeSha256=manifest['exeSha256'],
+ files=len(files), unchangedRuntimeModelShaderFiles=len(unchanged))
+ if args.zip:
+ archive = package.with_suffix('.zip')
+ assert not archive.exists(), archive
+ with zipfile.ZipFile(archive, 'w', zipfile.ZIP_DEFLATED, compresslevel=1) as z:
+ for p in package.rglob('*'):
+ if p.is_file():
+ z.write(p, package.name + '/' + p.relative_to(package).as_posix())
+ with zipfile.ZipFile(archive) as z:
+ assert z.testzip() is None
+ result.update(zip=str(archive), zipBytes=archive.stat().st_size, zipSha256=sha(archive))
+ receipts.append(result)
+ print(json.dumps(result, ensure_ascii=False), flush=True)
+(REPORT / 'packages.json').write_text(json.dumps(receipts, ensure_ascii=False, indent=2), 'utf8')
diff --git a/scripts/acceptance/recording-handoff.py b/scripts/acceptance/recording-handoff.py
index 989c6eba..230b754e 100644
--- a/scripts/acceptance/recording-handoff.py
+++ b/scripts/acceptance/recording-handoff.py
@@ -1,4 +1,4 @@
-"""Live recording acceptance on this PC (claude/screen-recording-20261022).
+"""Real-player recording acceptance for the Claude handoff branch.
The app is a hard-linked copy of the released 2.1.0 NVIDIA package with this
branch's veyra_qml_ui.exe and QML copied over (copies replace links; nothing is
@@ -6,8 +6,8 @@ written through a link). A sync clip (white box + 1 kHz beep at every second)
is played; the recording is checked for tracks, length, A/V offset (flash vs
beep onset) and frame cadence.
-usage: py -3.11 -X utf8 -I recording_test.py CASE [--media sync|4k] [--keep]
-cases: basic settings resize pause fg mf amd source-check
+usage: python -X utf8 -B -I scripts/acceptance/recording-handoff.py CASE [--media sync|4k]
+cases: see CASES below; resize/released-resize are DLSS SR diagnostics, not passing acceptance cases
"""
from pathlib import Path
import argparse, json, os, re, shutil, statistics, subprocess, sys, time
@@ -25,8 +25,11 @@ GTA4K = Path('E:/Ai/知识/小七姐/GTAVI_An_Extended_Look_4K_Native.mp4')
CASES = {
'basic': dict(seconds=12),
+ 'real4k': dict(seconds=8),
+ 'button': dict(seconds=8, useButton=True),
'muted': dict(seconds=8, muted=True),
'baseline': dict(seconds=12, noRecord=True),
+ 'released-resize': dict(seconds=15, noRecord=True, released=True, actions=[{'at': 4, 'do': 'sr-on'}, {'at': 9, 'do': 'sr-off'}]),
'resize-baseline': dict(seconds=15, noRecord=True, actions=[{'at': 4, 'do': 'sr-on'}, {'at': 9, 'do': 'sr-off'}]),
'resize-fsr': dict(seconds=15, fsr=True, actions=[{'at': 4, 'do': 'sr-on'}, {'at': 9, 'do': 'sr-off'}]),
'rapid': dict(seconds=1, repeats=5),
@@ -55,12 +58,13 @@ def replace(path, data):
path.write_bytes(data)
-def make_app():
+def make_app(released=False):
if not APP.exists():
for src in PKG.rglob('*'):
dst = APP / src.relative_to(PKG)
if src.is_dir(): dst.mkdir(parents=True, exist_ok=True)
else: dst.parent.mkdir(parents=True, exist_ok=True); os.link(src, dst)
+ if released: return
replace(APP / 'veyra_qml_ui.exe', (BUILD / 'veyra_qml_ui.exe').read_bytes())
for src in (ROOT / 'qml/Veyra').rglob('*'):
if src.is_file(): replace(APP / 'qml/Veyra' / src.relative_to(ROOT / 'qml/Veyra'), src.read_bytes())
@@ -152,7 +156,9 @@ def main():
case = CASES[a.case]
running = [l for l in subprocess.check_output(['tasklist', '/fo', 'csv', '/nh'], text=True, encoding='mbcs', errors='replace').splitlines() if l.lower().startswith('"veyra')]
assert not running, 'another Veyra process is running: ' + repr(running)
- make_app()
+ global APP
+ if case.get("released"): APP = APP.with_name(APP.name + "-released")
+ make_app(case.get("released", False))
media = make_sync_clip() if a.media == 'sync' else GTA4K
if a.case == 'long':
extended = MEDIA / 'sync1080p60-wideflash-120s.mp4'
@@ -166,12 +172,13 @@ def main():
profile = B / 'tests' / T / 'profiles' / (a.case + '-' + stamp); profile.mkdir(parents=True)
prefs = dict(language='zh-CN', autoResume=False, prewarmEnhancement=False)
prefs.update(case.get('prefs', {}))
+ if case.get('expectFailure'): prefs['recordDir'] = str(rec_dir/'not-a-directory')
(profile / 'qml-preferences.v1.json').write_text(json.dumps(prefs), 'utf8')
cfg = dict(case); cfg.pop('env', None); cfg.pop('prefs', None); cfg['dir'] = str(rec_dir)
if a.case == 'bad-directory':
blocked = rec_dir / 'not-a-directory'; blocked.write_text('intentional test file', 'utf8'); cfg['dir'] = str(blocked)
main_qml = APP / 'qml/Veyra/Main.qml'
- source = (ROOT / 'qml/Veyra/Main.qml').read_text('utf8')
+ source = ((PKG if case.get('released') else ROOT) / 'qml/Veyra/Main.qml').read_text('utf8')
at = source.rfind('}')
loader = '\nLoader { source: ' + json.dumps((HERE / 'recording-handoff.qml').as_uri()) + '; onLoaded: item.config = ' + json.dumps(json.dumps(cfg)) + ' }\n'
replace(main_qml, (source[:at] + loader + source[at:]).encode('utf8'))
@@ -193,18 +200,28 @@ def main():
files=[analyze(f, f.name) for f in files])
(out / 'report.json').write_text(json.dumps(report, ensure_ascii=False, indent=1), 'utf8')
print(json.dumps({k: v for k,v in report.items() if k != 'recorder'}, ensure_ascii=False, indent=1)[:6000])
- assert rc == 0 and 'RECTEST FAIL' not in console and any('RECTEST FINAL' in l for l in lines), out
- if not case.get('noRecord') and not case.get('expectFailure'):
- assert report['files'] and all(f['frames'] > 0 for f in report['files']), out
- if case.get('audio', True): assert all(f['audio'] == 'aac' for f in report['files']), out
- if a.case in ('basic', 'long', 'hevc', 'limited', 'mf', 'amd', 'muted'):
- for f in report['files']:
- offset = f['av_offset_ms']['median']
- assert offset is not None and abs(offset) <= 50, ('A/V gate', offset, out)
- assert not any('failed=true' in l or '\"failed\":true' in l for l in lines), out
- errors = [l for l in engine.splitlines() if '[ERROR]' in l and '[qml] Retrying to obtain clipboard.' not in l]
- assert '[engine-hang]' not in engine and not errors, ('engine error', errors[:3], out)
- if a.case in ('resize', 'resize-fsr'): assert len(report['files']) >= 3, ('resize did not create new segments', out)
+ try:
+ assert rc == 0 and 'RECTEST FAIL' not in console and any('RECTEST FINAL' in l for l in lines), out
+ if case.get('expectFailure'):
+ assert not report['files'] and not any('RECTEST STARTED' in l for l in lines) and any('RECTEST notice true' in l for l in lines), out
+ if not case.get('noRecord') and not case.get('expectFailure'):
+ assert report['files'] and all(f['frames'] > 0 for f in report['files']), out
+ if case.get('audio', True): assert all(f['audio'] == 'aac' for f in report['files']), out
+ if a.case in ('basic', 'long', 'hevc', 'limited', 'mf', 'amd', 'muted'):
+ for f in report['files']:
+ offset = f['av_offset_ms']['median']
+ assert offset is not None and max(abs(f['av_offset_ms']['min']), abs(f['av_offset_ms']['max'])) <= 50, ('A/V gate', f['av_offset_ms'], out)
+ assert not any('failed=true' in l or '\"failed\":true' in l for l in lines), out
+ errors = [l for l in engine.splitlines() if '[ERROR]' in l and '[qml] Retrying to obtain clipboard.' not in l]
+ assert '[engine-hang]' not in engine and not errors, ('engine error', errors[:3], out)
+ if a.case in ('resize', 'resize-fsr'): assert len(report['files']) >= 3, ('resize did not create new segments', out)
+ if a.case == 'real4k': assert all(f['width']==3840 and f['height']==2160 for f in report['files']), out
+ except BaseException:
+ report['passed'] = False
+ (out / 'report.json').write_text(json.dumps(report, ensure_ascii=False, indent=1), 'utf8')
+ raise
+ report['passed'] = True
+ (out / 'report.json').write_text(json.dumps(report, ensure_ascii=False, indent=1), 'utf8')
print('LOG', out)
diff --git a/scripts/acceptance/recording-handoff.qml b/scripts/acceptance/recording-handoff.qml
index cb4eae5d..3c89e33d 100644
--- a/scripts/acceptance/recording-handoff.qml
+++ b/scripts/acceptance/recording-handoff.qml
@@ -3,6 +3,7 @@
// the file, and print what the recorder reported. Config is JSON:
// {dir, seconds, audio, fps, bitrate, hevc, effects:{...}, actions:[{at, do}]}
import QtQuick
+import QtQuick.Window
Item {
id: test
property string config: "{}"
@@ -19,6 +20,23 @@ Item {
return { active: veyra.recording, frames: s.frames, dropped: s.dropped, seconds: s.seconds, files: s.files,
path: s.path, encoder: s.encoder, audio: s.audio, failed: s.failed, error: s.error, note: s.note, finishing: s.finishing }
}
+ function findControl(item, name) {
+ if (item.objectName === name) return item
+ for (const child of item.children || []) {
+ const found = findControl(child, name)
+ if (found) return found
+ }
+ return null
+ }
+ function control(name) { return findControl(test.Window.window.contentItem, name) }
+ function clickRecord() {
+ const mouse = control("pro-record-mouse")
+ if (!mouse || !mouse.enabled) { fail("record control unavailable"); return false }
+ // Invoke the production MouseArea signal. This checks the real handler
+ // and timer, not native hit-testing or physical pointer coordinates.
+ mouse.clicked(null)
+ return true
+ }
function act(name) {
out("ACTION", name)
if (name === "colour-on") veyra.colorEnabled = true
@@ -53,18 +71,34 @@ Item {
veyra.colorEnabled = !!fx.colour
if (fx.sr) { veyra.srTargetIndex = fx.srTarget || 2; veyra.srEnabled = true }
if (fx.fg) { veyra.fgMultiplier = fx.fg; veyra.fgEnabled = true } else veyra.fgEnabled = false
- veyra.setPreference("recordDir", test.cfg.dir)
- veyra.setPreference("recordAudio", test.cfg.audio !== false)
- veyra.setPreference("recordFps", test.cfg.fps || 0)
- veyra.setPreference("recordBitrateMbps", test.cfg.bitrate || 0)
- veyra.setPreference("recordHevc", !!test.cfg.hevc)
+ if (!test.cfg.noRecord) {
+ if (!test.cfg.expectFailure && !veyra.setPreference("recordDir", test.cfg.dir)) { test.fail("recordDir rejected"); return }
+ if (test.cfg.expectFailure && veyra.recordingDirectory !== test.cfg.dir) { test.fail("invalid-directory profile not loaded"); return }
+ veyra.setPreference("recordAudio", test.cfg.audio !== false)
+ veyra.setPreference("recordFps", test.cfg.fps || 0)
+ veyra.setPreference("recordBitrateMbps", test.cfg.bitrate || 0)
+ veyra.setPreference("recordHevc", !!test.cfg.hevc)
+ }
test.mark = test.ticks; test.step = 1
} else if (test.step === 1) {
// Let the effect settings apply before the file opens.
if (test.ticks - test.mark < (test.cfg.settle || 30)) return
if (test.cfg.noRecord) { test.mark = test.ticks; test.step = 5; return }
+ if (test.cfg.useButton) {
+ if (!test.clickRecord()) return
+ if (test.control("pro-record-control").countdown !== 3) { test.fail("countdown did not start"); return }
+ test.mark = test.ticks; test.step = 6; return
+ }
veyra.startRecording()
test.mark = test.ticks; test.step = 2
+ } else if (test.step === 6) {
+ if (test.ticks - test.mark < 12) return
+ if (test.control("pro-record-control").countdown !== 2) { test.fail("countdown did not tick"); return }
+ test.clickRecord()
+ if (test.control("pro-record-control").countdown !== 0 || veyra.recording) { test.fail("countdown cancellation failed"); return }
+ test.out("BUTTON_CANCELLED", test.stateJson())
+ test.clickRecord()
+ test.mark = test.ticks; test.step = 2
} else if (test.step === 2) {
const s = veyra.recordingState || {}
if (!veyra.recording && test.cfg.expectFailure) { test.out("FINAL", test.stateJson()); Qt.quit(); return }
@@ -79,7 +113,7 @@ Item {
if (!veyra.recording && test.cfg.expectStop !== true) { test.fail("recording stopped early: " + JSON.stringify(test.stateJson())); return }
if (elapsed < test.cfg.seconds && veyra.recording) return
test.out("BEFORE_STOP", test.stateJson())
- if (veyra.recording) veyra.stopRecording()
+ if (veyra.recording) { if (test.cfg.useButton) test.clickRecord(); else veyra.stopRecording() }
test.mark = test.ticks; test.step = 4
} else if (test.step === 5) {
const elapsed = (test.ticks - test.mark) / 10