Files
oak-editor/crates/oak-codec/Cargo.toml
T
Mike-Solar f188bc79e7 feat(gpu-decode): zero-copy hardware imports and the planar pipeline
Adds VAAPI DMA-BUF, D3D11VA shared-handle and VideoToolbox IOSurface
imports behind a tri-state outcome (imported / unsupported / failed),
planar textures with bounded residency and a CPU staging fallback, the
staged montage decode path, reference-counted decoder frames, VAAPI-first
device selection on Linux, and the host-GPU context plumbing used by the
app and worker. See docs/zh/plans/render-pipeline-threads.md (M5).
2026-09-22 20:54:03 +08:00

44 lines
1.6 KiB
TOML

[package]
name = "oak-codec"
version.workspace = true
edition = "2021"
description = "Oak Video Editor media codec module (Rust)"
license = "GPL-3.0-or-later"
[lib]
crate-type = ["staticlib", "rlib"]
[dependencies]
oak-ffmpeg-link = { path = "../oak-ffmpeg-link" }
oak-core = { path = "../oak-core" }
# Real media decode/encode. The C++ ffmpeg_bridge library existed only to
# absorb FFmpeg API churn; the Rust crate calls ffmpeg-next directly.
#
# ffmpeg-next 9.x pairs with FFmpeg 8.x headers, which most distros do
# not ship yet — build a matching GPL FFmpeg (all free-license codecs +
# per-OS hardware acceleration, static+PIC) with
# tooling/ffmpeg/build-ffmpeg.sh and point cargo at it via FFMPEG_DIR
# (see docs/build.md). The `static` feature makes the linker prefer the
# archives.
#
# ffmpeg-next's own `build` feature is NOT usable: it clones
# release/<crate-version>, and every such pairing is broken upstream
# (9.0.0 -> FFmpeg 9.0 removed AVCodec fields; 8.1.0 -> FFmpeg 8.1 added
# enum variants; 8.0.0 -> FFmpeg 8.0 renamed FF_PROFILE_*).
ffmpeg-next = { version = "9", features = ["static"] }
# `std::error::Error` impls for the crate-internal error enum.
thiserror = "2"
# M5 zero-copy import: the D3D11VA COM side (shared NT handle creation
# from the decoder's ID3D11Texture2D). Same `windows` generation as
# wgpu-hal 29 so the Foundation/DXGI types unify.
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.62", features = [
"Win32_Foundation",
"Win32_Graphics_Direct3D11",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
"Win32_Security",
"Win32_System_Com",
] }