1*bb4ee6a4SAndroid Build Coastguard Worker# FFmpeg wrapper 2*bb4ee6a4SAndroid Build Coastguard Worker 3*bb4ee6a4SAndroid Build Coastguard WorkerThis is a minimal FFmpeg 5.0+ wrapper for use with the virtio-video device, allowing to run a 4*bb4ee6a4SAndroid Build Coastguard Workervirtual video device backed by software decoding or encoding. This is useful for development and 5*bb4ee6a4SAndroid Build Coastguard Workertesting in situations where no supported video acceleration is available on the host. 6*bb4ee6a4SAndroid Build Coastguard Worker 7*bb4ee6a4SAndroid Build Coastguard WorkerAlthough several FFmpeg binding crates exist, most of them are not able to link against the system 8*bb4ee6a4SAndroid Build Coastguard WorkerFFmpeg, and [the only one that does](https://crates.io/crates/ffmpeg-sys) is released under a 9*bb4ee6a4SAndroid Build Coastguard Workersoftware license that makes our lawyers nervous. 10*bb4ee6a4SAndroid Build Coastguard Worker 11*bb4ee6a4SAndroid Build Coastguard WorkerSo taking this in consideration, as well as the extra work that it is to depend on external Rust 12*bb4ee6a4SAndroid Build Coastguard Workercrates in ChromeOS, it is preferable to add our own simple bindings here that cover just the parts 13*bb4ee6a4SAndroid Build Coastguard Workerof FFmpeg that we need. 14*bb4ee6a4SAndroid Build Coastguard Worker 15*bb4ee6a4SAndroid Build Coastguard WorkerThis crate has minimal dependencies ; on the FFmpeg side, it just uses `libavcodec`, `libavutil` and 16*bb4ee6a4SAndroid Build Coastguard Worker`libswscale`. 17*bb4ee6a4SAndroid Build Coastguard Worker 18*bb4ee6a4SAndroid Build Coastguard WorkerA few elements that bindgen cannot generate because they are behind C macros are re-defined in 19*bb4ee6a4SAndroid Build Coastguard Worker`avutil.rs` and `error.rs`, as well as tests to ensure their correctness. 20*bb4ee6a4SAndroid Build Coastguard Worker 21*bb4ee6a4SAndroid Build Coastguard WorkerAnd that's about it. 22