The PKGBUILD builds from the surrounding source tree (makepkg's -flto is
disabled because it breaks the libspa-sys C shim). The user unit and the
env example ship the intended deployment, and gamescope-tv.conf documents the
gamescope session it is meant to run against.
fake_gamescope mirrors gamescope 3.16.28's src/pipewire.cpp closely enough to
exercise the requested_size negotiation, MemFd buffers and CORRUPTED frames.
e2e-fake.sh runs it against the client and the mock in the current PipeWire
session; nested-gamescope.sh does the same with a real nested gamescope and
compares the load with the old gstreamer pipeline.
The mock imitates FlatBuffersServerConnection and FlatBuffersParser (spec
3.2), including the priority handling, the idle timeout and the reject paths,
so the client can be tested against it over a real socket. It doubles as a
standalone example binary for end-to-end runs.
Finds the gamescope node, negotiates a small BGRx MemFd format through
gamescope's requested_size extension, converts each buffer and publishes it
into the frame slot. Runs on the PipeWire main loop in the main thread.
proto encodes registration, image and clear requests with the
[u32 big-endian length][flatbuffer] framing and decodes the replies. client
drives them from a thread: it connects while frames flow, applies the pacer,
sends keepalives and reconnects with backoff.
Box filter for integer scale factors, fixed-point area averaging otherwise.
The source view is bounds-checked so a short or misdescribed PipeWire buffer
is reported instead of read out of range.
The PipeWire thread publishes into a single slot and the network thread takes
from it, swapping buffers instead of copying so the steady state does not
allocate. An older pending frame is dropped when a newer one arrives.
The .fbs files come from HyperHDR (see schema/NOTICE); the *_generated.rs
files are flatc output regenerated by scripts/regen-fbs.sh, which refuses to
run unless flatc matches the pinned flatbuffers crate.