From ea84fcd553e9227c7ea08a4f65751633c844b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 21 Sep 2024 12:57:48 +0100 Subject: [PATCH 1/3] check dev targets in CI --- .github/workflows/rust_action_test_and_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust_action_test_and_docs.yml b/.github/workflows/rust_action_test_and_docs.yml index 54a7d306..c235c5eb 100644 --- a/.github/workflows/rust_action_test_and_docs.yml +++ b/.github/workflows/rust_action_test_and_docs.yml @@ -35,7 +35,7 @@ jobs: run: sudo apt-get install -y portaudio19-dev build-essential libpulse-dev libdbus-1-dev pkg-config libx11-dev libatk1.0-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libwayland-dev libxkbcommon-dev ffmpeg - name: Check project - run: cargo check -p adder-codec-core -p adder-codec-rs -p adder-info -p adder-to-dvs -p adder-viz --features "compression" + run: cargo check --all-targets -p adder-codec-core -p adder-codec-rs -p adder-info -p adder-to-dvs -p adder-viz --features "compression" - name: Build binaries for testing run: cargo build -p adder-info From c44f4da210fcccf1cab2c7c885be9123d4130081 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 21 Sep 2024 13:13:06 +0100 Subject: [PATCH 2/3] 'fix' errors --- .devcontainer/devcontainer.json | 23 ++++++++++++++++++++ .devcontainer/setup.sh | 11 ++++++++++ adder-codec-rs/benches/framed_to_adder_hd.rs | 8 +++---- adder-codec-rs/src/utils/simulproc.rs | 3 ++- 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/setup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..438e3aab --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "name": "Rust", + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "upgradePackages": true, + "installZsh": true, + "configureZshAsDefaultShell": true, + "installOhMyZsh": true, + "installOhMyZshConfig": true + } + }, + + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. + "mounts": [ + { + "source": "devcontainer-cargo-cache-${devcontainerId}", + "target": "/usr/local/cargo", + "type": "volume" + } + ], + "postCreateCommand": "bash .devcontainer/setup.sh" +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 00000000..aa650a13 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,11 @@ +rustup install nightly +rustup component add clippy +sudo apt-get update && sudo apt-get install -y \ + clang \ + libavdevice-dev \ + libavfilter-dev \ + libavformat-dev \ + libavutil-dev \ + libclang-dev \ + libgtk-3-dev \ + libopencv-dev diff --git a/adder-codec-rs/benches/framed_to_adder_hd.rs b/adder-codec-rs/benches/framed_to_adder_hd.rs index 6d9faf3c..f0a6d507 100644 --- a/adder-codec-rs/benches/framed_to_adder_hd.rs +++ b/adder-codec-rs/benches/framed_to_adder_hd.rs @@ -34,10 +34,10 @@ fn simul_proc(video_path: &str, scale: f64, thread_count: u8, _chunk_rows: usize output_events_filename: "".parse().unwrap(), output_raw_video_filename: manifest_path_str + "/benches/run/bench_out", scale, - c_thresh_pos: 0, - c_thresh_neg: 0, thread_count, // Multithreading causes some issues in testing time_mode: "delta_t".to_string(), + crf: todo!(), + integration_mode: todo!(), }; let source: Framed> = Framed::new(args.input_filename, args.color_input, args.scale) @@ -62,8 +62,8 @@ fn simul_proc(video_path: &str, scale: f64, thread_count: u8, _chunk_rows: usize DeltaT, ) .unwrap(); - - simul_processor.run().unwrap(); + let frame_max = todo!(); + simul_processor.run(frame_max).unwrap(); sleep(Duration::from_secs(2)); let output_path = "./benches/run/bench_out"; diff --git a/adder-codec-rs/src/utils/simulproc.rs b/adder-codec-rs/src/utils/simulproc.rs index 82882e26..afa2fc1a 100644 --- a/adder-codec-rs/src/utils/simulproc.rs +++ b/adder-codec-rs/src/utils/simulproc.rs @@ -13,6 +13,7 @@ use std::error::Error; use std::fs::File; use std::io; use std::io::{BufWriter, Write}; +use std::path::PathBuf; use adder_codec_core::SourceCamera::FramedU8; use adder_codec_core::SourceType::U8; @@ -54,7 +55,7 @@ pub struct SimulProcArgs { /// Path to input file #[clap(short, long, default_value = "./in.mp4")] - pub input_filename: String, + pub input_filename: PathBuf, /// Path to output events file #[clap(long, default_value = "")] From 62c4b07b259ef69313a7549c75a2821af7150c67 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 21 Sep 2024 13:17:00 +0100 Subject: [PATCH 3/3] fixup --- .devcontainer/devcontainer.json | 23 ----------------------- .devcontainer/setup.sh | 11 ----------- 2 files changed, 34 deletions(-) delete mode 100644 .devcontainer/devcontainer.json delete mode 100755 .devcontainer/setup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 438e3aab..00000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "Rust", - "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye", - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "upgradePackages": true, - "installZsh": true, - "configureZshAsDefaultShell": true, - "installOhMyZsh": true, - "installOhMyZshConfig": true - } - }, - - // Use 'mounts' to make the cargo cache persistent in a Docker Volume. - "mounts": [ - { - "source": "devcontainer-cargo-cache-${devcontainerId}", - "target": "/usr/local/cargo", - "type": "volume" - } - ], - "postCreateCommand": "bash .devcontainer/setup.sh" -} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh deleted file mode 100755 index aa650a13..00000000 --- a/.devcontainer/setup.sh +++ /dev/null @@ -1,11 +0,0 @@ -rustup install nightly -rustup component add clippy -sudo apt-get update && sudo apt-get install -y \ - clang \ - libavdevice-dev \ - libavfilter-dev \ - libavformat-dev \ - libavutil-dev \ - libclang-dev \ - libgtk-3-dev \ - libopencv-dev