Skip to content

Commit

Permalink
use ffmpeg-sys-next, single version of bindgen
Browse files Browse the repository at this point in the history
One version is easier to keep track of and should reduce build times.

* replace ffmpeg-sys with ffmpeg-sys-next, which (among other things)
  uses bindgen 0.64. ffmpeg-sys was using a pre-0.60 version, so in
  some of our call sites, it hit build errors on Rust 1.70 due to
  rust-lang/rust-bindgen#2083
  https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md#0600

* update cargo lock stuff to use the same version

* remove stale comments about older versions
  • Loading branch information
scottlamb committed Jun 21, 2023
1 parent 91e066f commit fc00b2a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 91 deletions.
108 changes: 22 additions & 86 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ffmpeg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.1.0"
edition = "2021"

[dependencies]
# XXX: ffmpeg-sys doesn't seem to build without avcodec.
ffmpeg-sys = {git = "https://github.com/meh/rust-ffmpeg-sys", rev="8ba86ee3f9b85a3ad86002d980fb518f5e90afb1", default-features = false, features = ["avcodec"] }
# XXX: ffmpeg-sys-next doesn't seem to build without avcodec.
ffmpeg-sys = { package = "ffmpeg-sys-next", version = "6.0.1", default-features = false, features = ["avcodec"] }
thiserror = "1.0"

[features]
Expand Down
3 changes: 0 additions & 3 deletions macos/video-toolbox/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ fn main() {

let sdk_root = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk";

// the "whitelist_" functions have been renamed in newer bindgen versions, but we use the
// old names for wider compatibility
#[allow(deprecated)]
let bindings = bindgen::Builder::default()
.clang_arg(format!("-isysroot{}", sdk_root))
.header("src/lib.hpp")
Expand Down

0 comments on commit fc00b2a

Please sign in to comment.