- Audio sources were created but never added to the scene, so mic, game and app audio never reached the output; all sources are now added with their configured volume via obs_source_set_volume - getAudioDevices enumerates real WASAPI devices again instead of returning hardcoded defaults (the crash-isolation bypass) - Recording module split: encoder selection and output building move to their own files; obs_context shrinks from 1556 to 464 lines - Remove unused IPC (recordings/timeline/export commands), the CommandHandler trait, crash marker files, and the stats plumbing that was never wired to the frontend - Deduplicate the LCU reconnect logic into connect_and_listen
42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
//! Recording output files and results.
|
|
|
|
use std::path::PathBuf;
|
|
|
|
use chrono::{DateTime, Duration, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// An active recording output.
|
|
#[derive(Debug, Clone)]
|
|
pub struct RecordingOutput {
|
|
/// Output file path.
|
|
pub path: PathBuf,
|
|
/// Game ID if available.
|
|
pub game_id: Option<u64>,
|
|
/// Champion name if available.
|
|
pub champion: Option<String>,
|
|
}
|
|
|
|
/// Result of a completed recording.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct RecordingResult {
|
|
/// Output file path.
|
|
pub path: PathBuf,
|
|
/// Game ID if available.
|
|
pub game_id: Option<u64>,
|
|
/// Champion name if available.
|
|
pub champion: Option<String>,
|
|
/// Recording start time.
|
|
pub start_time: DateTime<Utc>,
|
|
/// Recording end time.
|
|
pub end_time: DateTime<Utc>,
|
|
/// Recording duration.
|
|
pub duration: Duration,
|
|
}
|
|
|
|
impl RecordingResult {
|
|
/// Get the file size in bytes, if the file still exists.
|
|
pub fn file_size(&self) -> Option<u64> {
|
|
std::fs::metadata(&self.path).ok().map(|m| m.len())
|
|
}
|
|
}
|