Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(recording): emit a health event on the first MP4 muxer frame drop

Richie McIlroyba9772228995
diff --git a/crates/recording/src/output_pipeline/macos.rs b/crates/recording/src/output_pipeline/macos.rs
index 4d0955f70..53e73bca2 100644
--- a/crates/recording/src/output_pipeline/macos.rs
+++ b/crates/recording/src/output_pipeline/macos.rs
@@ -202,6 +202,15 @@ impl FrameDropTracker {
total_frames = self.total_frames,
"MP4 muxer encoder queue full, first frame dropped"
);
+ if let Some(tx) = &self.health_tx {
+ emit_health(
+ tx,
+ PipelineHealthEvent::FrameDropRateHigh {
+ source: self.source.to_string(),
+ rate_pct: 100.0 / (self.total_frames + 1) as f64,
+ },
+ );
+ }
}
self.check_drop_rate();
}