How nake13/khuaplayer works
Khua is a native macOS media player. The main workflow is opening a media file in the player, decoding and presenting it, with optional subtitle, enhancement, and damaged-file recovery features; Finder Quick Look is a separate playback entry point. The graph also preserves the documented release website and edge service. Some implementation paths are represented by their exact enclosing directories because their source was not sampled; dashed links mark unverified integration.
Main entry points: PlayerViewController.swift Player interface · CaptionEngine.swift Caption generation · SPPlayerCore.h Media playback core · AppDelegate.swift App lifecycle
Components 24
Mac app
- App lifecycle
Apps/Mac/UI/AppDelegate.swift - Player window
Apps/Mac/UI/PlayerWindowController.swift - Player interface
Apps/Mac/UI/PlayerViewController.swift - Welcome and history
Apps/Mac/UI/WelcomeView.swift - Recent plays
Apps/Mac/UI/RecentPlays.swift - Quick Look playback
Apps/Mac/QuickLook/Preview/QuickLookPreviewViewController.swift - Playback sleep control
Apps/Mac/UI/SPPlaybackSleepController.swift
Playback engine
- Media playback core
Modules/MediaCore/Bridge/SPPlayerCore.h - Demux and stream reads
Modules/MediaCore/Core/Demuxer.cpp - Container recovery
Modules/MediaCore/Core/Recovery - Bitstream resilience
Modules/MediaCore/Core/Resilience - Motion interpolation
Modules/VideoEnhancement
Caption tools
- Caption controls
Apps/Mac/CaptionsHost/CaptionsController.swift - Caption task center
Apps/Mac/CaptionsHost/CaptionTaskCenter.swift - Caption generation
Modules/Captions/CaptionEngine.swift - Speech transcription
Modules/Captions/CaptionTranscriber.swift - Caption translation
Apps/Mac/CaptionsHost/CaptionTranslator.swift - SRT parsing and output
Modules/Captions/CaptionSRT.swift
Release website
- Product and release site
Website/src/App.jsx - Release listings
Website/src/Releases.jsx - Release edge service
Website/cloudflare/index.ts - Release catalog
Website/cloudflare/catalog.ts
Other components
- Mac user
- Finder Quick Look
Connections 24
- Mac user → App lifecycle: opens app
Apps/Mac/UI/AppDelegate.swift - App lifecycle → Player window: creates windows
Apps/Mac/UI/AppDelegate.swift - Player window → Player interface: hosts
Apps/Mac/UI/PlayerWindowController.swift - Player interface → Media playback core: controls playback
- App lifecycle → Welcome and history: shows welcome
Apps/Mac/UI/AppDelegate.swift - Welcome and history → Recent plays: reads recent plays
Apps/Mac/UI/WelcomeView.swift - Player interface → Recent plays: updates history
Apps/Mac/UI/PlayerViewController.swift - Finder Quick Look → Quick Look playback: previews media
Apps/Mac/QuickLook/Preview/QuickLookPreviewViewController.swift - Quick Look playback → Media playback core: creates preview core
Apps/Mac/QuickLook/Preview/QuickLookPreviewViewController.swift - Quick Look playback → Playback sleep control: uses sleep control
Apps/Mac/QuickLook/Preview/QuickLookPreviewViewController.swift - Media playback core → Demux and stream reads: reads streams
- Demux and stream reads → Container recovery: uses recovery
Modules/MediaCore/Core/Demuxer.cpp - Demux and stream reads → Bitstream resilience: uses resilience
Modules/MediaCore/Core/Demuxer.cpp - Media playback core → Motion interpolation: routes interpolation
- Player interface → Caption controls: hosts caption controls
Apps/Mac/UI/PlayerViewController.swift - Caption controls → Caption task center: submits tasks
Apps/Mac/CaptionsHost/CaptionsController.swift - Caption task center → Caption generation: runs generation
Apps/Mac/CaptionsHost/CaptionTaskCenter.swift - Caption generation → Speech transcription: transcribes audio
Modules/Captions/CaptionEngine.swift - Caption generation → Caption translation: translates cues
Modules/Captions/CaptionEngine.swift - Caption generation → SRT parsing and output: formats sidecars
Modules/Captions/CaptionEngine.swift - Mac user → Product and release site: visits site
- Product and release site → Release listings: shows releases
Website/src/App.jsx - Release listings → Release catalog: reads catalog
Website/src/Releases.jsx - Release edge service → Release catalog: parses catalog
Website/cloudflare/index.ts