fegger ce52f64e52 feat(capture): implement Phase 3 PipeWire/portal desktop capture
Implement the xdg-desktop-portal ScreenCast backend via libportal: a
blocking portal handshake (interactive source picker), a PipeWire stream
on the portal's node enumerating BGRx/BGRA/RGBx/RGBA, and a latest-frame
slot handing frames to next_frame(). stop() is thread-safe; teardown
follows the order PipeWire requires. All proxy operations run under the
thread-loop lock to satisfy the protocol extension context checks
('impl_ext_end_proxy called from wrong context' otherwise).

The encoder now accepts padded strides for packed RGB inputs (real
PipeWire row pitches) and maps the new PixelFormat::Bgrx to
AV_PIX_FMT_BGRA.

Add tools/capture_smoke: a manual smoke tool (interactive, not in
meson test) that captures N frames, encodes them, and writes a
self-contained Annex-B elementary stream with prepended SPS/PPS.

Validated manually on Wayland/Hyprland: 2256x1504 H.264 elementary
stream, ffprobe clean. Phase 3 marked complete in docs/PHASES.md.
2026-09-07 10:37:14 +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%