mediaway-decoder 0.1.2

Hardware-accelerated video/audio decoding (OS-native backends)
[package]
name = "mediaway-decoder"
description = "Hardware-accelerated video/audio decoding (OS-native backends)"
version.workspace = true
publish = true # hardware-verified — see docs/roadmap.md
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true


[dependencies]
mediaway-common = { workspace = true }
thiserror = { workspace = true }

iso-bmff = { workspace = true }
# `d3d12_video_decode`'s H.264 NAL/bit framing reuse (BitReader/NalUnit/split_annex_b/
# split_avcc only — not the IDR-only Sps/Pps/SliceHeader, see ADR-0002).
mediaway-sw = { workspace = true }
smallvec = { workspace = true }

# Vulkan bindings, same crate/version already reviewed for
# mediaway-encoder-vulkan (Apache-2.0, workspace-pinned). `libloading`
# dynamically resolves the system Vulkan loader at runtime — never a
wasm-bindgen = { workspace = true }
wasm-bindgen-futures = { workspace = true }


[target.'cfg(not(target_family = "wasm"))'.dependencies]
# Vulkan Video bindings — desktop only; libloading is not wasm32-compatible.
vulkanalia = { workspace = true }

[lints]
workspace = true


[lib]
crate-type = ["cdylib", "rlib"]

[dev-dependencies]
mediaway-encoder = { workspace = true, features = ["video"] }
criterion = { workspace = true }

# Round-trip hardware test only (tests/hardware_hevc_decode.rs): produces a
# real HEVC bitstream via this workspace's own hardware-verified encoder,
# instead of hand-writing a CABAC-coded Annex-B stream by hand (unlike H.264,
# HEVC has no CAVLC/I_PCM escape that bypasses entropy coding entirely — see
# adr/0001's HEVC addendum for why hand-construction was not chosen here).

[target.'cfg(windows)'.dependencies]
windows = { workspace = true, 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",
] }


[target.'cfg(target_os = "linux")'.dependencies]
cros-libva = { workspace = true }


[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = { workspace = true }
js-sys = { workspace = true }
web-sys = { workspace = true, features = [
    "EncodedVideoChunk",
    "EncodedVideoChunkInit",
    "EncodedVideoChunkType",
    "PlaneLayout",
    "VideoDecoder",
    "VideoDecoderConfig",
    "VideoDecoderInit",
    "VideoDecoderSupport",
    "VideoFrame",
] }


[features]
default = ["full", "video", "audio"]
video = []
full = ["video", "audio"]
audio = []