1# llimphi-video-plane23A spike for "attach video in llimphi": video as a real `wl_subsurface` over
4winit's `wl_surface`, so mirada composites it (Phase 1) and eventually scans it
5out on an overlay plane, **without going through vello's intermediate texture**.
67The wall it validates (Phase 0, already OK): winit does not expose subsurfaces, so
8a **second** `wayland-client` connection is mounted over the SAME foreign
9`wl_display` (`Backend::from_foreign_display`), winit's `wl_surface` is wrapped
10through `ObjectId::from_ptr`, and a child `wl_subsurface` is created on it.
11`set_desync` → the child commits on its own; position and ordering are latched on
12the parent's commit (which winit does on present; the subsurface tracks the
13parent when moved).
1415Two modes:
1617- **no arguments** → a solid colour quad (validates the subsurface).
18- **`subsurface-spike <file>`** → real frames from that video (Phase 1a), decoded
19 by `foreign-av`, uploaded to the subsurface through shm (3 round-robin buffers,
20 RGBA→ARGB8888). The winit UI only clears the background.
2122Keys: `B` = subsurface below/above the parent · `T` = UI background
23transparent/opaque (the "hole" the plane peeks through) · `ESC` = quit.
2425## Use2627```sh28cargo run --release -p llimphi-video-plane --bin subsurface-spike
29```3031---
3233Part of **llimphi** — see [llimphi](../README.md).
README.md
llimphi-video-plane
A spike for "attach video in llimphi": video as a real wl_subsurface over
winit's wl_surface, so mirada composites it (Phase 1) and eventually scans it
out on an overlay plane, without going through vello's intermediate texture.
The wall it validates (Phase 0, already OK): winit does not expose subsurfaces, so
a secondwayland-client connection is mounted over the SAME foreign
wl_display (Backend::from_foreign_display), winit's wl_surface is wrapped
through ObjectId::from_ptr, and a child wl_subsurface is created on it.
set_desync → the child commits on its own; position and ordering are latched on
the parent's commit (which winit does on present; the subsurface tracks the
parent when moved).
Two modes:
no arguments → a solid colour quad (validates the subsurface).
subsurface-spike <file> → real frames from that video (Phase 1a), decoded
by foreign-av, uploaded to the subsurface through shm (3 round-robin buffers,
RGBA→ARGB8888). The winit UI only clears the background.
Keys: B = subsurface below/above the parent · T = UI background
transparent/opaque (the "hole" the plane peeks through) · ESC = quit.
Use
cargo run --release -p llimphi-video-plane --bin subsurface-spike