[package]
edition = "2024"
rust-version = "1.96"
name = "mediaway-decoder"
version = "0.1.8"
authors = ["NyxWays"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Hardware-accelerated video/audio decoding (OS-native backends)"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/nyxways/mediaway"
resolver = "2"
[features]
audio = []
default = [
"full",
"video",
"audio",
]
full = [
"video",
"audio",
]
video = []
[lib]
name = "mediaway_decoder"
crate-type = [
"cdylib",
"rlib",
]
path = "src/lib.rs"
[[test]]
name = "cpu_roundtrip"
path = "tests/cpu_roundtrip.rs"
[[test]]
name = "hardware_av1_decode"
path = "tests/vulkan/hardware_av1_decode.rs"
[[test]]
name = "hardware_h264_decode"
path = "tests/vulkan/hardware_h264_decode.rs"
[[test]]
name = "hardware_hevc_decode"
path = "tests/vulkan/hardware_hevc_decode.rs"
[dependencies.iso-bmff]
version = "0.1.1"
[dependencies.mediaway-common]
version = "0.1"
[dependencies.mediaway-sw]
version = "0.1"
[dependencies.smallvec]
version = "1.15"
features = ["const_generics"]
default-features = false
[dependencies.thiserror]
version = "2.0"
[dependencies.wasm-bindgen]
version = "0.2"
[dependencies.wasm-bindgen-futures]
version = "0.4"
[dev-dependencies.criterion]
version = "0.7"
[dev-dependencies.mediaway-encoder]
version = "0.1"
features = ["video"]
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.bytes]
version = "1.10"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-audio-toolbox]
version = "0.3"
features = [
"AudioConverter",
"objc2-core-audio-types",
]
default-features = false
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-core-audio-types]
version = "0.3"
features = ["CoreAudioBaseTypes"]
default-features = false
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-core-foundation]
version = "0.3"
features = [
"CFString",
"CFDictionary",
"CFNumber",
"CFData",
"CFPropertyList",
]
default-features = false
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-core-media]
version = "0.3"
features = [
"CMBase",
"CMFormatDescription",
"CMSampleBuffer",
"CMTaggedBufferGroup",
"CMTime",
"CMTimeRange",
"CMBlockBuffer",
]
default-features = false
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-core-video]
version = "0.3"
features = [
"CVBase",
"CVBuffer",
"CVImageBuffer",
"CVPixelBuffer",
"CVReturn",
]
default-features = false
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-video-toolbox]
version = "0.3"
features = [
"VTDecompressionSession",
"VTDecompressionProperties",
"VTErrors",
"VTSession",
"objc2-core-media",
"objc2-core-video",
]
default-features = false
[target.'cfg(not(target_family = "wasm"))'.dependencies.vulkanalia]
version = "0.35"
features = [
"std",
"libloading",
]
default-features = false
[target.'cfg(target_arch = "wasm32")'.dependencies.js-sys]
version = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4"
[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = [
"EncodedVideoChunk",
"EncodedVideoChunkInit",
"EncodedVideoChunkType",
"PlaneLayout",
"VideoDecoder",
"VideoDecoderConfig",
"VideoDecoderInit",
"VideoDecoderSupport",
"VideoFrame",
"AudioData",
"AudioDataCopyToOptions",
"AudioDecoder",
"AudioDecoderConfig",
"AudioDecoderInit",
"AudioDecoderSupport",
"AudioSampleFormat",
"EncodedAudioChunk",
"EncodedAudioChunkInit",
"EncodedAudioChunkType",
]
default-features = false
[target.'cfg(target_os = "android")'.dependencies.ndk]
version = "0.9"
features = ["media"]
[target.'cfg(target_os = "linux")'.dependencies.cros-libva]
version = "0.0.13"
[target."cfg(windows)".dependencies.windows]
version = "0.62"
features = [
"Win32_Foundation",
"Win32_System_Com",
"Win32_System_Threading",
"Win32_Security",
"Win32_Media_MediaFoundation",
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D11",
"Win32_Graphics_Direct3D12",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
]
default-features = false
[lints.clippy]
dbg_macro = "deny"
expect_used = "deny"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
panic = "deny"
print_stderr = "deny"
print_stdout = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
async_fn_in_trait = "allow"
elided_lifetimes_in_paths = "warn"
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_code = "deny"
unused_must_use = "deny"