Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

refactor(recording): update segmented pipeline to use ScreenFrame

Richie McIlroy0ea0e8e17b5d
diff --git a/crates/recording/src/output_pipeline/win_segmented.rs b/crates/recording/src/output_pipeline/win_segmented.rs
index 69b36ef5f..ae256a2b5 100644
--- a/crates/recording/src/output_pipeline/win_segmented.rs
+++ b/crates/recording/src/output_pipeline/win_segmented.rs
@@ -49,7 +49,7 @@ struct Manifest {
}
struct SegmentState {
- video_tx: SyncSender<Option<(scap_direct3d::Frame, Duration)>>,
+ video_tx: SyncSender<Option<(screen_capture::ScreenFrame, Duration)>>,
output: Arc<Mutex<ffmpeg::format::context::Output>>,
encoder_handle: Option<JoinHandle<anyhow::Result<()>>>,
}
@@ -372,7 +372,7 @@ impl WindowsSegmentedMuxer {
let queue_depth = ((self.frame_rate as f32 / 30.0 * 5.0).ceil() as usize).clamp(3, 12);
let (video_tx, video_rx) =
- sync_channel::<Option<(scap_direct3d::Frame, Duration)>>(queue_depth);
+ sync_channel::<Option<(screen_capture::ScreenFrame, Duration)>>(queue_depth);
let (ready_tx, ready_rx) = sync_channel::<anyhow::Result<()>>(1);
let output = ffmpeg::format::output(&segment_path)?;
let output = Arc::new(Mutex::new(output));
@@ -581,8 +581,6 @@ impl WindowsSegmentedMuxer {
continue;
};
- use scap_ffmpeg::AsFFmpeg;
-
frame
.as_ffmpeg()
.context("frame as_ffmpeg")