build: add receiver-only configuration and a Pi install script
The receiver does not need the sender's PipeWire/xdg-desktop-portal capture stack, which small ARM boards neither have nor want. Add a -Dsender=false meson option that skips the capture backend and the sender pipeline (SC_HAS_SENDER guards in main.cpp/pipelines.cpp); receiver-only builds refuse --send with a clear message while --receive and --discover work unchanged. scripts/install-receiver.sh targets such boards (e.g. Raspberry Pi Zero 2 W): installs build and runtime dependencies via apt, checks the compiler for C++20 <format> support before the long build (GCC 13+, i.e. Raspberry Pi OS Trixie), builds SDL3 from source when the distro does not package it, compiles a receiver-only binary, runs the test suite, installs to /usr/local/bin, and enables avahi-daemon. Also refresh the stale README (phases, dependencies, current roadmap, Pi receiver section). Validated in both configurations: meson test 5/5 each; the receiver-only build has no PipeWire/portal references, refuses --send cleanly, and --discover works headlessly.
This commit is contained in:
@@ -4,21 +4,21 @@ 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**.
|
||||
- Discover receivers on the LAN via **mDNS/Avahi**; negotiate sessions with
|
||||
**JSON signaling**; stream **H.264 over RTP/UDP**.
|
||||
|
||||
> This project is in early development. The H.264 codec path is implemented;
|
||||
> capture, transport, and rendering are still in progress.
|
||||
Built with **C++20**, **Meson**, **PipeWire**, **FFmpeg**, and **SDL3**.
|
||||
|
||||
## Quick start
|
||||
|
||||
Requirements:
|
||||
|
||||
- C++20 compiler (GCC 12+, Clang 16+)
|
||||
- Meson >= 0.63
|
||||
- Ninja
|
||||
- C++20 compiler with `<format>` (GCC 13+, Clang 18+)
|
||||
- Meson >= 0.63, Ninja
|
||||
- FFmpeg development packages (`libavcodec`, `libavutil`, `libswscale`)
|
||||
- (later phases) PipeWire dev, SDL2/3 dev
|
||||
- SDL3 development package (`sdl3`)
|
||||
- nlohmann JSON (`nlohmann_json`) and Avahi client (`avahi-client`)
|
||||
- For the sender only: PipeWire dev (`libpipewire-0.3`) and libportal
|
||||
|
||||
Build and run tests:
|
||||
|
||||
@@ -28,12 +28,35 @@ meson compile -C build
|
||||
meson test -C build --print-errorlogs
|
||||
```
|
||||
|
||||
Run with verbose test output:
|
||||
Stream between two machines:
|
||||
|
||||
```sh
|
||||
meson test -C build -v
|
||||
screencast --receive # machine A: announces itself, opens a window
|
||||
screencast --send # machine B: discovers A, negotiates, streams
|
||||
```
|
||||
|
||||
See `docs/RUNBOOK.md` for all modes, flags, and validation procedures.
|
||||
|
||||
## Receiver on a small ARM board (e.g. Raspberry Pi Zero 2 W)
|
||||
|
||||
The receiver does not need the sender's PipeWire/portal capture stack. On
|
||||
the board, run:
|
||||
|
||||
```sh
|
||||
sudo ./scripts/install-receiver.sh
|
||||
screencast --receive
|
||||
```
|
||||
|
||||
The script installs the dependencies, builds a receiver-only binary
|
||||
(`-Dsender=false`), runs the test suite, and installs to `/usr/local/bin`
|
||||
(override with `SC_RECEIVER_INSTALL_DIR`). It needs Raspberry Pi OS Trixie
|
||||
or newer (GCC 13+ for C++20 `<format>`), builds SDL3 from source when the
|
||||
distribution does not package it, and enables `avahi-daemon`.
|
||||
|
||||
Performance note: decoding is software H.264; on very small boards expect
|
||||
smooth playback for modest resolutions and reduced frame rates at high
|
||||
resolutions. Hardware decode is planned for Phase 7.
|
||||
|
||||
## Architecture
|
||||
|
||||
See `docs/ARCHITECTURE.md` for module boundaries and design rules.
|
||||
@@ -42,8 +65,8 @@ See `docs/ARCHITECTURE.md` for module boundaries and design rules.
|
||||
|
||||
Development is split into phases in `docs/PHASES.md`.
|
||||
|
||||
Current phase: **Phase 3 — PipeWire screen capture**.
|
||||
Current phase: **Phase 7 — Resilience and polish**.
|
||||
|
||||
## License
|
||||
|
||||
MIT — see `LICENSE` (to be added).
|
||||
MIT — see `LICENSE` (to be added).
|
||||
Reference in New Issue
Block a user