mediaway-decoder 0.1.2

Hardware-accelerated video/audio decoding (OS-native backends)
docs.rs failed to build mediaway-decoder-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

mediaway-decoder

Status: early development (0.x). Not recommended for production; public APIs may change without notice. Part of the Mediaway media stack.

Hardware-accelerated video and audio decoding: the VideoDecoder trait plus per-platform backends — Windows WMF (H.264/HEVC/AV1/VP9 hardware decode with DX11 Zero-Copy output, plus the inbox Opus decoder MFT), Vulkan Video decode, and WebCodecs (wasm, planned). Streaming push_packet / poll_frame shape; GPU frames stay on the GPU until the session recycles the surface.

Quick start

use mediaway_common::{CodecKind, PixelFormat, Rational, VideoOutputPreference};
use mediaway_decoder::{VideoDecoder, VideoDecoderConfig};
use mediaway_decoder::windows::WindowsVideoDecoder;

let config = VideoDecoderConfig {
    codec: CodecKind::H264,
    width: 1920, height: 1080,
    time_base: Rational::new(1, 30),
    pixel_format: PixelFormat::Nv12,
    output: VideoOutputPreference::ZeroCopyGpu,
    gpu_device: None,
    extra_data: avcc_bytes,
};

let mut decoder = WindowsVideoDecoder::open(&config)?; // WMF hardware session
decoder.push_packet(&h264_packet)?;
while let Some(frame) = decoder.poll_frame()? { /* DX11 texture or CPU frame */ }
decoder.flush()?;

For CPU output frames set output: VideoOutputPreference::CpuFramesOk.

Status

Status marks: ✅ first-class (tests for claimed scope) · ⚡ Zero-Copy path (no payload copy; implies ✅) · 🆗 best-effort / prototype · 🛠️ planned · ❌ attempted and genuinely blocked · 👻 not exercisable yet (no hardware / device / session available)

Area Status Notes
VideoDecoder trait Streaming push/poll API
Windows WMF H.264 decode Hardware MFT, DX11 Zero-Copy output
Windows WMF HEVC / AV1 / VP9 decode Same DXGI path; MFT may be absent on a machine
Windows Opus decode (WmfOpusDecoder) Verified end-to-end (ffmpeg-produced Opus → exact PCM)
Vulkan Video decode H.264 general-GOP hardware-verified; HEVC GPU path unresolved; AV1 follow-up
CPU frame output path 🛠️ CpuFramesOk policy recognized, backend pending
WebCodecs decode (wasm32) 🛠️ Planned
Linux VA-API decode 🛠️ Planned

Docs

  • docs/roadmap.md — stages, deferred items, design decisions
  • mediaway — convenience pipeline (platform::AutoDecoder)
  • Root README — codec support matrices (OS / GPU / vendor)

Contributing

Contributions are welcome — open an issue or pull request at github.com/nyxways/mediaway.

License

MIT OR Apache-2.0.