Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/media/libvda/bindgen.sh
5394 views
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
8
set -euo pipefail
9
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
10
11
source tools/impl/bindgen-common.sh
12
13
BINDGEN_PLATFORM2="${PWD}/../../platform2"
14
15
bindgen_generate \
16
--allowlist-type='video_.*' \
17
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_common.h" \
18
> media/libvda/src/bindings.rs
19
20
bindgen_generate \
21
--raw-line 'pub use crate::bindings::*;' \
22
--allowlist-function 'initialize' \
23
--allowlist-function 'deinitialize' \
24
--allowlist-function 'get_vda_capabilities' \
25
--allowlist-function 'init_decode_session' \
26
--allowlist-function 'close_decode_session' \
27
--allowlist-function 'vda_.*' \
28
--allowlist-type 'vda_.*' \
29
--blocklist-type 'video_.*' \
30
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_decode.h" \
31
-- \
32
-I "${BINDGEN_PLATFORM2}" \
33
> media/libvda/src/decode/bindings.rs
34
35
bindgen_generate \
36
--raw-line 'pub use crate::bindings::*;' \
37
--allowlist-function 'initialize_encode' \
38
--allowlist-function 'deinitialize_encode' \
39
--allowlist-function 'get_vea_capabilities' \
40
--allowlist-function 'init_encode_session' \
41
--allowlist-function 'close_encode_session' \
42
--allowlist-function 'vea_.*' \
43
--allowlist-type 'vea_.*' \
44
--blocklist-type 'video_.*' \
45
"${BINDGEN_PLATFORM2}/arc/vm/libvda/libvda_encode.h" \
46
-- \
47
-I "${BINDGEN_PLATFORM2}" \
48
> media/libvda/src/encode/bindings.rs
49
50