mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 17:44:10 +00:00
fc891cea82
The virtio video decoder device is currently only available under very drastic conditions: a build linked against libvda (a ChromeOS-only library that needs the cros chroot to be built and linked against), and a ChromeOS-flavored Chrome instance running alongside crosvm, so the browser can provide the video decoding service through Mojo. This makes the decoder device very difficult to develop on for non-Chromies, and also for Chromies actually since they will always need a DUT to test it on. This patch introduces an alternative decoder backend based on ffmpeg's libraries that performs decoding on the host's CPU. It supports both guest pages and virtio objects as target, and can be considered a reliable and predictable way to test the decoder in any environment. We introduce our own ffmpeg bindings after a quick state of the art revealed that the existing ones were all unsuitable, either for technical or licensing reasons. Doing so is also not a big effort and does not add any new external crate dependency to crosvm. BUG=b:169295147 TEST=cargo test --features "video-decoder,ffmpeg" -p devices ffmpeg TEST=v4l2r's simple_decoder example decodes test-25fps.h264 properly with the following command: ./simple_decoder test-25fps.h264 /dev/video0 --input_format h264 --save test-25fps.nv12 TEST=ARCVM Android youtube plays videos correctly when the ffmpeg backend is used. Change-Id: Ic9c586193f7939f2a3fe59d009c3666585a8bbc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3026355 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> |
||
---|---|---|
.. | ||
ffmpeg | ||
libvda |