1#!/usr/bin/env bash 2# Copyright 2022 The ChromiumOS Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6# Regenerate libvda bindgen bindings. 7 8set -euo pipefail 9cd "$(dirname "${BASH_SOURCE[0]}")/../.." 10 11source tools/impl/bindgen-common.sh 12 13bindgen_generate \ 14 --allowlist-type='video_.*' \ 15 "${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_common.h" \ 16 > media/libvda/src/bindings.rs 17 18bindgen_generate \ 19 --raw-line 'pub use crate::bindings::*;' \ 20 --allowlist-function 'initialize' \ 21 --allowlist-function 'deinitialize' \ 22 --allowlist-function 'get_vda_capabilities' \ 23 --allowlist-function 'init_decode_session' \ 24 --allowlist-function 'close_decode_session' \ 25 --allowlist-function 'vda_.*' \ 26 --allowlist-type 'vda_.*' \ 27 --blocklist-type 'video_.*' \ 28 "${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_decode.h" \ 29 -- \ 30 -I "${BINDGEN_PLATFORM2}" \ 31 > media/libvda/src/decode/bindings.rs 32 33bindgen_generate \ 34 --raw-line 'pub use crate::bindings::*;' \ 35 --allowlist-function 'initialize_encode' \ 36 --allowlist-function 'deinitialize_encode' \ 37 --allowlist-function 'get_vea_capabilities' \ 38 --allowlist-function 'init_encode_session' \ 39 --allowlist-function 'close_encode_session' \ 40 --allowlist-function 'vea_.*' \ 41 --allowlist-type 'vea_.*' \ 42 --blocklist-type 'video_.*' \ 43 "${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_encode.h" \ 44 -- \ 45 -I "${BINDGEN_PLATFORM2}" \ 46 > media/libvda/src/encode/bindings.rs 47