blob: 75149ddb2f3ae3753631772c413bfab9104f4195 [file] [log] [blame]
Bob Badour07562132020-05-20 13:18:00 +00001//
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
20DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_abortCaptures);
21DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_capture);
dimitry06a88542022-04-06 09:09:41 +000022DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_captureV2);
Bob Badour07562132020-05-20 13:18:00 +000023DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_close);
24DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_getDevice);
25DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_logicalCamera_capture);
dimitry06a88542022-04-06 09:09:41 +000026DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_logicalCamera_captureV2);
Bob Badour07562132020-05-20 13:18:00 +000027DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_logicalCamera_setRepeatingRequest);
dimitry06a88542022-04-06 09:09:41 +000028DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_logicalCamera_setRepeatingRequestV2);
Bob Badour07562132020-05-20 13:18:00 +000029DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_setRepeatingRequest);
dimitry06a88542022-04-06 09:09:41 +000030DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_setRepeatingRequestV2);
Bob Badour07562132020-05-20 13:18:00 +000031DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_stopRepeating);
32DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraCaptureSession_updateSharedOutput);
33DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_close);
34DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_createCaptureRequest);
35DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_createCaptureRequest_withPhysicalIds);
36DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_createCaptureSession);
37DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_createCaptureSessionWithSessionParameters);
38DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_getId);
39DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraDevice_isSessionConfigurationSupported);
40DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_create);
41DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_delete);
42DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_deleteCameraIdList);
43DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_getCameraCharacteristics);
44DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_getCameraIdList);
45DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_openCamera);
46DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_registerAvailabilityCallback);
47DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_registerExtendedAvailabilityCallback);
48DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_unregisterAvailabilityCallback);
49DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraManager_unregisterExtendedAvailabilityCallback);
50DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraMetadata_copy);
51DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraMetadata_free);
Evgeny Eltsin9c7d4622020-07-15 15:30:51 +020052DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraMetadata_fromCameraMetadata);
Bob Badour07562132020-05-20 13:18:00 +000053DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraMetadata_getAllTags);
54DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraMetadata_getConstEntry);
55DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraMetadata_isLogicalMultiCamera);
56DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraOutputTarget_create);
57DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACameraOutputTarget_free);
58DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_addTarget);
59DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_copy);
60DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_free);
61DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_getAllTags);
62DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_getConstEntry);
63DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_getConstEntry_physicalCamera);
64DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_getUserContext);
65DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_removeTarget);
66DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_double);
67DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_float);
68DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_i32);
69DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_i64);
70DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_physicalCamera_double);
71DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_physicalCamera_float);
72DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_physicalCamera_i32);
73DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_physicalCamera_i64);
74DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_physicalCamera_rational);
75DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_physicalCamera_u8);
76DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_rational);
77DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setEntry_u8);
78DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureRequest_setUserContext);
79DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionOutputContainer_add);
80DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionOutputContainer_create);
81DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionOutputContainer_free);
82DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionOutputContainer_remove);
83DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionOutput_create);
84DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionOutput_free);
85DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionPhysicalOutput_create);
86DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionSharedOutput_add);
87DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionSharedOutput_create);
88DEFINE_INTERCEPTABLE_STUB_FUNCTION(ACaptureSessionSharedOutput_remove);
89
90static void __attribute__((constructor(0))) init_stub_library() {
91 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_abortCaptures);
92 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_capture);
dimitry06a88542022-04-06 09:09:41 +000093 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_captureV2);
Bob Badour07562132020-05-20 13:18:00 +000094 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_close);
95 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_getDevice);
96 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_logicalCamera_capture);
dimitry06a88542022-04-06 09:09:41 +000097 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_logicalCamera_captureV2);
Bob Badour07562132020-05-20 13:18:00 +000098 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_logicalCamera_setRepeatingRequest);
dimitry06a88542022-04-06 09:09:41 +000099 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_logicalCamera_setRepeatingRequestV2);
Bob Badour07562132020-05-20 13:18:00 +0000100 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_setRepeatingRequest);
dimitry06a88542022-04-06 09:09:41 +0000101 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_setRepeatingRequestV2);
Bob Badour07562132020-05-20 13:18:00 +0000102 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_stopRepeating);
103 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraCaptureSession_updateSharedOutput);
104 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_close);
105 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_createCaptureRequest);
106 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_createCaptureRequest_withPhysicalIds);
107 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_createCaptureSession);
108 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_createCaptureSessionWithSessionParameters);
109 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_getId);
110 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraDevice_isSessionConfigurationSupported);
111 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_create);
112 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_delete);
113 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_deleteCameraIdList);
114 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_getCameraCharacteristics);
115 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_getCameraIdList);
116 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_openCamera);
117 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_registerAvailabilityCallback);
118 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_registerExtendedAvailabilityCallback);
119 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_unregisterAvailabilityCallback);
120 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraManager_unregisterExtendedAvailabilityCallback);
121 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraMetadata_copy);
122 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraMetadata_free);
Evgeny Eltsin9c7d4622020-07-15 15:30:51 +0200123 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraMetadata_fromCameraMetadata);
Bob Badour07562132020-05-20 13:18:00 +0000124 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraMetadata_getAllTags);
125 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraMetadata_getConstEntry);
126 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraMetadata_isLogicalMultiCamera);
127 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraOutputTarget_create);
128 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACameraOutputTarget_free);
129 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_addTarget);
130 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_copy);
131 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_free);
132 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_getAllTags);
133 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_getConstEntry);
134 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_getConstEntry_physicalCamera);
135 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_getUserContext);
136 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_removeTarget);
137 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_double);
138 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_float);
139 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_i32);
140 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_i64);
141 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_physicalCamera_double);
142 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_physicalCamera_float);
143 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_physicalCamera_i32);
144 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_physicalCamera_i64);
145 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_physicalCamera_rational);
146 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_physicalCamera_u8);
147 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_rational);
148 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setEntry_u8);
149 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureRequest_setUserContext);
150 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionOutputContainer_add);
151 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionOutputContainer_create);
152 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionOutputContainer_free);
153 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionOutputContainer_remove);
154 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionOutput_create);
155 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionOutput_free);
156 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionPhysicalOutput_create);
157 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionSharedOutput_add);
158 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionSharedOutput_create);
159 INIT_INTERCEPTABLE_STUB_FUNCTION("libcamera2ndk.so", ACaptureSessionSharedOutput_remove);
160}
161// clang-format on