[package]
edition = "2024"
rust-version = "1.90"
name = "hwcodec"
version = "0.1.0"
build = "build.rs"
include = [
"/Cargo.toml",
"/README.md",
"/CHANGELOG.md",
"/LICENSE-APACHE",
"/LICENSE-MIT",
"/build.rs",
"/wrapper.h",
"/src/**",
"/examples/**",
"/tests/**",
"/vendor/**",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Realtime AV1 and VP9 video encoding and decoding: hardware encoders (NVENC, Quick Sync, AMF, VA-API) and software codecs (SVT-AV1, libvpx, dav1d) behind one interface"
documentation = "https://docs.rs/hwcodec"
readme = "README.md"
keywords = [
"av1",
"vp9",
"video",
"encoder",
"hardware",
]
categories = [
"multimedia::video",
"multimedia::encoding",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/Mumcord/hwcodec"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[features]
amf = ["dep:bindgen"]
dav1d = [
"dep:bindgen",
"dep:pkg-config",
"dep:hwcodec-dav1d-src",
"dep:hwcodec-prebuilt-x86_64-pc-windows-msvc",
"dep:sha2",
]
default = [
"nvenc",
"amf",
"qsv",
"vaapi",
"svt-av1",
"libvpx",
"dav1d",
]
libvpx = [
"dep:bindgen",
"dep:pkg-config",
"dep:hwcodec-libvpx-src",
"dep:hwcodec-prebuilt-x86_64-pc-windows-msvc",
"dep:sha2",
]
nvenc = ["dep:bindgen"]
qsv = [
"dep:bindgen",
"dep:pkg-config",
"dep:hwcodec-libvpl-src",
"dep:hwcodec-prebuilt-x86_64-pc-windows-msvc",
"dep:sha2",
]
svt-av1 = [
"dep:bindgen",
"dep:pkg-config",
"dep:hwcodec-svt-av1-src",
"dep:hwcodec-prebuilt-x86_64-pc-windows-msvc",
"dep:sha2",
]
vaapi = ["dep:bindgen"]
[lib]
name = "hwcodec"
path = "src/lib.rs"
[[example]]
name = "detect"
path = "examples/detect.rs"
[[example]]
name = "encode_decode"
path = "examples/encode_decode.rs"
required-features = [
"svt-av1",
"dav1d",
"libvpx",
]
[[example]]
name = "encode_speed"
path = "examples/encode_speed.rs"
required-features = [
"svt-av1",
"libvpx",
]
[[example]]
name = "rgba_speed"
path = "examples/rgba_speed.rs"
[[test]]
name = "av1"
path = "tests/av1.rs"
required-features = [
"svt-av1",
"dav1d",
"libvpx",
]
[[test]]
name = "codec"
path = "tests/codec.rs"
required-features = ["libvpx"]
[[test]]
name = "detection"
path = "tests/detection.rs"
[[test]]
name = "fallback"
path = "tests/fallback.rs"
required-features = [
"svt-av1",
"dav1d",
"libvpx",
]
[[test]]
name = "settings"
path = "tests/settings.rs"
required-features = [
"svt-av1",
"dav1d",
"libvpx",
]
[[test]]
name = "temporal_channels"
path = "tests/temporal_channels.rs"
required-features = [
"svt-av1",
"dav1d",
"libvpx",
]
[[test]]
name = "vaapi"
path = "tests/vaapi.rs"
required-features = [
"dav1d",
"libvpx",
]
[dependencies.log]
version = "0.4"
[dependencies.thiserror]
version = "2"
[build-dependencies.bindgen]
version = "0.73"
optional = true
[build-dependencies.hwcodec-dav1d-src]
version = "0.1.0"
optional = true
[build-dependencies.hwcodec-libvpl-src]
version = "0.1.0"
optional = true
[build-dependencies.hwcodec-libvpx-src]
version = "0.1.0"
optional = true
[build-dependencies.hwcodec-svt-av1-src]
version = "0.1.0"
optional = true
[build-dependencies.pkg-config]
version = "0.3"
optional = true
[target.'cfg(all(target_os = "windows", target_arch = "x86_64", target_env = "msvc"))'.build-dependencies.hwcodec-prebuilt-x86_64-pc-windows-msvc]
version = "0.1.0"
optional = true
[target.'cfg(all(target_os = "windows", target_arch = "x86_64", target_env = "msvc"))'.build-dependencies.sha2]
version = "0.10"
optional = true
[target.'cfg(not(target_os = "macos"))'.dependencies.libloading]
version = "0.9"
[lints.clippy]
dbg_macro = "warn"
todo = "warn"
undocumented_unsafe_blocks = "warn"
unwrap_used = "warn"
[lints.rust]
missing_docs = "warn"
unsafe_op_in_unsafe_fn = "warn"