How chkzl/ddtv works
DDTV is a Bilibili live-stream companion: users configure followed rooms and account access, then the Core monitors live status, records streams and chat events, and exposes status and controls through Server or Desktop. The README documents automatic recording, event capture, post-processing, REST/WebSocket access, and desktop playback. Sampled source supports several Core initialization and dependency links; some feature-level wiring is documented but its implementation was not sampled.
Main entry points: RoomInfo.cs Room monitoring · Init.cs Core startup · Program.cs Server host · MainWindow.xaml.cs Desktop interface
Components 20
Core runtime
- Core startup
Core/Init.cs - Settings and rooms
Core/Config.cs - Account session
Core/RuntimeObject/Account.cs - QR login
Core/Account/Kernel/ByQRCode.cs - Room monitoring
Core/RuntimeObject/RoomInfo.cs - Live event capture
Core/LiveChat/LiveChatListener.cs - Stream recording
Core/RuntimeObject/Download/HLS.cs - Watch heartbeat
Core/RuntimeObject/WatchHeartbeatManager.cs - Merge and transcode
Core/Tools/Transcode.cs - Update checks
Core/Tools/ProgramUpdates.cs - Operation events
Core/LogModule/OperationQueue.cs
Server access
- REST API
Server/WebAppServices/Api - API authentication
Server/WebAppServices/Api/InterfaceAuthentication.cs - WebSocket push
Server/WebAppServices/Middleware/WebSocketControl.cs - Server host
Server/Program.cs
Desktop experience
- Desktop interface
Desktop/MainWindow.xaml.cs - Room dashboard data
Desktop/DataSource/RetrieveData.cs - Live playback
Desktop/Views/Windows/VlcPlayWindow.xaml.cs
Client shell
- Embedded UI shell
Client/MainWindow.xaml.cs
Other components
- Operator
Connections 20
- Operator → Settings and rooms: configures rooms
- Core startup → Settings and rooms: initializes
Core/Init.cs - Core startup → Account session: checks login
Core/Init.cs - Core startup → Update checks: starts checks
Core/Init.cs - Account session → QR login: supports QR login
Core/RuntimeObject/Account.cs - Room monitoring → Live event capture: starts listener
Core/RuntimeObject/RoomInfo.cs - Room monitoring → Stream recording: manages recording
Core/RuntimeObject/RoomInfo.cs - Watch heartbeat → Room monitoring: checks live status
Core/RuntimeObject/WatchHeartbeatManager.cs - Operator → Room monitoring: monitors followed rooms
- Live event capture → Stream recording: records chat timeline
- Stream recording → Merge and transcode: merges and transcodes
- Server host → REST API: hosts endpoints
Server/Program.cs - Server host → WebSocket push: configures push
Server/Program.cs - REST API → API authentication: uses authentication
- Operator → REST API: uses REST API
- Operator → WebSocket push: receives updates
- Desktop interface → Room dashboard data: displays room data
- Desktop interface → Live playback: opens playback
- Operator → Desktop interface: uses desktop GUI
- Embedded UI shell → Server host: embeds web UI