Skip to content

Commit 557d7b7

Browse files
EvanCarrolllu-zero
authored andcommitted
Support for encoder, version bumps
* Bump the version of bindgen, per the docs should only use the latest version. * Bump the version of system-deps * Include Encoder, rename enc.rs to svtav1.rs since it includes both encoder and decoder * Update URL to official SVT-AV1 repo.
1 parent 8737f25 commit 557d7b7

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ By default the bindings are generated using the headers and libraries that ought
1515
- [ ] Examples
1616

1717
[1]: https://github.com/rust-lang/rust-bindgen
18-
[2]: https://github.com/OpenVisualCloud/SVT-AV1
18+
[2]: https://gitlab.com/AOMediaCodec/SVT-AV1/-/releases

svt-av1-sys/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ build = "build.rs"
1010
readme = "../README.md"
1111

1212
[package.metadata.system-deps]
13-
SvtAv1Enc = "0.8"
13+
SvtAv1Enc = "^1"
1414

1515
[features]
1616
build_sources = []
1717

1818
[build-dependencies]
19-
bindgen = "0.53.1"
20-
system-deps = "1.3"
19+
bindgen = "0.65.1"
20+
system-deps = "6.1"
2121

2222
[dependencies]

svt-av1-sys/build.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ fn format_write(builder: bindgen::Builder) -> String {
1414

1515
fn main() {
1616
let libs = system_deps::Config::new().probe().unwrap();
17-
let headers = libs.get("SvtAv1Enc").unwrap().include_paths.clone();
17+
let headers = libs.get_by_name("SvtAv1Enc").unwrap().include_paths.clone();
1818

1919
let mut builder = bindgen::builder()
20-
.header("data/enc.h")
21-
.blacklist_type("max_align_t")
22-
.whitelist_function("svt_av1_enc.*")
20+
.header("data/wrapper.h")
21+
.blocklist_type("max_align_t")
22+
.allowlist_function("svt_av1.*")
2323
.size_t_is_usize(true)
2424
.default_enum_style(bindgen::EnumVariation::ModuleConsts);
2525

@@ -32,7 +32,7 @@ fn main() {
3232

3333
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
3434

35-
let mut file = File::create(out_path.join("enc.rs")).unwrap();
35+
let mut file = File::create(out_path.join("svtav1.rs")).unwrap();
3636

3737
let _ = file.write(s.as_bytes());
3838
}

svt-av1-sys/data/enc.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

svt-av1-sys/data/wrapper.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "EbSvtAv1.h"
2+
#include "EbSvtAv1ErrorCodes.h"
3+
#include "EbSvtAv1ExtFrameBuf.h"
4+
#include "EbSvtAv1Formats.h"
5+
#include "EbSvtAv1Metadata.h"
6+
#include "EbSvtAv1Dec.h"
7+
#include "EbSvtAv1Enc.h"

svt-av1-sys/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#[cfg_attr(feature = "cargo-clippy", allow(const_static_lifetime))]
77
#[cfg_attr(feature = "cargo-clippy", allow(unreadable_literal))]
88

9-
pub mod enc {
10-
include!(concat!(env!("OUT_DIR"), "/enc.rs"));
9+
pub mod SvtAV1 {
10+
include!(concat!(env!("OUT_DIR"), "/svtav1.rs"));
1111
}
1212

13-
pub use enc::*;
13+
pub use SvtAV1::*;
1414

1515
#[cfg(test)]
1616
mod tests {

0 commit comments

Comments
 (0)