Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fmt

Richie McIlroy7372fa8a1d8a
diff --git a/apps/desktop/src/utils/socket.ts b/apps/desktop/src/utils/socket.ts
index 69b4825f9..12e310f8f 100644
--- a/apps/desktop/src/utils/socket.ts
+++ b/apps/desktop/src/utils/socket.ts
@@ -379,6 +379,7 @@ export function createImageDataWS(
let framesDropped = 0;
let framesSentToWorker = 0;
let actualRendersCount = 0;
+ let renderFrameCount = 0;
let minFrameTime = Number.MAX_VALUE;
let maxFrameTime = 0;
@@ -572,6 +573,7 @@ export function createImageDataWS(
}
cachedDirectImageData.data.set(frameData);
directCtx.putImageData(cachedDirectImageData, 0, 0);
+ renderFrameCount++;
if (!hasRenderedFrame()) {
setHasRenderedFrame(true);
diff --git a/crates/rendering/src/decoder/ffmpeg.rs b/crates/rendering/src/decoder/ffmpeg.rs
index 47f7b6fb2..9b4128f8a 100644
--- a/crates/rendering/src/decoder/ffmpeg.rs
+++ b/crates/rendering/src/decoder/ffmpeg.rs
@@ -238,7 +238,6 @@ impl FfmpegDecoder {
let is_hw = this.is_hardware_accelerated();
let mut cache = BTreeMap::<u32, CachedFrame>::new();
- #[allow(unused)]
let mut last_active_frame = None::<u32>;
let last_sent_frame = Rc::new(RefCell::new(None::<OutputFrame>));
@@ -259,7 +258,6 @@ impl FfmpegDecoder {
cache.insert(current_frame, cache_frame);
*first_ever_frame.borrow_mut() = Some(output.clone());
*last_sent_frame.borrow_mut() = Some(output);
- last_active_frame = Some(current_frame);
info!(
"FFmpeg decoder '{}': pre-decoded first frame {} ({}x{})",
name, current_frame, video_width, video_height