feat(playback): make the Rust streaming engine the default preview path (#53)#189
Merged
Conversation
…th (#53) - Cargo: `playback-engine` joins the default feature set; a minimal build stays possible via --no-default-features (drops cpal/axum/tokio + the playback_* commands). - Front end: rustEngineEnabled() is default-ON — only the exact localStorage value "0" opts back out to the legacy <video> stack. - Runtime escape hatch: a startup watchdog falls back to the legacy stack (with a toast) when playback_start rejects or no playback_frame arrives within 2s (covers in-thread GPU-acquire failures that return Ok). The fallback resets on every fresh play. Decision logic is pure + unit-tested (shouldFallBackToLegacy, shouldUseRustEngine engineFailed arm). - CI: workspace steps now compile/lint/test the engine by default; the duplicate feature-gated steps are replaced by a --no-default-features clippy to keep the minimal build compiling. - Integration test: poll for the first engine frame instead of a fixed 600ms sleep (flaked under parallel GPU contention).
This was referenced Jul 4, 2026
This was referenced Jul 4, 2026
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.
What
Closes the #53 arc: the continuous Rust streaming engine (decode → wgpu composite → MJPEG + cpal master clock, merged in #170) becomes the shipped default preview path.
playback-engineis now a default cargo feature;--no-default-featureskeeps a minimal build compiling (drops cpal/axum/tokio +playback_*commands, front end falls back to legacy).rustEngineEnabled()flips to default-ON: only the exact localStorage value"0"opts out; unreadable/missing storage resolves to ON.rustEngineFailedin the store → the same play session falls through to the legacy<video>stack with a toast, the MJPEG overlay unmounts, and the flag resets on the next play. Decision logic is pure and unit-tested.--no-default-featuresclippy.Verification
Local CI parity, all green:
cargo fmt --check/cargo clippy --workspace -D warnings/cargo clippy -p opentake-tauri --no-default-features -D warningscargo test --workspace(incl. GPU+ffmpeg integration tests on this machine)pnpm build+pnpm test(43 files / 437 tests)Honest caveat: full real-machine visual acceptance (docs/architecture/PLAYBACK-ENGINE.md checklist) hasn't run — computer-use is blocked on this box. The runtime fallback above is the designed mitigation: a machine where the engine can't start degrades to the pre-#53 behavior instead of a black canvas.