Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(editor): update examples for two-argument frame callback

Richie McIlroy0c5e70f01b87
diff --git a/crates/editor/examples/cli.rs b/crates/editor/examples/cli.rs
index 9b2cb389f..05f5333e0 100644
--- a/crates/editor/examples/cli.rs
+++ b/crates/editor/examples/cli.rs
@@ -6,7 +6,7 @@ use std::path::PathBuf;
async fn main() {
let path: PathBuf = std::env::args().collect::<Vec<_>>().swap_remove(1).into();
- let editor = EditorInstance::new(path, |_s| {}, Box::new(|_| {}), None)
+ let editor = EditorInstance::new(path, |_s| {}, Box::new(|_, _| {}), None)
.await
.unwrap();
diff --git a/crates/editor/examples/editor-playback-benchmark.rs b/crates/editor/examples/editor-playback-benchmark.rs
index 6ebca95eb..609b762e5 100644
--- a/crates/editor/examples/editor-playback-benchmark.rs
+++ b/crates/editor/examples/editor-playback-benchmark.rs
@@ -6,7 +6,7 @@ use std::{
};
use cap_editor::{
- EditorFrameOutput, Playback, PlaybackFrameSource, PlaybackRenderOutputFormat,
+ EditorFrameOutput, FrameLayout, Playback, PlaybackFrameSource, PlaybackRenderOutputFormat,
PlaybackSkipReason, PlaybackTelemetry, PlaybackTelemetryEvent, Renderer,
finish_renderer_layers_creation, start_renderer_layers_creation,
};
@@ -512,7 +512,7 @@ async fn main() {
let (telemetry, mut telemetry_rx) = PlaybackTelemetry::channel();
let (frame_tx, mut frame_rx) = mpsc::unbounded_channel::<usize>();
- let frame_cb = Box::new(move |output: EditorFrameOutput| {
+ let frame_cb = Box::new(move |output: EditorFrameOutput, _: FrameLayout| {
let bytes = match output {
EditorFrameOutput::Nv12(frame) => {
let metadata_bytes = match frame.format {
diff --git a/crates/editor/examples/editor-startup-benchmark.rs b/crates/editor/examples/editor-startup-benchmark.rs
index 8d0794f56..395678abc 100644
--- a/crates/editor/examples/editor-startup-benchmark.rs
+++ b/crates/editor/examples/editor-startup-benchmark.rs
@@ -5,7 +5,8 @@ use std::{
};
use cap_editor::{
- EditorFrameOutput, EditorInstance, Renderer, create_segments, finish_renderer_layers_creation,
+ EditorFrameOutput, EditorInstance, FrameLayout, Renderer, create_segments,
+ finish_renderer_layers_creation,
start_renderer_layers_creation,
};
use cap_project::{ProjectConfiguration, RecordingMeta, RecordingMetaInner};
@@ -86,7 +87,7 @@ async fn profile_startup_stages(
let renderer = Renderer::spawn(
render_constants,
- Box::new(|_: EditorFrameOutput| {}),
+ Box::new(|_: EditorFrameOutput, _: FrameLayout| {}),
layers_rx,
)?;
push_stage(&mut stages, "spawn renderer", &mut stage_start);
@@ -189,7 +190,7 @@ async fn main() {
let editor = EditorInstance::new(
recording_path.clone(),
|_| {},
- Box::new(move |_: EditorFrameOutput| {
+ Box::new(move |_: EditorFrameOutput, _: FrameLayout| {
let _ = frame_tx.send(());
}),
None,