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

feat: record temporal reset causes

Veyra Goal Agent4f4893aad3ae
diff --git a/docs/CONTINUATION_REPAIR_IMPLEMENTATION_2026-09-10.md b/docs/CONTINUATION_REPAIR_IMPLEMENTATION_2026-09-10.md
index c8dfb8da..be3526e8 100644
--- a/docs/CONTINUATION_REPAIR_IMPLEMENTATION_2026-09-10.md
+++ b/docs/CONTINUATION_REPAIR_IMPLEMENTATION_2026-09-10.md
@@ -10,6 +10,8 @@
验证:完整 release 构建 `logs/continuation-repair-20260910/reset-lifecycle-build-final.log` exit 0;`continuation-reset-final-rollback` 约 8.8 秒 32 项 PASS,覆盖真实 live scheduler 的 NR+2X 重建、匹配 GPU-ready、paused cached preview、失败回滚、停止取消及旧计数隔离。合成文件回放,不是实体采集卡;没有宣称扫描输出或物理显卡拔插已验证。测试 EXE SHA `474726E22BBAB4D8629C5232594EF6E05FC904A526D344543E94980A41AC5554`,worker SHA `EC8150FF88C7C84FACDF92B920DED2D6CEC5F682990C375A92550AFD5E818695`。
+随后把普通 open/history boundary 也接入相同记录,修正 `historyResets/settingsResets/captureDropResets` 从覆盖赋值为累计。`continuation-reset-cause-live-final` 62.6 秒通过 source-gap 与 EOF 尾批验收:3600/3600 real ready/presented、0 cancelled;它是合成回放,未当作实体采集结论。第一次 20/30 秒窗口失败是素材在本机需要约一分钟读完,已保留失败日志并将测试等待改为90秒,仍受单次290秒 watchdog限制。
+
## 2026-09-11 续接实证(优先于下面历史进度)
### 最新续接:可控音频重锚淡出
diff --git a/docs/HANDOFF_2026-09-10.md b/docs/HANDOFF_2026-09-10.md
index 38519fce..ed84182c 100644
--- a/docs/HANDOFF_2026-09-10.md
+++ b/docs/HANDOFF_2026-09-10.md
@@ -2,7 +2,7 @@
## 2026-09-11 最新进度
-已加入设置事务 reset/rebuild 生命周期证据:session/revision/epoch/source identity、重建标记、drain/destroy/create/warmup/first GPU-ready 五段边界计时,以及 Completed/RolledBack/Cancelled/Failed 结果。旧完成事件不能结束新事务,暂停缓存预览和失败回滚都有实际回归。构建 `reset-lifecycle-build-final.log` exit0,`continuation-reset-final-rollback` 29项PASS(单次约8.8秒)。下一条任务是把 capture drop/seek/scene-cut/device-lost 的统一 reset cause 与有界逐帧轨迹接入,随后再审计 AMD provider 等未完成项。未实卡、未做AMD实机、未发布。
+已加入设置事务及普通 open/history boundary 的 reset/rebuild 生命周期证据:session/revision/epoch/source identity、重建标记、drain/destroy/create/warmup/first GPU-ready 五段边界计时,以及 Completed/RolledBack/Cancelled/Failed 结果;reset counters 改为累计。旧完成事件不能结束新事务,暂停缓存预览、失败回滚、source-gap EOF 尾批都有实际回归。构建 `reset-lifecycle-build-final.log` exit0,设置/回滚32项及 source-gap 62.6秒最终通过。下一条任务是把 capture drop/seek/scene-cut/device-lost 的原因与有界逐帧轨迹进一步结构化,随后再审计 AMD provider 等未完成项。未实卡、未做AMD实机、未发布。
用户已开启目标模式,当前仍在修复。当前入口:[继续修复实施记录](CONTINUATION_REPAIR_IMPLEMENTATION_2026-09-10.md) 的2026-09-11部分;任务合同见 [继续修复方案](CONTINUATION_REPAIR_PLAN_2026-09-10.md)。不启用旧Loop,不push/发布。
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index ed543bb4..b45e7500 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -1,6 +1,7 @@
# 2026-09-11 继续修复目标模式执行中
最新 reset/rebuild 计时:`FrameFlowMetrics` 增加带 session/revision/epoch/source identity 的设置生命周期记录,区分轻量重置与资源重建,并记录 drain/destroy/create/warmup/first GPU-ready 五段 CPU 观测、完成/回滚/取消/失败结果。真实设置事务、暂停缓存预览、注入失败回滚、停止中取消均已通过 `continuation-reset-final-rollback`(约8.8秒,32项,合成文件回放)。完整 release 构建 `reset-lifecycle-build-final.log` exit0。未执行实体采集卡、真实系统跨DPI或AMD provider;目标仍active。
+普通 open/history boundary 随后接入同一记录,reset counters 改为累计;source-gap/EOF 最终 `continuation-reset-cause-live-final` 62.6秒通过(3600 real frames ready/presented,0 cancelled)。早期20/30秒窗口失败原因是素材在本机需要约一分钟读完,失败日志保留,测试上限调整为90秒(单次 watchdog仍290秒)。
最新可控淡出:基线`78675f2`,为采集设置/PTS/大偏差重锚和文件播放中seek加入真实240帧PCM淡出,WASAPI padding消耗后Reset再淡入;边界最长80ms,取消/错误退出,正常pump不加等待。55项timeline、7项真实player、11.105秒合成采集通过;重锚额外等待约16至40ms,普通偏差10.6至21.3ms。最终delivery `6304c4518f864f34a4bb91392cd16ab1`23项PASS,应用SHA `A86DB75E321677C2B9EDC0380D3BC4DCC13FAD3DE5BA05D59DA5C1C30C6BB97A`;命令、测试身份与边界见实施记录最新段。真实RTX执行,未实卡/外部听觉验收,无发布。下一任务补reset排空/销毁/创建/预热恢复计时及逐帧轨迹;AMD完整网络/provider仍缺,目标active。
diff --git a/src/engine/EngineController.cpp b/src/engine/EngineController.cpp
index 02853dc7..31267d7c 100644
--- a/src/engine/EngineController.cpp
+++ b/src/engine/EngineController.cpp
@@ -215,6 +215,17 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options){
markResetStage(diagnostics::ResetStage::FirstValid);
finishReset(diagnostics::ResetOutcome::Completed);
};
+ auto historyResetCause=[&](const pipeline::FramePacket& packet)->pipeline::ResetReason{
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::Open))return pipeline::ResetReason::Open;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::Seek))return pipeline::ResetReason::Seek;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::Drop))return pipeline::ResetReason::FrameDrop;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::Resize))return pipeline::ResetReason::Resize;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::DeviceLost))return pipeline::ResetReason::DeviceLost;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::PauseResume))return pipeline::ResetReason::PauseResume;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::Discontinuity))return pipeline::ResetReason::FrameDrop;
+ if(pipeline::hasFrameFlag(packet.flags,pipeline::FrameFlagBits::Cut))return pipeline::ResetReason::SceneCut;
+ return pipeline::ResetReason::SceneCut;
+ };
OnExit resetExit{[&]{finishReset(stop_?diagnostics::ResetOutcome::Cancelled:diagnostics::ResetOutcome::Failed);}};
auto collectTimings=[&]{
for(const auto& sample:graph.takeGpuTimings())if(frameFlow)frameFlow->gpuFrame(sample,host100ns());
@@ -430,6 +441,13 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options){
if(veyra::log::verboseFrameLogs())veyra::log::info("source-identity",std::format("source={} totalRead={} graphProcessed={} cached={} revision={} nvofStandalone={}",pkt.sequence,sourceFrames,frames+1,rereadCached,options.settings.revision,gd.enableNvofStandalone));
reset=false;hasOutput=true;
const auto processDone=Clock::now();
+ if(!resetRecord&&out.historyReset){
+ resetStart=processStart;resetStageStart=processStart;
+ resetRecord=diagnostics::FrameFlowMetrics::ResetRecord{};resetRecord->sessionId=runSessionId;resetRecord->settingsRevision=out.batch.identity.settingsRevision;resetRecord->epoch=out.batch.identity.epoch;resetRecord->sourceFrameId=out.batch.identity.sourceFrameId;resetRecord->reason=static_cast<uint8_t>(historyResetCause(pkt));
+ resetRecord->stageMs[size_t(diagnostics::ResetStage::Drain)]=0.0;resetRecord->stageMs[size_t(diagnostics::ResetStage::Destroy)]=0.0;resetRecord->stageMs[size_t(diagnostics::ResetStage::Create)]=0.0;
+ resetRecord->rebuilt=false;markResetStage(diagnostics::ResetStage::Warmup);
+ if(frameFlow)frameFlow->resetLifecycle(*resetRecord);
+ }
if(resetRecord&&resetRecord->epoch==0){
resetRecord->epoch=out.batch.identity.epoch;resetRecord->sourceFrameId=out.batch.identity.sourceFrameId;
markResetStage(diagnostics::ResetStage::Warmup);
@@ -443,7 +461,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options){
if(settingsChanged||!completionRates)completionRates=std::make_shared<FrameCompletionRates>(host100ns());
frameFlow=std::shared_ptr<FrameFlowWindow>(new FrameFlowWindow(runSessionId,out.batch.identity,host100ns(),completionRates),[](FrameFlowWindow* window){logFrameFlow(window->snapshot(monotonic100ns()),"closed");delete window;});
if(resetRecord)frameFlow->resetLifecycle(*resetRecord);else if(lastResetRecord)frameFlow->resetLifecycle(*lastResetRecord);
- frameFlow->update([&](auto& m){m.counters.historyResets=out.historyReset;m.counters.settingsResets=settingsChanged;m.counters.captureDropResets=pipeline::hasFrameFlag(pkt.flags,pipeline::FrameFlagBits::Drop);});
+ frameFlow->update([&](auto& m){m.counters.historyResets+=uint64_t(out.historyReset);m.counters.settingsResets+=uint64_t(settingsChanged);m.counters.captureDropResets+=uint64_t(pipeline::hasFrameFlag(pkt.flags,pipeline::FrameFlagBits::Drop));});
captureFlowBase=captureFlowLast;
{std::lock_guard lock(mutex_);rateSkippedBase=snapshot_.captureRateSkipped;activeFlow_=frameFlow;}
veyra::log::info("metrics",std::format("reset session={} appliedRevision={} epoch={} sourceBase={}",runSessionId,metricsRevision,metricsEpoch,statsSourceBase));
diff --git a/tests/integration/LivePresentationTests.cpp b/tests/integration/LivePresentationTests.cpp
index 31cc8266..cdbd1db0 100644
--- a/tests/integration/LivePresentationTests.cpp
+++ b/tests/integration/LivePresentationTests.cpp
@@ -46,7 +46,10 @@ int wmain(int argc,wchar_t**argv){
if(sourceGap){
check(until([](const auto& s){return s.frames==12&&s.metrics.flow.counters.realPresented==12&&s.processedCompleted==12;}),"source Waiting still completes and presents all outstanding real frames");
check(until([](const auto& s){return s.frames>=20;}),"source resumes after gap without deadlock");
- check(until([](const auto& s){return s.transport==engine::TransportState::Ended;},20),"EOF drains final live batch before marking ended");
+ // The fixture can take roughly a minute in this host and this path intentionally runs
+ // every source frame through the live scheduler; leave headroom for
+ // host scheduling without changing the bounded 290s test watchdog.
+ check(until([](const auto& s){return s.transport==engine::TransportState::Ended;},90),"EOF drains final live batch before marking ended");
const auto s=engine.snapshot();const auto& c=s.metrics.flow.counters;
std::cout<<"EOS frames="<<s.frames<<" ready="<<s.processedCompleted<<" presented="<<c.realPresented<<" cancelled="<<c.cancelledBeforePresent<<'\n';
check(s.frames>20&&s.processedCompleted==s.frames&&c.realPresented==c.realSubmitted,"last real source frame is completed and current epoch fully presented");