How hhaider3/macmpv works
macmpv is a native macOS media player. Users open local media, network streams, or torrents; the player manages playback and queue state, displays video and controls, and can inspect media metadata. The graph includes the documented torrent, preview, subtitle, resume, and queue capabilities. Source excerpts support the main app-to-player and playback relationships; several feature links are documented in the README rather than verified in sampled implementation code.
Main entry points: PlayerModel.swift Player state and orchestration · ContentView.swift Player window · PlayerControls.swift Playback controls · CinewaveApp.swift App entry and commands
Components 20
App and interface
- App entry and commands
Sources/Cinewave/CinewaveApp.swift - Player window
Sources/Cinewave/ContentView.swift - Playback controls
Sources/Cinewave/PlayerControls.swift - Queue sidebar
Sources/Cinewave/QueueSidebar.swift - Seek preview popover
Sources/Cinewave/SeekPreviewPopover.swift
Playback and media
- Player state and orchestration
Sources/Cinewave/PlayerModel.swift - Queue operations
Sources/Cinewave/PlayerModel+Queue.swift - Media types and support
Sources/Cinewave/MediaModels.swift - Video surface
Sources/Cinewave/VideoSurface.swift - mpv engine
Sources/Cinewave/MPVEngine.swift - Seek preview generation
Sources/Cinewave/SeekPreview.swift - Playback completion
Sources/Cinewave/PlaybackCompletion.swift
Torrent streaming
- Torrent session and stream
Sources/Cinewave/MagnetStream.swift - WebTorrent runtime helper
Sources/Cinewave/TorrentDownloadRuntime.swift
Metadata and state
- Media metadata probe
Sources/Cinewave/MediaProbe.swift - Playback persistence
Sources/Cinewave/PlayerModel+Persistence.swift
Other components
- macOS user
- mpv playback library
- WebTorrent CLI and library
- ffprobe
Connections 22
- macOS user → App entry and commands: opens media
README.md - App entry and commands → Player window: creates window
Sources/Cinewave/CinewaveApp.swift - Player window → Playback controls: renders
Sources/Cinewave/ContentView.swift - Player window → Queue sidebar: renders
Sources/Cinewave/ContentView.swift - Player window → Video surface: renders
Sources/Cinewave/ContentView.swift - Playback controls → Player state and orchestration: invokes actions
Sources/Cinewave/PlayerControls.swift - Queue sidebar → Player state and orchestration: invokes queue actions
Sources/Cinewave/QueueSidebar.swift - App entry and commands → Player state and orchestration: creates state
Sources/Cinewave/CinewaveApp.swift - Player state and orchestration → mpv engine: controls playback
Sources/Cinewave/PlayerModel.swift - Player state and orchestration → Media metadata probe: requests metadata
Sources/Cinewave/PlayerModel.swift - Player state and orchestration → Torrent session and stream: starts torrent stream
Sources/Cinewave/PlayerModel.swift - Player state and orchestration → Playback completion: checks completion
Sources/Cinewave/PlayerModel.swift - Player state and orchestration → Queue operations: manages queue
Sources/Cinewave/PlayerModel+Queue.swift - Video surface → mpv engine: renders frames
Sources/Cinewave/VideoSurface.swift - mpv engine → mpv playback library: embeds playback
README.md - Media metadata probe → ffprobe: reads metadata
README.md - Torrent session and stream → WebTorrent runtime helper: uses runtime helper
Sources/Cinewave/MagnetStream.swift - WebTorrent runtime helper → WebTorrent CLI and library: starts torrent client
Sources/Cinewave/TorrentDownloadRuntime.swift - Torrent session and stream → WebTorrent CLI and library: streams torrent files
README.md - Playback controls → Seek preview generation: requests seek preview
- Playback controls → Seek preview popover: shows preview
Sources/Cinewave/PlayerControls.swift - Player state and orchestration → Playback persistence: saves playback state
Sources/Cinewave/PlayerModel+Persistence.swift