Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

chore(recording): correct the camera finalize comment, print notch skips in CI

Richie McIlroy241eeb65aaad
diff --git a/.github/workflows/sync-tests.yml b/.github/workflows/sync-tests.yml
index fb5d1b582..2e7cd3cb2 100644
--- a/.github/workflows/sync-tests.yml
+++ b/.github/workflows/sync-tests.yml
@@ -115,7 +115,9 @@ jobs:
run: |
cargo test --locked -p cap-timestamp -p cap-enc-ffmpeg
cargo test --locked -p cap-recording --lib
- cargo test --locked -p cap-rendering
+ # --nocapture so a WARP-adapter notch skip prints instead of
+ # looking identical to a pass in the CI log.
+ cargo test --locked -p cap-rendering -- --nocapture
# Real encoders + DASH muxer + remux/validation over full instant-mode
# scenarios: pause/resume excision, stall-recovery bursts with
diff --git a/crates/recording/src/output_pipeline/macos.rs b/crates/recording/src/output_pipeline/macos.rs
index 15ed1a5ea..ea764ef34 100644
--- a/crates/recording/src/output_pipeline/macos.rs
+++ b/crates/recording/src/output_pipeline/macos.rs
@@ -1307,12 +1307,15 @@ impl Muxer for AVFoundationCameraMuxer {
"Camera MP4 encoder thread",
) {
BlockingThreadFinish::Clean => {}
- // The thread exited with an error (writer failure, disk
- // exhaustion): the encoder mutex is free and finalizing
- // is what preserves the moov, so fall through to
- // encoder.finish() below. Skipping it here used to leave
- // camera.mp4 headerless and unplayable on every encoder
- // thread error.
+ // The thread exited with an error: the encoder mutex is
+ // free, so fall through to encoder.finish() below. When
+ // the writer is still alive (disk-exhaustion stop, mutex
+ // poison) finalizing is what preserves the moov —
+ // skipping it here used to leave camera.mp4 headerless
+ // on every encoder thread error. When the writer itself
+ // died (WriterFailed) finish_writing cannot salvage the
+ // file, but the attempt is harmless and surfaces the
+ // writer's NSError.
BlockingThreadFinish::Failed(error) => {
warn!("{error:#}");
if finish_error.is_none() {