refactor: drop unused current segment from Health
Rust checks / windows-cross-check (push) Successful in 42s
Rust checks / linux (push) Failing after 5m47s

This commit is contained in:
2026-10-08 14:32:43 +02:00
parent 3588d5b212
commit 91f119e6b6
2 changed files with 3 additions and 6 deletions
-1
View File
@@ -758,7 +758,6 @@ impl Pipeline {
dropped_frames: sys::obs_output_get_frames_dropped(self.output).max(0) as u64,
total_bytes: sys::obs_output_get_total_bytes(self.output),
lagged_frames: sys::obs_get_lagged_frames() as u64,
current_segment: None,
written_bytes: 0,
disk_available_bytes: None,
}
+3 -5
View File
@@ -225,11 +225,11 @@ impl Recording {
if let Some(finished) = written.current.take() {
written.finished_bytes += size(&finished);
}
written.current = current.clone();
written.current = current;
}
health.written_bytes = written.finished_bytes + current.as_deref().map_or(0, size);
health.written_bytes =
written.finished_bytes + written.current.as_deref().map_or(0, size);
}
health.current_segment = current;
health
}
@@ -278,7 +278,6 @@ pub struct Health {
pub dropped_frames: u64,
pub total_bytes: u64,
pub lagged_frames: u64,
pub current_segment: Option<String>,
/// Bytes on disk across all of this recording's segments.
pub written_bytes: u64,
/// Free space on the recording volume, if it could be read.
@@ -457,7 +456,6 @@ mod tests {
dropped_frames: 0,
total_bytes: bytes,
lagged_frames: 0,
current_segment: Some("segment-000000.mkv".into()),
written_bytes: bytes,
disk_available_bytes: Some(u64::MAX),
}