2021-12-08 01:05:39 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-09-13 17:55:17 +00:00
|
|
|
# Copyright 2022 The ChromiumOS Authors
|
2021-12-08 01:05:39 +00:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2022-09-13 19:37:28 +00:00
|
|
|
|
2021-12-08 01:05:39 +00:00
|
|
|
# Regenerate libvda bindgen bindings.
|
|
|
|
|
|
|
|
set -euo pipefail
|
2022-04-06 18:13:56 +00:00
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
|
2021-12-08 01:05:39 +00:00
|
|
|
|
|
|
|
source tools/impl/bindgen-common.sh
|
|
|
|
|
|
|
|
bindgen_generate \
|
|
|
|
--allowlist-type='video_.*' \
|
|
|
|
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_common.h" \
|
2022-04-06 18:13:56 +00:00
|
|
|
> media/libvda/src/bindings.rs
|
2021-12-08 01:05:39 +00:00
|
|
|
|
|
|
|
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}" \
|
2022-04-06 18:13:56 +00:00
|
|
|
> media/libvda/src/decode/bindings.rs
|
2021-12-08 01:05:39 +00:00
|
|
|
|
|
|
|
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}" \
|
2022-04-06 18:13:56 +00:00
|
|
|
> media/libvda/src/encode/bindings.rs
|