Expand description
Headless streaming player for the Deezer Connect protocol.
pleezer is a library and application that implements the Deezer Connect protocol, enabling remote-controlled audio playback of Deezer content. It provides:
§Core Features
- Remote Control: Acts as a receiver for Deezer Connect, allowing control from official Deezer apps
- Audio Playback: High-quality audio streaming with gapless playback support
- Format Support: Handles MP3 and FLAC formats based on subscription level
- Audio Processing:
- Volume normalization with configurable target gain
- High-quality dithering with psychoacoustic noise shaping
- Configurable for different DAC capabilities
§Architecture
The library is organized into several key modules:
-
Connection Management
-
Audio Processing
audio_file: Unified interface for audio stream handlingdecrypt: Handles encrypted contentdecoder: Audio format decodingloudness: Equal-loudness compensation (ISO 226:2013)dither: High-quality dithering and noise shapingvolume: Volume control with dithering integrationplayer: Controls audio playback and queuesringbuf: Ring buffer for audio processingtrack: Manages track metadata and downloads
-
Authentication
-
Configuration
-
Protocol
-
System Integration
§Example
use pleezer::{config::Config, player::Player, remote::Client};
async fn example() -> pleezer::error::Result<()> {
// Create player with configuration
let config = Config::new()?;
let player = Player::new(&config, "").await?;
// Create and start client
let mut client = Client::new(&config, player)?;
client.start().await?;
Ok(())
}§Protocol Documentation
For details on the Deezer Connect protocol implementation, see the
protocol and remote modules.
§Error Handling
Errors are handled through the types in the error module, with
most functions returning Result.
§Signal Handling
The application responds to system signals:
- SIGTERM/Ctrl-C: Graceful shutdown
- SIGHUP: Configuration reload
See the signal module for details.
§Concurrency
The library uses async/await for concurrency and is designed to work with the Tokio async runtime. Most operations are asynchronous and can run concurrently.
Modules§
- arl
- ARL validation and handling.
- audio_
file - Provides the
AudioFileabstraction for handling audio stream playback. - config
- Configuration and authentication for pleezer.
- decoder
- Audio decoder implementation using Symphonia.
- decrypt
- Track decryption for Deezer’s protected media content.
- dither
- High-quality audio dithering and noise shaping implementation.
- error
- Error handling for pleezer.
- events
- Events emitted during Deezer Connect playback and remote control.
- gateway
- Gateway API client for Deezer services.
- http
- HTTP client with rate limiting and session management for Deezer APIs.
- loudness
- Equal loudness compensation based on ISO 226:2013 standard using biquad filters.
- player
- Audio playback and track management.
- protocol
- Protocol types and structures for Deezer services.
- proxy
- HTTP proxy support for HTTPS connections.
- remote
- Remote control protocol implementation for Deezer Connect.
- ringbuf
- Fixed-size ring buffer implementation for audio processing.
- signal
- System signal handling for graceful shutdown and reload.
- tokens
- Authentication token management for Deezer users.
- track
- Track management and playback preparation.
- util
- Utility traits and functions.
- volume
- Volume control and dithering management.