One test recording produced two half-files: the game in one, the microphone in the other. Two daemons were alive at once, each with its own OBS, and only one of them won the game's capture hook and its audio. Any launch path can start a daemon (the app when it cannot reach the pipe, the tray, a manual run) and the pipe server accepts a second instance without complaint, so nothing stopped the second copy. The daemon now claims a lock file in its configuration directory before booting OBS. On Windows the file is opened with a share mode of zero, so a second open fails with a sharing violation; on Unix an exclusive flock does the same. The loser logs which process holds the lock and exits, leaving the running recorder alone. Closing the handle releases the lock, so a crash does not leave the machine without a recorder.
107 lines
2.3 KiB
TOML
107 lines
2.3 KiB
TOML
[package]
|
|
name = "record-daemon"
|
|
version = "0.3.0"
|
|
edition = "2021"
|
|
description = "High-performance League of Legends recording daemon using libobs"
|
|
authors = ["LeagueRecorder"]
|
|
license = "MIT"
|
|
|
|
[dependencies]
|
|
# Async runtime
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "1.0"
|
|
|
|
# WebSocket for LQP (with TLS support)
|
|
tokio-tungstenite = { version = "0.21", features = ["rustls-tls-webpki-roots"] }
|
|
rustls = "0.22"
|
|
rustls-pki-types = "1"
|
|
|
|
# HTTP client for LQP REST API
|
|
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
|
|
|
|
# Async utilities
|
|
futures = "0.3"
|
|
async-trait = "0.1"
|
|
|
|
# Error handling
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
tracing-appender = "0.2"
|
|
|
|
# UUID for recording IDs
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
|
|
# Date/time
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# Locking primitives
|
|
parking_lot = "0.12"
|
|
|
|
# Crossbeam channels
|
|
crossbeam = "0.8"
|
|
|
|
# Unix socket IPC
|
|
tokio-util = { version = "0.7", features = ["codec"] }
|
|
|
|
# Configuration directories
|
|
directories = "6"
|
|
|
|
# CLI (for debugging and control)
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
# Base64 for LQP authentication
|
|
base64 = "0.22"
|
|
|
|
# Regex for lockfile parsing
|
|
regex = "1"
|
|
|
|
# OBS recording library
|
|
libobs = { version = "5.0.1" }
|
|
libobs-simple = { version = "8.0.1" }
|
|
libobs-bootstrapper = { version = "0.4.0", features = ["install_dummy_dll"] }
|
|
libobs-wrapper = { version = "9.0.4" }
|
|
|
|
# Display info for monitor capture
|
|
display-info = "0.5"
|
|
|
|
# Signal handling for graceful shutdown (Unix only)
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|
|
signal-hook = "0.4"
|
|
signal-hook-tokio = { version = "0.4", features = ["futures-v0_3"] }
|
|
|
|
# Windows-specific dependencies
|
|
[target.'cfg(windows)'.dependencies]
|
|
winapi = { version = "0.3", features = ["winuser", "winreg", "winnt"] }
|
|
winreg = "0.56"
|
|
windows = { version = "0.58", features = [
|
|
"Win32_Media_Audio",
|
|
"Win32_System_Com",
|
|
"Win32_UI_Shell_PropertiesSystem",
|
|
"Win32_Foundation",
|
|
"Win32_Devices_Properties",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
# Testing utilities
|
|
tokio-test = "0.4"
|
|
tempfile = "3"
|
|
|
|
[[bin]]
|
|
name = "record-daemon"
|
|
path = "src/main.rs"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|