mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 02:02:52 +00:00
9dbb169557
This is a reland of commit 213f9fe8a7
.
In light of the upcoming VAAPI video decoder backend, add a VAAPI
wrapper crate that exposes a safe Rust API for a subset of the VAAPI C
code. This crate will be called from the VAAPI video decoder backend in
order to decode frames.
BUG=b:214478588
TEST=cargo build --features "video-decoder,vaapi"
TEST=`cargo test -- --include-ignored` in `media/libva` passes on a
device with Intel GPU and libva installed.
Change-Id: I586a160e477e466985c5cfa65a527542ddc03226
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3752274
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
22 lines
737 B
Bash
Executable file
22 lines
737 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Copyright 2022 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Regenerate libva bindgen bindings.
|
|
set -euo pipefail
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
|
|
source tools/impl/bindgen-common.sh
|
|
bindgen_generate \
|
|
--raw-line "pub mod constants;" \
|
|
--with-derive-eq \
|
|
--constified-enum-module "VA.*" \
|
|
--allowlist-function "va.*" \
|
|
--allowlist-type ".*MPEG2.*|.*VP8.*|.*VP9.*|.*H264.*" \
|
|
"media/libva/libva-wrapper.h" \
|
|
> media/libva/src/bindings/va.rs
|
|
|
|
bindgen_generate \
|
|
--allowlist-var "VA.*" \
|
|
"media/libva/libva-wrapper.h" \
|
|
> media/libva/src/bindings/va/constants.rs
|