crosvm/media/ffmpeg
Keiichi Watanabe 4b0f24e4ef Automatic clippy fix for Rust 1.88
To prepare for Rust toolchain uprev, ran `tools/clippy --fix` with
Rust 1.88 for each platform.
To build with the current Rust version 1.81, some changes with unstable
features were manually reverted.

BUG=b:455879436
TEST=CQ

Change-Id: I4a91460d4fc2de5d7afbc2da04b7f7765219bb2e
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/7089630
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2025-11-17 10:25:21 -08:00
..
src Automatic clippy fix for Rust 1.88 2025-11-17 10:25:21 -08:00
build.rs Add aarch64-linux-android target 2024-07-11 17:35:22 +00:00
Cargo.toml Workspace deps grab bag 2025-05-16 11:26:38 -07:00
README.md media: ffmpeg: generate bindings in build.rs 2023-12-08 20:58:57 +00:00

FFmpeg wrapper

This is a minimal FFmpeg 5.0+ wrapper for use with the virtio-video device, allowing to run a virtual video device backed by software decoding or encoding. This is useful for development and testing in situations where no supported video acceleration is available on the host.

Although several FFmpeg binding crates exist, most of them are not able to link against the system FFmpeg, and the only one that does is released under a software license that makes our lawyers nervous.

So taking this in consideration, as well as the extra work that it is to depend on external Rust crates in ChromeOS, it is preferable to add our own simple bindings here that cover just the parts of FFmpeg that we need.

This crate has minimal dependencies ; on the FFmpeg side, it just uses libavcodec, libavutil and libswscale.

A few elements that bindgen cannot generate because they are behind C macros are re-defined in avutil.rs and error.rs, as well as tests to ensure their correctness.

And that's about it.