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