Repository navigation
fix(video): isolate optional Program publication (#804) - #809
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #804.
Prepared Program frames previously expired while the delivery clock executed optional shell/multiview keyed copies and Flush calls. Move those exports to two independent device/context owners. Native delivery publishes the GPU-ready packet/PTS without D3D calls; each optional reader admits at most one immutable source lease, verifies actual GPU read completion before reuse, and refuses work while busy. Keep the two-frame setting and existing depth + 3 slot capacity.
The real shell snapshot and multiview PGM consumer now publish separately, preserving exact frame metadata and the existing stable output handles. Add bounded branch counters and separate acquire/copy/flush/query wall-time traces. GPU-query uncertainty quarantines a source lease and disables that reader. The fixed snapshot pool adds about 39.6 MiB at 1080p/two-frame buffering. Driver APIs that never return can still prevent teardown joining; no device recreation claim.
Validation: exact final head
197c8cd, Release build, full native suite 1,467 passed / 0 failed, including all seven Program-buffer tests. The deterministic fault blocks either optional exporter for about one second and verifies 60/60 native NV12 packets, sequence/pixel identity, zero active-workload underruns/overflows, bounded two-reader ownership, advancing actual GPU pixels in the other reader, and retained original pixels after the delayed read resumes. The unchanged full-size cadence test also passes. Original failed 23.654 ms publication trial remains retained.Three matched inline/isolated pairs passed (120 measured seconds each, ten-second warmup, eight synthetic I420 1080p30 inputs plus 1080p/1440p BGRA captures, Program/Preview/MV 1080p60, buffer two, CPU preparation zero, local MP4). Across all six trials: 43,248 measured Program packets, zero Program underruns/delivery misses/output sequence gaps/skipped production slots/audio sample loss, and zero recorder missing frames/encoder video or audio queue drops/failures. Inline mean work was 4.600/4.615/4.676 ms; isolated 0.943/1.045/0.878 ms. All final-head CI and CodeQL checks passed, including Windows shell and production compile, Metal/full/stub/mac, TSan, unit/version and show drill.
These are synthetic aggregate results, not receiver/display, decoded A/V, real SDK/capture or installed/fleet qualification. Branch completion traces include warmup/tail and must not be equated with the measured interval or display consumption. All snapshots, stderr, MP4s, manifests and original failed trials remain private.
Default isolation/preparation flags and installed application are unchanged. Parent #517 receiver/display, A/V, long soak, installed/fleet and lifecycle qualification remain open. PR #808 stays draft while #804 is qualified; this branch is based on merged #806, independently of #808.