How yukarikaname/openchromecast works
openchromecast emulates a Chromecast flinging receiver: a Cast sender discovers it on the LAN, connects over TLS, launches a receiver session, then submits media URLs and playback controls that are handled by Cast namespaces and delegated to a local player. Receiver and media state feed protocol status responses; mpv and VLC are alternative backends. The README also documents YouTube MDX and media queues. Those capabilities are represented from documentation, but their internal wiring is not inferred beyond the sampled code.
Main entry points: server.rs TLS and dispatch · main.rs Runtime entry · mod.rs Player actor · state.rs Session state
Components 19
Application runtime
- Runtime entry
src/main.rs - CLI config
src/config.rs - Session state
src/state.rs
Cast protocol
- Device identity
src/crypto.rs - mDNS advertisement
src/mdns.rs - TLS and dispatch
src/server.rs - Cast messages
src/proto.rs - Receiver control
src/receiver.rs - Media namespace
src/media.rs - YouTube MDX
src/youtube.rs
Playback
- Player actor
src/player/mod.rs - mpv backend
src/player/mpv.rs - VLC backend
src/player/vlc.rs
User interface
- System tray
src/tray.rs
Other components
- Cast sender
- mpv process
- VLC process
- Login startup
- Local network
Connections 25
- Cast sender → Local network: browses Cast
- Runtime entry → CLI config: parses options
- Runtime entry → Device identity: loads identity
- Runtime entry → mDNS advertisement: advertises device
- mDNS advertisement → Local network: publishes service
- Runtime entry → TLS and dispatch: starts listener
- Cast sender → TLS and dispatch: opens TLS
- TLS and dispatch → Device identity: authenticates sender
- TLS and dispatch → Cast messages: frames messages
- TLS and dispatch → Receiver control: dispatches namespace
- TLS and dispatch → Media namespace: dispatches namespace
- TLS and dispatch → YouTube MDX: dispatches namespace
- Receiver control → Session state: reads and updates
- Media namespace → Session state: reads and updates
- YouTube MDX → Session state: uses session state
- Receiver control → Player actor: sets volume
- Media namespace → Player actor: controls playback
- TLS and dispatch → Session state: tracks connections
- Player actor → mpv backend: selects backend
- Player actor → VLC backend: selects backend
- mpv backend → mpv process: controls via JSON IPC
- VLC backend → VLC process: controls via RC
- Runtime entry → System tray: starts interface
- System tray → Runtime entry: requests shutdown
- System tray → Login startup: toggles login start