Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
* Update to the current bindgen
* workaround broken max_align_t codegen
    See rust-lang/rust-bindgen#550
  • Loading branch information
gibix authored and lu-zero committed Aug 23, 2018
1 parent 99d7c97 commit 5fabdc5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions aom-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ repository = "https://github.com/rust-av/aom-rs"

build = "build.rs"

[package.metadata.pkg-config]
aom = "0.1.0"

[features]
build = ["cmake"]

[build-dependencies]
bindgen = "0.30"
metadeps = "1.1"
cmake = { version = "0.1.29", optional = true }

[package.metadata.pkg-config]
aom = "0.1.0"
bindgen = "0.38.0"
metadeps = "1.1.2"
cmake = { version = "0.1.33", optional = true }

[dependencies]
4 changes: 3 additions & 1 deletion aom-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ fn main() {
let headers = libs.get("aom").unwrap().include_paths.clone();
// let buildver = libs.get("vpx").unwrap().version.split(".").nth(1).unwrap();

let mut builder = common_builder().header("data/aom.h");
let mut builder = common_builder()
.header("data/aom.h")
.blacklist_type("max_align_t"); // https://github.com/rust-lang-nursery/rust-bindgen/issues/550

for header in headers {
builder = builder.clang_arg("-I").clang_arg(header.to_str().unwrap());
Expand Down
8 changes: 4 additions & 4 deletions aom-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod tests {
let mut raw = unsafe { mem::uninitialized() };
let mut ctx = unsafe { mem::uninitialized() };

let ret = unsafe { aom_img_alloc(&mut raw, aom_img_fmt::AOM_IMG_FMT_I420, w, h, align) };
let ret = unsafe { aom_img_alloc(&mut raw, aom_img_fmt_AOM_IMG_FMT_I420, w, h, align) };
if ret.is_null() {
panic!("Image allocation failed");
}
Expand All @@ -36,7 +36,7 @@ mod tests {
let mut cfg = unsafe { mem::uninitialized() };
let mut ret = unsafe { aom_codec_enc_config_default(aom_codec_av1_cx(), &mut cfg, 0) };

if ret != aom_codec_err_t::AOM_CODEC_OK {
if ret != aom_codec_err_t_AOM_CODEC_OK {
panic!("Default Configuration failed");
}

Expand All @@ -56,7 +56,7 @@ mod tests {
)
};

if ret != aom_codec_err_t::AOM_CODEC_OK {
if ret != aom_codec_err_t_AOM_CODEC_OK {
panic!("Codec Init failed");
}

Expand All @@ -74,7 +74,7 @@ mod tests {
1,
flags as i64,
);
if ret != aom_codec_err_t::AOM_CODEC_OK {
if ret != aom_codec_err_t_AOM_CODEC_OK {
panic!("Encode failed {:?}", ret);
}

Expand Down

0 comments on commit 5fabdc5

Please sign in to comment.