crosvm/libvda/bindgen.sh
Daniel Verkamp ce0d8c51e9 libvda: regenerate bindings
BUG=b:218388029
TEST=tools/presubmit --quick

Change-Id: I37112713dca5e8fef1299fcff72933cfcf06eafd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3339810
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-03-17 22:26:56 +00:00

46 lines
1.5 KiB
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 libvda bindgen bindings.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
source tools/impl/bindgen-common.sh
bindgen_generate \
--allowlist-type='video_.*' \
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_common.h" \
> libvda/src/bindings.rs
bindgen_generate \
--raw-line 'pub use crate::bindings::*;' \
--allowlist-function 'initialize' \
--allowlist-function 'deinitialize' \
--allowlist-function 'get_vda_capabilities' \
--allowlist-function 'init_decode_session' \
--allowlist-function 'close_decode_session' \
--allowlist-function 'vda_.*' \
--allowlist-type 'vda_.*' \
--blocklist-type 'video_.*' \
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_decode.h" \
-- \
-I "${BINDGEN_PLATFORM2}" \
> libvda/src/decode/bindings.rs
bindgen_generate \
--raw-line 'pub use crate::bindings::*;' \
--allowlist-function 'initialize_encode' \
--allowlist-function 'deinitialize_encode' \
--allowlist-function 'get_vea_capabilities' \
--allowlist-function 'init_encode_session' \
--allowlist-function 'close_encode_session' \
--allowlist-function 'vea_.*' \
--allowlist-type 'vea_.*' \
--blocklist-type 'video_.*' \
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_encode.h" \
-- \
-I "${BINDGEN_PLATFORM2}" \
> libvda/src/encode/bindings.rs