From 56e6539494614deec871332fae666d584dda08ef Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 9 Oct 2024 16:20:41 +0200 Subject: [PATCH] Fix ffmpeg feature flag --- Cargo.lock | 2 ++ crates/store/re_video/Cargo.toml | 2 +- crates/top/rerun/Cargo.toml | 4 +++- crates/viewer/re_renderer/Cargo.toml | 4 ---- crates/viewer/re_viewer/Cargo.toml | 3 ++- pixi.toml | 8 ++++---- rerun_py/Cargo.toml | 5 ++++- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fd4b2a7f013b2..f2a035399ffc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5985,6 +5985,7 @@ dependencies = [ "re_types_blueprint", "re_types_core", "re_ui", + "re_video", "re_viewer_context", "re_viewport", "re_viewport_blueprint", @@ -6244,6 +6245,7 @@ dependencies = [ "re_smart_channel", "re_tracing", "re_types", + "re_video", "re_viewer", "re_web_viewer_server", "re_ws_comms", diff --git a/crates/store/re_video/Cargo.toml b/crates/store/re_video/Cargo.toml index b6f4e75f2e6fd..bc4617df11784 100644 --- a/crates/store/re_video/Cargo.toml +++ b/crates/store/re_video/Cargo.toml @@ -25,7 +25,7 @@ features = ["all"] [features] -default = ["ffmpeg"] # TODO: opt-in? +default = ["ffmpeg"] ## Opt-in to native AV1 decoding. ## You need to install [nasm](https://nasm.us/) to compile with this feature. diff --git a/crates/top/rerun/Cargo.toml b/crates/top/rerun/Cargo.toml index af546f31a6c89..52d10e0a62d70 100644 --- a/crates/top/rerun/Cargo.toml +++ b/crates/top/rerun/Cargo.toml @@ -96,7 +96,7 @@ sdk = ["dep:re_sdk", "dep:re_types"] ## Support for native AV1 video decoding. ## You need to install [nasm](https://nasm.us/) to compile with this feature. -video_av1 = ["re_viewer?/video_av1"] +video_av1 = ["re_video/av1"] ## Support serving a web viewer over HTTP. ## @@ -121,6 +121,8 @@ re_log.workspace = true re_memory.workspace = true re_smart_channel.workspace = true re_tracing.workspace = true +re_video = { workspace = true, features = ["ffmpeg"] } + anyhow.workspace = true document-features.workspace = true itertools.workspace = true diff --git a/crates/viewer/re_renderer/Cargo.toml b/crates/viewer/re_renderer/Cargo.toml index 9445e024eb420..5a0f3399c4512 100644 --- a/crates/viewer/re_renderer/Cargo.toml +++ b/crates/viewer/re_renderer/Cargo.toml @@ -35,10 +35,6 @@ default = ["import-obj", "import-gltf", "import-stl"] ## Support for Arrow datatypes for end-to-end zero-copy. arrow = ["dep:arrow2"] -## Support for native AV1 video decoding. -## You need to install [nasm](https://nasm.us/) to compile with this feature. -video_av1 = ["re_video/av1"] # TODO: remove - ## Support importing .obj files import-obj = ["dep:tobj"] diff --git a/crates/viewer/re_viewer/Cargo.toml b/crates/viewer/re_viewer/Cargo.toml index 6216ddee58510..d0a70b7f53d27 100644 --- a/crates/viewer/re_viewer/Cargo.toml +++ b/crates/viewer/re_viewer/Cargo.toml @@ -38,7 +38,7 @@ analytics = ["dep:re_analytics"] ## Support for native AV1 video decoding. ## You need to install [nasm](https://nasm.us/) to compile with this feature. -video_av1 = ["re_renderer/video_av1"] +video_av1 = ["re_video/av1"] [dependencies] @@ -81,6 +81,7 @@ re_types.workspace = true re_types_blueprint.workspace = true re_types_core.workspace = true re_ui.workspace = true +re_video = { workspace = true, features = ["ffmpeg"] } re_viewer_context.workspace = true re_viewport.workspace = true re_viewport_blueprint.workspace = true diff --git a/pixi.toml b/pixi.toml index e8f911af794b8..c4862e6382c38 100644 --- a/pixi.toml +++ b/pixi.toml @@ -122,18 +122,18 @@ man = "cargo --quiet run --package rerun-cli --all-features -- man > docs/conten # Compile and run the rerun viewer. # # You can also give an argument for what to view (e.g. an .rrd file). -rerun = "cargo run --package rerun-cli --no-default-features --features native_viewer,video_av1 --" +rerun = "cargo run --package rerun-cli --no-default-features --features native_viewer,video_av1,video_ffmpeg --" # Compile `rerun-cli` without the web-viewer. -rerun-build = "cargo build --package rerun-cli --no-default-features --features native_viewer,video_av1" +rerun-build = "cargo build --package rerun-cli --no-default-features --features native_viewer,video_av1,video_ffmpeg" # Compile `rerun-cli` without the web-viewer. -rerun-build-release = "cargo build --package rerun-cli --release --no-default-features --features native_viewer,video_av1" +rerun-build-release = "cargo build --package rerun-cli --release --no-default-features --features native_viewer,video_av1,video_ffmpeg" # Compile and run the rerun viewer with --release. # # You can also give an argument for what to view (e.g. an .rrd file). -rerun-release = "cargo run --package rerun-cli --no-default-features --features native_viewer,video_av1 --release --" +rerun-release = "cargo run --package rerun-cli --no-default-features --features native_viewer,video_av1,video_ffmpeg --release --" # Compile and run the web-viewer via rerun-cli. # diff --git a/rerun_py/Cargo.toml b/rerun_py/Cargo.toml index 9695a6bf9764f..2b2ea43e4dc8c 100644 --- a/rerun_py/Cargo.toml +++ b/rerun_py/Cargo.toml @@ -19,7 +19,7 @@ default = ["extension-module"] ## The features we turn on when building the `rerun-sdk` PyPi package ## for . -pypi = ["extension-module", "web_viewer"] +pypi = ["extension-module", "native_video", "web_viewer"] ## We need to enable the `pyo3/extension-module` when building the SDK, ## but we cannot enable it when building tests and benchmarks, so we @@ -28,6 +28,9 @@ pypi = ["extension-module", "web_viewer"] ## * extension-module = ["pyo3/extension-module"] +## Support native video playback +native_video = ["re_video/av1", "re_video/ffmpeg"] + ## Support serving a web viewer over HTTP with `serve()`. ## ## Enabling this adds quite a bit to the binary size,