Files
pmomusic/pmoqobuz/Cargo.toml
Eric Coissac a97bfe6148 feat: implement Qobuz CMAF streaming and AES decryption
Introduces a new CMAF streaming module for Qobuz that handles progressive segment fetching and full-track decryption. The implementation adds HKDF session key derivation, AES-128-CBC key unwrapping, and AES-128-CTR frame decryption, alongside an ISO BMFF parser for extracting FLAC headers and segment metadata. It also integrates automatic session renewal with double-checked locking, a generic async retry mechanism for transient HTTP errors, and centralized error handling. Finally, it exposes `CmafStreamInfo` and async streaming methods in the public API, updating cryptographic dependencies accordingly.
2026-06-11 08:52:28 +02:00

100 lines
2.4 KiB
TOML

[package]
name = "pmoqobuz"
version = "0.1.0"
edition = "2024"
[dependencies]
regex = "1.12"
base64 = "0.22"
indexmap = "2.0"
async-trait = { version = "0.1", optional = true }
# HTTP client pour les requêtes à l'API Qobuz
reqwest = { version = "0.12", features = ["json", "cookies"] }
# Gestion asynchrone
tokio = { workspace = true }
# Sérialisation/Désérialisation JSON
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
# Gestion des erreurs
anyhow = { workspace = true }
thiserror = { workspace = true }
# Hashing pour les clés de cache et signatures
sha1 = "0.10"
hex = "0.4"
md-5 = "0.10"
# Crypto CMAF (AES-CTR déchiffrement frames, AES-CBC dérobage clé, HKDF dérivation)
aes = "0.8"
cbc = "0.1"
ctr = "0.9"
hkdf = "0.12"
sha2 = "0.10"
# Cache en mémoire avec TTL
moka = { version = "0.12", features = ["future"] }
# Logging
tracing = { workspace = true }
# Gestion du temps
chrono = { workspace = true }
# Configuration
pmoconfig = { path = "../pmoconfig" }
# Intégration avec pmocovers pour le cache d'images (OBLIGATOIRE)
pmocovers = { path = "../pmocovers" }
# Intégration avec pmoaudiocache pour le cache audio (OBLIGATOIRE)
pmoaudiocache = { path = "../pmoaudiocache" }
# Intégration avec pmodidl pour l'export DIDL
pmodidl = { path = "../pmodidl" }
# Intégration avec pmoserver pour l'API HTTP
pmoserver = { path = "../pmoserver", optional = true }
axum = { version = "0.8", optional = true }
rusqlite = { version = "0.37", features = ["bundled"], optional = true }
# Documentation OpenAPI
utoipa = { version = "5.3", optional = true }
# Common music source traits
pmosource = { path = "../pmosource" }
# Playlist management
pmoplaylist = { path = "../pmoplaylist" }
pmocache = { path = "../pmocache" }
[features]
default = ["async-trait-support"]
# Feature pour activer les extensions pmoserver
pmoserver = ["dep:pmoserver", "dep:axum", "dep:utoipa"]
# Feature pour activer le support serveur (cache registry)
server = ["pmosource/server"]
# Feature cache (deprecated - toujours actif maintenant)
cache = []
async-trait-support = ["dep:async-trait"]
disk-cache = ["dep:rusqlite", "dep:async-trait"]
[dev-dependencies]
# Tests
tokio-test = "0.4"
mockito = "1.0"
tempfile = "3.0"
# Pour les exemples
tracing-subscriber = "0.3"
# Pour l'exemple spoofer
# Specify that the with_cache example requires the cache feature
[[example]]
name = "with_cache"
required-features = ["cache"]