1*1b4853f5SAndroid Build Coastguard Worker# FFmpeg software decoder device for virtio-media 2*1b4853f5SAndroid Build Coastguard Worker 3*1b4853f5SAndroid Build Coastguard WorkerThis crate contains a virtio-media decoder device implementation that performs 4*1b4853f5SAndroid Build Coastguard Workerdecoding in software using the host's FFmpeg library. It provides an easy way to 5*1b4853f5SAndroid Build Coastguard Workertry virtio-media without any specific hardware, as well as an example 6*1b4853f5SAndroid Build Coastguard Workerimplementation for a decoder device. 7*1b4853f5SAndroid Build Coastguard Worker 8*1b4853f5SAndroid Build Coastguard Worker## Features 9*1b4853f5SAndroid Build Coastguard Worker 10*1b4853f5SAndroid Build Coastguard Worker- Decoding of H.264, VP8, VP9, HEVC. 11*1b4853f5SAndroid Build Coastguard Worker- Supported output formats: NV12. 12*1b4853f5SAndroid Build Coastguard Worker 13*1b4853f5SAndroid Build Coastguard Worker## Building 14*1b4853f5SAndroid Build Coastguard Worker 15*1b4853f5SAndroid Build Coastguard WorkerThe device should be added to your VMM like any other virtio-media device. At 16*1b4853f5SAndroid Build Coastguard Workerbuild time, the `build.rs` script will attempt to detect the host's FFmpeg 17*1b4853f5SAndroid Build Coastguard Workerlibraries, run `bindgen` on then to create its wrapper, and link against them. 18*1b4853f5SAndroid Build Coastguard Worker 19*1b4853f5SAndroid Build Coastguard WorkerThis crate provides its own FFmpeg bindings - 3rdparty ones were considered, but 20*1b4853f5SAndroid Build Coastguard Workerunfortunately I could not get any to build reliably. 21*1b4853f5SAndroid Build Coastguard Worker 22*1b4853f5SAndroid Build Coastguard Worker## Limitations 23*1b4853f5SAndroid Build Coastguard Worker 24*1b4853f5SAndroid Build Coastguard WorkerThis is still a bit of a work-in-progress, although FFmpeg in the guest works 25*1b4853f5SAndroid Build Coastguard Workerreliably using the `v4l2m2m` series of codecs. Support for more output formats 26*1b4853f5SAndroid Build Coastguard Workerand a code cleanup are in order. 27