crosvm/media/ffmpeg
Alexandre Courbot c6f30e4d46 media/ffmpeg: more detailed error message
Knowing the dimensions is helpful here - add this information.

BUG=None
TEST=cargo build --features "video-decoder,vaapi,ffmpeg,libvda-stub"

Change-Id: I0c6f03d6fd05aee36233b2609a3e9da145decec8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5598601
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
2024-06-11 17:25:51 +00:00
..
src media/ffmpeg: more detailed error message 2024-06-11 17:25:51 +00:00
build.rs media: ffmpeg: generate bindings in build.rs 2023-12-08 20:58:57 +00:00
Cargo.toml Cargo.toml: avoid "*" versions for external crates 2024-05-22 01:01:42 +00: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.