How omarroth/doubletake works
doubletake is a cross-platform AirPlay sender for desktop mirroring and media playback. The interactive CLI discovers or accepts a receiver, pairs and negotiates a session, captures screen/audio or reads a media source, then streams it; the daemon adds multi-receiver control and shared capture. The graph preserves the documented capture, audio, adaptive-quality, and daemon capabilities. Evidence is limited to the supplied README and excerpts; links based only on README-level behavior cite README.md, and unsampled internals are not mapped more narrowly.
Main entry points: main.go Sender CLI · daemon.go Session coordinator · client.go AirPlay client · capture.go Desktop capture
Components 16
CLI workflow
- Sender CLI
cmd/doubletake/main.go - Receiver search
cmd/doubletake/device_search.go
Receiver control
- AirPlay discovery
internal/airplay/discovery.go - AirPlay client
internal/airplay/client.go - Pairing and credentials
internal/airplay/pairing.go - Mirroring session
internal/airplay/mirror.go
Capture and media
- Desktop capture
internal/airplay/capture.go - Capture broadcast
internal/airplay/capture_broadcast.go - GStreamer pipeline
internal/airplay/capture_pipeline_linked.go - Audio capture and encoding
internal/airplay/audio.go - Video rate control
internal/airplay/video_rate_control.go
Multi-receiver daemon
- Daemon commands
internal/daemon/daemoncli/cli.go - Daemon socket client
internal/daemon/daemonclient/client.go - Session coordinator
internal/daemon/daemon.go
Other components
- User
- AirPlay receiver
Connections 22
- User → Sender CLI: runs
README.md - Sender CLI → Receiver search: selects receiver
README.md - Receiver search → AirPlay discovery: browses
cmd/doubletake/device_search.go - Sender CLI → AirPlay client: connects
cmd/doubletake/main.go - AirPlay client → AirPlay receiver: negotiates session
README.md - Sender CLI → Pairing and credentials: pairs and verifies
cmd/doubletake/main.go - Pairing and credentials → AirPlay receiver: authenticates
README.md - Sender CLI → Desktop capture: starts capture
cmd/doubletake/main.go - Desktop capture → Capture broadcast: produces frames
README.md - Capture broadcast → Mirroring session: streams video
- Sender CLI → Audio capture and encoding: captures audio
README.md - Audio capture and encoding → AirPlay receiver: streams audio
README.md - Sender CLI → GStreamer pipeline: plays media source
README.md - GStreamer pipeline → AirPlay receiver: streams encoded media
- Video rate control → AirPlay receiver: adapts video quality
README.md - User → Daemon commands: controls sessions
README.md - Daemon commands → Daemon socket client: sends commands
internal/daemon/daemoncli/cli.go - Daemon socket client → Session coordinator: sends socket request
internal/daemon/daemonclient/client.go - Session coordinator → AirPlay discovery: discovers receivers
- Session coordinator → AirPlay client: manages sessions
- Session coordinator → Desktop capture: shares capture
internal/daemon/daemon.go - Session coordinator → AirPlay receiver: serves streams
README.md