fegger d2736b8a94 fix(render): keep the whole SDL lifecycle on the render thread
The receiver window never appeared on Wayland. Two causes:

- The window was created on the main thread while event pumping and
  presenting ran on the render thread. SDL's Wayland backend requires a
  window's creation, event processing, drawing, and destruction to
  happen on one thread; a cross-thread surface simply never maps, with
  no error reported. The renderer now lives entirely on the render
  thread, with a condition-variable handshake so ReceiverPipeline::
  start() still reports renderer failures and timeouts.
- On Wayland a window is invisible until the first render commit, so
  even a healthy receiver showed nothing while waiting for a stream.
  The renderer presents one blank frame at init: the window is visible
  immediately, black until video arrives.

Also log 'stream started (WxH)' when the first frame decodes and the
first rendering failure, which is what made the remaining debugging
observable.

Validated headlessly end-to-end: a synthetic solid-color RTP feed drove
the real receiver over localhost UDP; the window mapped, reported
'stream started (320x240)', and a grim screenshot of the window region
showed the fed color (V=198, SATAVG=74 during the red feed). Phase 5
marked complete in docs/PHASES.md; current phase is now Phase 6.
2026-09-07 11:17:35 +02:00

screen_cast

A native Linux peer-to-peer screencast application.

  • Send your desktop or a window to another Linux machine.
  • Receive a stream and render it in a window.
  • Built with C++20, Meson, PipeWire, FFmpeg, RTP/UDP, and SDL.

This project is in early development. The H.264 codec path is implemented; capture, transport, and rendering are still in progress.

Quick start

Requirements:

  • C++20 compiler (GCC 12+, Clang 16+)
  • Meson >= 0.63
  • Ninja
  • FFmpeg development packages (libavcodec, libavutil, libswscale)
  • (later phases) PipeWire dev, SDL2/3 dev

Build and run tests:

meson setup build
meson compile -C build
meson test -C build --print-errorlogs

Run with verbose test output:

meson test -C build -v

Architecture

See docs/ARCHITECTURE.md for module boundaries and design rules.

Roadmap

Development is split into phases in docs/PHASES.md.

Current phase: Phase 3 — PipeWire screen capture.

License

MIT — see LICENSE (to be added).

S
Description
No description provided
Readme 1.2 MiB
Languages
C++ 60.6%
Swift 18%
Kotlin 15.2%
Shell 3.9%
Meson 2%
Other 0.2%