Skip to content

Recover native video stalls from actual frame progress - #972

Merged
capy-ai[bot] merged 2 commits into
devfrom
capy/recover-native-frame-progress
Sep 16, 2026
Merged

capy-ai[bot] merged 2 commits into
devfrom
capy/recover-native-frame-progress

Conversation

@zortos293

Copy link
Copy Markdown
Collaborator

Summary

Adds transport, decoder and Qt swap-stall recovery on top of the frame-stage measurements in #965.

  • Transport recovery distinguishes packet receipt from completed frame assembly and uses bounded keyframe/recovery transitions.
  • Decoder recovery follows outstanding submissions and actual decoded outputs. Assembly resuming hands responsibility back to the decoder even when decoder acceptance remains stuck.
  • Qt recovery requires observed decoded-output growth relative to its current swap baseline. A fresh tracking flag alone is not evidence. New swaps and decoder epochs reseed the baseline, and the first usable sample cannot borrow zero-valued placeholder progress.
  • The Qt path performs one resource rearm, preserves its grace through resource cleanup, and emits a terminal outcome at most once. Missing coherent evidence suspends decisions, including after rearm. Explicit upstream stall/recovery states and external presentation changes reset the episode.

The runtime validates counters as finite, nonnegative exact JSON integers and scopes telemetry to the accepted start ID. A single-writer sequence-guarded snapshot uses paired release/acquire fences and bounded render-thread reads; an unsuccessful read supplies no usable evidence.

Independent verification

  • Focused native core and transport tests: 321 passed.
  • cargo test --locked --manifest-path native/opennow-streamer/Cargo.toml --workspace: 694 passed, 9 ignored.
  • Workspace formatting and locked all-target Clippy with -D warnings passed.
  • Debug Qt build and both focused runtime/presentation test targets passed.
  • ctest --test-dir build/opennow-qt --no-tests=error --output-on-failure: 338/338 passed.
  • Independent standalone replays failed before the corrections and pass on this exact header: healthy swaps followed by a frozen counter cannot authorize recovery; missing evidence after rearm cannot trigger a terminal outcome.
  • The published 14-file tree matched the final checkpoint byte-for-byte.

Rendered Qt fixtures

The final binary passed the account-free stream UI fixture in windowed and fullscreen modes, with the overlay open and closed, under Xvfb and Vulkan. The black video background is expected because these fixtures do not start media. They verify stream chrome and retained-surface behavior, not real GPU-stall recovery.

Final Qt stream fixtures in four window and overlay states

Limits and dependency

No authenticated session or real GPU stall was exercised. A larger decoded-output count proves observed progress since the stored baseline, not an exact producer observation time or absolute exclusion between asynchronous recovery paths.

Base: capy/measure-native-frame-progress at 310528ea8c7d462ebb175269f048c12e7dd99cf9. Land #965 first and revalidate the combined stack before merging.

Open in Capy

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c9dc4a6b-e0cf-487f-8bdf-41c1b86ab77f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@capy-ai
capy-ai Bot changed the base branch from capy/measure-native-frame-progress to dev September 16, 2026 07:53
@capy-ai
capy-ai Bot merged commit 78a9058 into dev Sep 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant