crosvm/media/libvda
Keiichi Watanabe 901cd7df7f Reland "github: Minimize dependencies for document generation"
This is a reland of commit 2b85d4d1e5

Diff from the original CL:
* Changed the return value of `main()` in power_monitor/build.rs
* Ran cargo-check with all features enabled

Original change's description:
> github: Minimize dependencies for document generation
>
> Instead of install full dependencies with `install-deps` in GitHub
> action, minimize dependencies because we use GitHub only for document
> generation.
>
> - Passed `CARGO_DOC` environment when running cargo-doc command so we
>   can skip unnecessary build flow when we just want to generate API docs.
> - Added a new script `install-docs-deps` to install only doc-related
>   dependencies.
>
> BUG=none
> TEST=test on GitHub Action at my personal repository
>
> Change-Id: Ibe988ab43215e285d946812bdd6c1536ae87b50e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3578144
> Tested-by: kokoro <noreply+kokoro@google.com>
> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
> Reviewed-by: Anton Romanov <romanton@google.com>
> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>

Bug=none
TEST=cargo check --all-features

Change-Id: I77ee6543910e3fe7f69be48f8f965eda3433d4e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3584063
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-04-12 22:30:10 +00:00
..
src Move libvda to media/libvda 2022-04-06 01:19:07 +00:00
tests Move libvda to media/libvda 2022-04-06 01:19:07 +00:00
bindgen.sh media/libvda: fix bindgen path after move 2022-04-07 13:28:37 +00:00
build.rs Reland "github: Minimize dependencies for document generation" 2022-04-12 22:30:10 +00:00
Cargo.toml Move libvda to media/libvda 2022-04-06 01:19:07 +00:00
README.md Move libvda to media/libvda 2022-04-06 01:19:07 +00:00

Libvda Rust wrapper

Note: This crate is specific to ChromeOS and requires the native (libvda)[https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform2/arc/vm/libvda] library at link time.

Rust wrapper for libvda. This library is used to enable communication with Chrome's GPU process to perform hardware accelerated decoding and encoding. It is currently in development to be used by crosvm's virtio-video device.

Building for the host environment

You can also execute cargo directly for faster build and tests. This would be useful when you are developing this crate. Since this crate depends on libvda.so, you need to install it to host environment first.

(chroot)$ sudo emerge chromeos-base/libvda        # Install libvda.so to host.
# Build
(chroot)$ cargo build
# Unit tests
(chroot)$ cargo test

Updating generated bindings

src/bindings.rs is automatically generated from libvda_common.h. src/decode/bindings.rs is automatically generated from libvda_decode.h. src/encode/bindings.rs is automatically generated from libvda_encode.h.

See the header of the bindings file for the generation command.