mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-01-27 02:28:22 +00:00
324877dbd8
Generate bindings for the installed version of the ffmpeg libraries at build time instead of checking in a static version of the bindings. BUG=b:309563850 TEST=cargo build --features=ffmpeg Change-Id: I38d922dd7332c4385ae6a0ae93e893538c3b1cce Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5027711 Reviewed-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
21 lines
1 KiB
Markdown
21 lines
1 KiB
Markdown
# 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](https://crates.io/crates/ffmpeg-sys) 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.
|