Files
Mike-Solar 725a1d4da0 oak-ffmpeg-link: link the prebuilt shared FFmpeg on Windows
The Windows CI/CD archive (BtbN) is a shared build whose seven MSVC
import libraries have canonical names and whose .pc files carry no
external Libs.private, so pkg-config resolution is unnecessary there.
When neither pkg-config nor pkgconf exists, the script now emits the
fixed link line instead of panicking — but only on Windows: everywhere
else a static FFmpeg still needs the transitive list from its .pc files,
and MSYS2 local builds keep using pkg-config.

The FFmpeg 9 note in oak-codec's manifest is refreshed as well.
2026-09-24 18:49:54 +08:00

45 lines
1.7 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 compiles against the FFmpeg 8.x and 9.x headers (both
# verified locally with the project FFmpeg build), but most distros do
# not ship a matching prebuilt library yet — build one (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. CI/CD uses the same script on Linux/macOS and BtbN's
# prebuilt shared archive on Windows.
#
# ffmpeg-next's own `build` cargo feature is still not what we use: it
# clones release/<crate-version>, tying the FFmpeg version to the crate
# version instead of the project-pinned one.
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",
] }