blob: c9e90903498963ec649d21cbd3248a9c963a6318 [file] [log] [blame]
Jayant Chowdhary5033aa12018-07-24 11:56:19 -07001// Copyright 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//
16// libcameraservice
17//
18
Bob Badourc8375042021-02-12 21:02:31 -080019package {
20 default_applicable_licenses: [
21 "frameworks_av_services_camera_libcameraservice_license",
22 ],
23}
24
25// Added automatically by a large-scale-change
26// See: http://go/android-license-faq
27license {
28 name: "frameworks_av_services_camera_libcameraservice_license",
29 visibility: [":__subpackages__"],
30 license_kinds: [
31 "SPDX-license-identifier-Apache-2.0",
32 ],
33 license_text: [
34 "NOTICE",
35 ],
36}
37
Devin Moore65ca53f2023-05-23 17:34:38 +000038cc_defaults {
39 name: "libcameraservice_deps",
Sally Qi6af6e312023-10-09 17:15:36 +000040 defaults: ["android.hardware.graphics.common-ndk_shared"],
Devin Moore65ca53f2023-05-23 17:34:38 +000041 shared_libs: [
42 "libactivitymanager_aidl",
43 "libbase",
44 "libdl",
45 "libui",
46 "liblog",
47 "libutilscallstack",
48 "libutils",
49 "libbinder",
50 "libbinder_ndk",
51 "libactivitymanager_aidl",
52 "libpermission",
53 "libcutils",
54 "libexif",
55 "libmedia",
56 "libmediautils",
57 "libcamera_client",
58 "libcamera_metadata",
59 "libfmq",
60 "libgui",
61 "libhardware",
62 "libhidlbase",
63 "libimage_io",
64 "libjpeg",
65 "libultrahdr",
66 "libmedia_codeclist",
67 "libmedia_omx",
68 "libmemunreachable",
Avichal Rakesh62d45f12023-10-25 12:54:45 -070069 "libnativewindow",
Jyoti Bhayana3128fda2023-04-27 18:27:56 -070070 "libprocessgroup",
71 "libprocinfo",
Devin Moore65ca53f2023-05-23 17:34:38 +000072 "libsensorprivacy",
73 "libstagefright",
74 "libstagefright_foundation",
75 "libxml2",
76 "libyuv",
Jan Sebechlebskya79c9392023-11-17 16:03:25 +010077 "android.companion.virtualdevice.flags-aconfig-cc",
Devin Moore65ca53f2023-05-23 17:34:38 +000078 "android.hardware.camera.common@1.0",
79 "android.hardware.camera.device@1.0",
80 "android.hardware.camera.device@3.2",
81 "android.hardware.camera.device@3.3",
82 "android.hardware.camera.device@3.4",
83 "android.hardware.camera.device@3.5",
84 "android.hardware.camera.device@3.6",
85 "android.hardware.camera.device@3.7",
86 "android.hardware.common-V2-ndk",
87 "android.hardware.common.fmq-V1-ndk",
Eino-Ville Talvala6f1a9c12023-09-14 17:26:28 -070088 "camera_platform_flags_c_lib",
Devin Moore65ca53f2023-05-23 17:34:38 +000089 "media_permission-aidl-cpp",
90 ],
91
92 static_libs: [
93 "android.frameworks.cameraservice.common@2.0",
94 "android.frameworks.cameraservice.service@2.0",
95 "android.frameworks.cameraservice.service@2.1",
96 "android.frameworks.cameraservice.service@2.2",
97 "android.frameworks.cameraservice.device@2.0",
98 "android.frameworks.cameraservice.device@2.1",
99 "android.frameworks.cameraservice.common-V1-ndk",
Avichal Rakesh62d45f12023-10-25 12:54:45 -0700100 "android.frameworks.cameraservice.service-V2-ndk",
101 "android.frameworks.cameraservice.device-V2-ndk",
Devin Moore65ca53f2023-05-23 17:34:38 +0000102 "android.hardware.camera.common-V1-ndk",
Jayant Chowdhary9d3a6492023-11-22 07:23:59 +0000103 "android.hardware.camera.device-V3-ndk",
Avichal Rakeshd6b51642023-12-13 12:50:35 -0800104 "android.hardware.camera.metadata-V3-ndk",
Devin Moore65ca53f2023-05-23 17:34:38 +0000105 "android.hardware.camera.provider@2.4",
106 "android.hardware.camera.provider@2.5",
107 "android.hardware.camera.provider@2.6",
108 "android.hardware.camera.provider@2.7",
Shuzhen Wang045be6c2023-10-12 10:01:10 -0700109 "android.hardware.camera.provider-V3-ndk",
Devin Moore65ca53f2023-05-23 17:34:38 +0000110 "libaidlcommonsupport",
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -0700111 "libbinderthreadstateutils",
112 "libcameraservice_device_independent",
Devin Moore65ca53f2023-05-23 17:34:38 +0000113 "libdynamic_depth",
114 "libprocessinfoservice_aidl",
Jan Sebechlebsky2f66b5e2024-01-16 17:00:26 +0100115 "libvirtualdevicebuildflags",
Devin Moore65ca53f2023-05-23 17:34:38 +0000116 "media_permission-aidl-cpp",
Devin Moore65ca53f2023-05-23 17:34:38 +0000117 ],
118}
119
120cc_library {
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700121 name: "libcameraservice",
122
Devin Moore65ca53f2023-05-23 17:34:38 +0000123 defaults: [
124 "libcameraservice_deps",
125 ],
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700126 // Camera service source
127
128 srcs: [
129 "CameraService.cpp",
Ravneet98ffa752022-03-02 07:22:46 +0000130 "CameraServiceWatchdog.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700131 "CameraFlashlight.cpp",
132 "common/Camera2ClientBase.cpp",
133 "common/CameraDeviceBase.cpp",
Yin-Chia Yehb978c382019-10-30 00:22:37 -0700134 "common/CameraOfflineSessionBase.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700135 "common/CameraProviderManager.cpp",
136 "common/FrameProcessorBase.cpp",
Jayant Chowdhary0bd38522021-11-05 17:49:27 -0700137 "common/hidl/HidlProviderInfo.cpp",
Jayant Chowdharya04055f2022-01-03 02:07:49 +0000138 "common/aidl/AidlProviderInfo.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700139 "api1/Camera2Client.cpp",
140 "api1/client2/Parameters.cpp",
141 "api1/client2/FrameProcessor.cpp",
142 "api1/client2/StreamingProcessor.cpp",
143 "api1/client2/JpegProcessor.cpp",
144 "api1/client2/CallbackProcessor.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700145 "api1/client2/CaptureSequencer.cpp",
146 "api1/client2/ZslProcessor.cpp",
147 "api2/CameraDeviceClient.cpp",
Emilian Peevb2bc5a42019-11-20 16:02:14 -0800148 "api2/CameraOfflineSessionClient.cpp",
Emilian Peev538c90e2018-12-17 18:03:19 +0000149 "api2/CompositeStream.cpp",
150 "api2/DepthCompositeStream.cpp",
Shuzhen Wang68ac7ad2019-01-30 14:03:28 -0800151 "api2/HeicEncoderInfoManager.cpp",
152 "api2/HeicCompositeStream.cpp",
Emilian Peev434248e2022-10-06 14:58:54 -0700153 "api2/JpegRCompositeStream.cpp",
Yin-Chia Yeh5fd603e2019-11-20 11:22:27 -0800154 "device3/BufferUtils.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700155 "device3/Camera3Device.cpp",
Yin-Chia Yehb978c382019-10-30 00:22:37 -0700156 "device3/Camera3OfflineSession.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700157 "device3/Camera3Stream.cpp",
158 "device3/Camera3IOStreamBase.cpp",
159 "device3/Camera3InputStream.cpp",
160 "device3/Camera3OutputStream.cpp",
Ivan Lozanoc0ad82f2020-07-30 09:32:57 -0400161 "device3/Camera3FakeStream.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700162 "device3/Camera3SharedOutputStream.cpp",
163 "device3/StatusTracker.cpp",
164 "device3/Camera3BufferManager.cpp",
165 "device3/Camera3StreamSplitter.cpp",
Yin-Chia Yeh5fd603e2019-11-20 11:22:27 -0800166 "device3/Camera3OutputStreamInterface.cpp",
167 "device3/Camera3OutputUtils.cpp",
Cliff Wuc2ad9c82021-04-21 00:58:58 +0800168 "device3/Camera3DeviceInjectionMethods.cpp",
Jayant Chowdhary9255ce02021-07-15 11:18:17 -0700169 "device3/UHRCropAndMeteringRegionMapper.cpp",
Shuzhen Wangba92d772022-04-11 11:47:24 -0700170 "device3/PreviewFrameSpacer.cpp",
Jayant Chowdhary22441f32021-12-26 18:35:41 -0800171 "device3/hidl/HidlCamera3Device.cpp",
172 "device3/hidl/HidlCamera3OfflineSession.cpp",
173 "device3/hidl/HidlCamera3OutputUtils.cpp",
Jayant Chowdhary35642f22022-01-08 00:39:39 +0000174 "device3/aidl/AidlCamera3Device.cpp",
175 "device3/aidl/AidlCamera3OutputUtils.cpp",
176 "device3/aidl/AidlCamera3OfflineSession.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700177 "gui/RingBufferConsumer.cpp",
Jayant Chowdhary0c947272018-08-15 14:42:04 -0700178 "hidl/AidlCameraDeviceCallbacks.cpp",
Jayant Chowdhary94f79a92018-08-15 13:57:17 -0700179 "hidl/AidlCameraServiceListener.cpp",
Jayant Chowdhary0c947272018-08-15 14:42:04 -0700180 "hidl/HidlCameraDeviceUser.cpp",
181 "hidl/HidlCameraService.cpp",
Jayant Chowdhary2f686522022-05-09 14:52:16 +0000182 "hidl/Utils.cpp",
Avichal Rakeshfcb78cb2022-10-27 15:45:54 -0700183 "aidl/AidlCameraDeviceCallbacks.cpp",
184 "aidl/AidlCameraDeviceUser.cpp",
185 "aidl/AidlCameraService.cpp",
186 "aidl/AidlCameraServiceListener.cpp",
187 "aidl/AidlUtils.cpp",
188 "aidl/DeathPipe.cpp",
Austin Borger249e6592024-03-10 22:28:11 -0700189 "utils/AttributionAndPermissionUtils.cpp",
Shuzhen Wang316781a2020-08-18 18:11:01 -0700190 "utils/CameraServiceProxyWrapper.cpp",
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -0800191 "utils/CameraThreadState.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700192 "utils/CameraTraces.cpp",
193 "utils/AutoConditionLock.cpp",
Jyoti Bhayana3128fda2023-04-27 18:27:56 -0700194 "utils/SchedulingPolicyUtils.cpp",
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -0800195 "utils/SessionConfigurationUtils.cpp",
Jayant Chowdharyc67af1b2022-04-07 18:05:04 +0000196 "utils/SessionConfigurationUtilsHidl.cpp",
Shuzhen Wang316781a2020-08-18 18:11:01 -0700197 "utils/SessionStatsBuilder.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700198 "utils/TagMonitor.cpp",
199 "utils/LatencyHistogram.cpp",
Avichal Rakesh74b5ae72023-12-27 16:56:45 -0800200 "utils/Utils.cpp",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700201 ],
202
Marco Nelissen13aa1a42019-09-27 10:21:55 -0700203 header_libs: [
Austin Borgerce7594d2022-02-22 22:21:38 +0000204 "libdynamic_depth-internal_headers",
205 "libdynamic_depth-public_headers",
Marco Nelissen7c96ea72020-01-10 15:46:22 -0800206 "libmediadrm_headers",
207 "libmediametrics_headers",
Marco Nelissen13aa1a42019-09-27 10:21:55 -0700208 ],
209
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700210 export_shared_lib_headers: [
211 "libbinder",
Steven Moreland09226a72021-04-05 23:18:44 +0000212 "libactivitymanager_aidl",
Steven Moreland5d6ea8f2021-04-13 01:02:53 +0000213 "libpermission",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700214 "libcamera_client",
215 "libfmq",
Michael Grooverd1d435a2018-12-18 17:39:42 -0800216 "libsensorprivacy",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700217 ],
218
219 include_dirs: [
220 "system/media/private/camera/include",
221 "frameworks/native/include/media/openmax",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700222 ],
223
224 export_include_dirs: ["."],
225
226 cflags: [
227 "-Wall",
228 "-Wextra",
229 "-Werror",
Emilian Peev538c90e2018-12-17 18:03:19 +0000230 "-Wno-ignored-qualifiers",
Jayant Chowdhary5033aa12018-07-24 11:56:19 -0700231 ],
232
233}
Austin Borger6db81852021-12-08 20:51:54 +0000234
235cc_library_static {
Austin Borger886c62e2022-01-04 20:58:32 +0000236 name: "libcameraservice_device_independent",
Austin Borger6db81852021-12-08 20:51:54 +0000237 host_supported: true,
238
239 // Camera service source
240
241 srcs: [
Austin Borger94422aa2021-12-14 22:59:59 +0000242 "common/DepthPhotoProcessor.cpp",
Austin Borgerea931242021-12-13 23:10:41 +0000243 "device3/CoordinateMapper.cpp",
244 "device3/DistortionMapper.cpp",
Austin Borger0c9eee22021-12-13 23:36:39 +0000245 "device3/RotateAndCropMapper.cpp",
Austin Borgerab7b1f32021-12-13 23:50:25 +0000246 "device3/ZoomRatioMapper.cpp",
Austin Borger6db81852021-12-08 20:51:54 +0000247 "utils/ExifUtils.cpp",
Austin Borgerea931242021-12-13 23:10:41 +0000248 "utils/SessionConfigurationUtilsHost.cpp",
Austin Borger6db81852021-12-08 20:51:54 +0000249 ],
250
Austin Borgerce7594d2022-02-22 22:21:38 +0000251 header_libs: [
252 "libdynamic_depth-internal_headers",
253 "libdynamic_depth-public_headers",
254 ],
255
Austin Borger6db81852021-12-08 20:51:54 +0000256 shared_libs: [
257 "libbase",
258 "libbinder",
259 "libcamera_metadata",
Austin Borger94422aa2021-12-14 22:59:59 +0000260 "libdynamic_depth",
Austin Borger6db81852021-12-08 20:51:54 +0000261 "libexif",
Austin Borger94422aa2021-12-14 22:59:59 +0000262 "libjpeg",
Austin Borger6db81852021-12-08 20:51:54 +0000263 "liblog",
264 "libutils",
Austin Borger94422aa2021-12-14 22:59:59 +0000265 "libxml2",
Austin Borger249e6592024-03-10 22:28:11 -0700266 "camera_platform_flags_c_lib",
Austin Borger6db81852021-12-08 20:51:54 +0000267 ],
268
269 include_dirs: [
270 "frameworks/av/camera/include",
271 "frameworks/av/camera/include/camera",
272 ],
273
274 export_include_dirs: ["."],
275
276 cflags: [
277 "-Wall",
278 "-Wextra",
279 "-Werror",
280 "-Wno-ignored-qualifiers",
281 ],
282
Ray Essick8fc402a2022-02-16 15:08:55 -0800283}