• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright (C) 2020 The Android Open Source Project
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 // clang-format off
18 #include "native_bridge_support/vdso/interceptable_functions.h"
19 
20 DEFINE_INTERCEPTABLE_STUB_FUNCTION(xaCreateEngine);
21 DEFINE_INTERCEPTABLE_STUB_FUNCTION(xaQueryNumSupportedEngineInterfaces);
22 DEFINE_INTERCEPTABLE_STUB_FUNCTION(xaQuerySupportedEngineInterfaces);
23 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_ANDROIDBUFFERQUEUESOURCE);
24 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_AUDIODECODERCAPABILITIES);
25 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_AUDIOENCODER);
26 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_AUDIOENCODERCAPABILITIES);
27 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_AUDIOIODEVICECAPABILITIES);
28 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_CAMERA);
29 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_CAMERACAPABILITIES);
30 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_CONFIGEXTENSION);
31 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_DEVICEVOLUME);
32 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_DYNAMICINTERFACEMANAGEMENT);
33 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_DYNAMICSOURCE);
34 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_ENGINE);
35 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_EQUALIZER);
36 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_IMAGECONTROLS);
37 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_IMAGEDECODERCAPABILITIES);
38 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_IMAGEEFFECTS);
39 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_IMAGEENCODER);
40 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_IMAGEENCODERCAPABILITIES);
41 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_LED);
42 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_METADATAEXTRACTION);
43 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_METADATAINSERTION);
44 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_METADATATRAVERSAL);
45 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_NULL);
46 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_OBJECT);
47 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_OUTPUTMIX);
48 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_PLAY);
49 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_PLAYBACKRATE);
50 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_PREFETCHSTATUS);
51 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_RADIO);
52 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_RDS);
53 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_RECORD);
54 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_SEEK);
55 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_SNAPSHOT);
56 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_STREAMINFORMATION);
57 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_THREADSYNC);
58 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_VIBRA);
59 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_VIDEODECODERCAPABILITIES);
60 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_VIDEOENCODER);
61 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_VIDEOENCODERCAPABILITIES);
62 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_VIDEOPOSTPROCESSING);
63 DEFINE_INTERCEPTABLE_STUB_VARIABLE(XA_IID_VOLUME);
64 
init_stub_library()65 static void __attribute__((constructor(0))) init_stub_library() {
66   INIT_INTERCEPTABLE_STUB_FUNCTION("libOpenMAXAL.so", xaCreateEngine);
67   INIT_INTERCEPTABLE_STUB_FUNCTION("libOpenMAXAL.so", xaQueryNumSupportedEngineInterfaces);
68   INIT_INTERCEPTABLE_STUB_FUNCTION("libOpenMAXAL.so", xaQuerySupportedEngineInterfaces);
69   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_ANDROIDBUFFERQUEUESOURCE);
70   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_AUDIODECODERCAPABILITIES);
71   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_AUDIOENCODER);
72   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_AUDIOENCODERCAPABILITIES);
73   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_AUDIOIODEVICECAPABILITIES);
74   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_CAMERA);
75   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_CAMERACAPABILITIES);
76   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_CONFIGEXTENSION);
77   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_DEVICEVOLUME);
78   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_DYNAMICINTERFACEMANAGEMENT);
79   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_DYNAMICSOURCE);
80   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_ENGINE);
81   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_EQUALIZER);
82   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_IMAGECONTROLS);
83   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_IMAGEDECODERCAPABILITIES);
84   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_IMAGEEFFECTS);
85   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_IMAGEENCODER);
86   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_IMAGEENCODERCAPABILITIES);
87   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_LED);
88   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_METADATAEXTRACTION);
89   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_METADATAINSERTION);
90   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_METADATATRAVERSAL);
91   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_NULL);
92   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_OBJECT);
93   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_OUTPUTMIX);
94   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_PLAY);
95   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_PLAYBACKRATE);
96   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_PREFETCHSTATUS);
97   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_RADIO);
98   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_RDS);
99   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_RECORD);
100   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_SEEK);
101   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_SNAPSHOT);
102   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_STREAMINFORMATION);
103   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_THREADSYNC);
104   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_VIBRA);
105   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_VIDEODECODERCAPABILITIES);
106   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_VIDEOENCODER);
107   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_VIDEOENCODERCAPABILITIES);
108   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_VIDEOPOSTPROCESSING);
109   INIT_INTERCEPTABLE_STUB_VARIABLE("libOpenMAXAL.so", XA_IID_VOLUME);
110 }
111 // clang-format on
112