Skip to content

Commit 9cdc757

Browse files
committed
allow static build ffmpeg
1 parent c20156b commit 9cdc757

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

pulsebeam-agent/Cargo.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ documentation.workspace = true
99
repository.workspace = true
1010
authors.workspace = true
1111

12+
[features]
13+
default = ["ffmpeg-static"]
14+
15+
# Force static linking (default)
16+
ffmpeg-static = ["ffmpeg-next/static"]
17+
18+
# Use dynamic linking instead
19+
ffmpeg-dynamic = []
20+
1221
[dependencies]
1322
futures = { workspace = true }
1423
thiserror = { workspace = true }
@@ -18,6 +27,9 @@ bytes = { workspace = true }
1827

1928
tokio = { workspace = true, optional = true }
2029
reqwest = { version = "0.12.23", optional = true }
21-
ffmpeg-next = "8.0.0"
2230
maybe-async = "0.2.10"
2331
http = "1.3.1"
32+
33+
# FFmpeg integration
34+
ffmpeg-next = { version = "8.0.0", default-features = false, features = ["codec", "format", "filter", "software-resampling", "software-scaling"] }
35+

pulsebeam-agent/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
#[cfg(all(feature = "ffmpeg-static", feature = "ffmpeg-dynamic"))]
2+
compile_error!("Cannot enable both ffmpeg-static and ffmpeg-dynamic features simultaneously");
3+
4+
#[cfg(not(any(feature = "ffmpeg-static", feature = "ffmpeg-dynamic")))]
5+
compile_error!("Must enable either ffmpeg-static or ffmpeg-dynamic feature");
6+
17
pub mod agent;
28
// pub mod rt;

0 commit comments

Comments
 (0)