From f11f5eddd5824066eb08d3651748decb43816b97 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Fri, 21 Aug 2026 19:06:13 +0200 Subject: [PATCH] docs(specs): record the Linux native-video compositing spike Adds the spike write-up and re-opens finding 2 of playback-backend-unification.md, which concluded that video cannot unify on a native engine because the webview owns the surface. That finding's general form has since been falsified on Android, where native video composites behind a transparent WebView and ships on by default. The evidence behind it was also entirely about foreign-window embedding -- mpv's render API, drawing into a GL context we own inside Tauri's own GTK tree, was never tested. The spike tests that one claim and comes back green on Linux for both X11 and Wayland, bar the Tauri default_vbox() half of G1. Findings 3-6 are deliberately left standing. Finding 3 in particular -- mpv has no adaptive bitrate -- is an independent disqualifier that a green compositing result does not clear, and the spike says so rather than reading as a green light. The next-free-id line moves to UR-079 / IR-033 / DR-219: this branch allocated UR-077 and UR-078 for the updater and diagnostics work, and DR-215 through DR-218 with them, after that line was last written. Authored in a parallel session working in the same checkout; committed here so it travels with the rest of the branch. --- docs-site/SUMMARY.md | 1 + docs/specs/README.md | 5 +- docs/specs/linux-native-video-spike.md | 409 +++++++++++++++++++++ docs/specs/playback-backend-unification.md | 11 + 4 files changed, 424 insertions(+), 2 deletions(-) create mode 100644 docs/specs/linux-native-video-spike.md diff --git a/docs-site/SUMMARY.md b/docs-site/SUMMARY.md index c8733acd..ce86b824 100644 --- a/docs-site/SUMMARY.md +++ b/docs-site/SUMMARY.md @@ -32,6 +32,7 @@ - [Spec Template](specs/SPEC-TEMPLATE.md) - [Spec Review Checklist](specs/SPEC-REVIEW-CHECKLIST.md) - [Playback Backend Unification](specs/playback-backend-unification.md) +- [Linux Native Video Spike](specs/linux-native-video-spike.md) - [Player Facade Enforcement](specs/player-facade-enforcement.md) - [Windows Native Audio Backend](specs/windows-native-audio-backend.md) - [libmpv2 Migration](specs/libmpv2-migration.md) diff --git a/docs/specs/README.md b/docs/specs/README.md index d40f668b..4ac015a9 100644 --- a/docs/specs/README.md +++ b/docs/specs/README.md @@ -27,8 +27,8 @@ know how something *works*, read | Design authority | No code of its own — it records a decision later specs act on. | **Next free requirement ids** (always re-check -[requirements.md](../requirements.md) before allocating): **UR-077**, -**IR-033**, **DR-215**. Three specs below suggested ids that have since been +[requirements.md](../requirements.md) before allocating): **UR-079**, +**IR-033**, **DR-219**. Three specs below suggested ids that have since been taken by other work; each carries a ⚠️ note at the top. ## Partially implemented @@ -47,6 +47,7 @@ taken by other work; each carries a ⚠️ note at the top. | [build-provenance.md](build-provenance.md) | `build.rs` is still bare. ⚠️ suggested id DR-093 is taken. | | [player-facade-enforcement.md](player-facade-enforcement.md) | ~60 `commands.player*` sites still outside the facade; no lint rule. ⚠️ suggested id DR-095 is taken. | | [windows-native-audio-backend.md](windows-native-audio-backend.md) | Blocked on the libmpv2 swap. ⚠️ suggested id IR-030 is taken. | +| [linux-native-video-spike.md](linux-native-video-spike.md) | **Spike run 2026-08-21: compositing works on Linux, X11 and Wayland.** G1-G6 green bar the Tauri `default_vbox()` half of G1. Needs an implementation spec that answers adaptive bitrate. | ## Design authority diff --git a/docs/specs/linux-native-video-spike.md b/docs/specs/linux-native-video-spike.md new file mode 100644 index 00000000..9ce7bc1d --- /dev/null +++ b/docs/specs/linux-native-video-spike.md @@ -0,0 +1,409 @@ +# Spec: Linux native video — bounded compositing spike + +**Status:** **Run 2026-08-21 — G1-G6 green except the Tauri-tree half of G1.** +The compositing claim it set out to test is falsified on Linux. See "Result". +This file stays open until the implementation spec exists; ABR is unresolved. +**Requirements:** none allocated. This spike produces a decision record, not +product code — same shape as +[playback-backend-unification.md](playback-backend-unification.md), which is +Accepted with no requirement ids of its own. Ids are allocated by the +*implementation* spec that follows a green result. +**UX spec:** n/a +**Supersedes / revises:** re-opens finding 2 of +[playback-backend-unification.md](playback-backend-unification.md) on Linux only. +Its findings 3, 4, 5 and 6 stand unchallenged and are **not** in scope here. + +**Destination on completion:** +[05-platform-backends.md](../architecture/05-platform-backends.md) — a "Native +Video Compositing (Linux)" section alongside the existing Android one. The +durable half is the mechanism and the two traps below; the gates and phases are +disposable. + +## Summary + +Test one falsifiable claim: *a native video surface cannot be composited with a +Tauri webview on Linux.* The claim is load-bearing — it is why Linux video goes +through an h264 HLS transcode into a WebKitGTK `