refactor: drop unused current segment from Health
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user