record-daemon: refactor and cleanup
This commit is contained in:
@@ -11,7 +11,7 @@ mod output;
|
||||
pub use capture::{CaptureMode, GameCapture, MonitorCapture, SourceType, WindowCapture};
|
||||
pub use encoder::{AudioEncoderConfig, EncoderCapability, EncoderConfig, EncoderSettings};
|
||||
pub use obs_context::{ObsContext, ObsContextBuilder};
|
||||
pub use output::{OutputConfig, RecordingOutput, RecordingResult};
|
||||
pub use output::{OutputConfig, OutputFormat, RecordingOutput, RecordingResult, RecordingStats};
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -86,6 +86,11 @@ impl RecordingEngine {
|
||||
self.is_recording
|
||||
}
|
||||
|
||||
/// Get the current game ID if recording.
|
||||
pub fn current_game_id(&self) -> Option<u64> {
|
||||
self.current_output.as_ref().and_then(|o| o.game_id)
|
||||
}
|
||||
|
||||
/// Start recording.
|
||||
///
|
||||
/// # Arguments
|
||||
@@ -170,6 +175,7 @@ impl RecordingEngine {
|
||||
start_time,
|
||||
end_time,
|
||||
duration,
|
||||
stats: None, // Stats would be populated from OBS context if available
|
||||
};
|
||||
|
||||
info!("Recording stopped: {:?}", result.path);
|
||||
|
||||
Reference in New Issue
Block a user