Skip to content

Commit

Permalink
Fix ffmpeg feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Oct 9, 2024
1 parent dd0f504 commit 56e6539
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5985,6 +5985,7 @@ dependencies = [
"re_types_blueprint",
"re_types_core",
"re_ui",
"re_video",
"re_viewer_context",
"re_viewport",
"re_viewport_blueprint",
Expand Down Expand Up @@ -6244,6 +6245,7 @@ dependencies = [
"re_smart_channel",
"re_tracing",
"re_types",
"re_video",
"re_viewer",
"re_web_viewer_server",
"re_ws_comms",
Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_video/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion crates/top/rerun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
##
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions crates/viewer/re_renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
3 changes: 2 additions & 1 deletion crates/viewer/re_viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
5 changes: 4 additions & 1 deletion rerun_py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = ["extension-module"]

## The features we turn on when building the `rerun-sdk` PyPi package
## for <https://pypi.org/project/rerun-sdk/>.
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
Expand All @@ -28,6 +28,9 @@ pypi = ["extension-module", "web_viewer"]
## * <https://pyo3.rs/main/building-and-distribution#building-python-extension-modules>
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,
Expand Down

0 comments on commit 56e6539

Please sign in to comment.