blob: 71c1673606006068a6afcb58795c08e51f1cb7c1 [file] [log] [blame]
Dan Willemsene7cb7812017-04-19 19:23:50 -07001// Copyright 2010 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
Bob Badour56786ac2021-02-25 15:24:36 -080015package {
Ronish Kaliab5dd44b2024-02-14 14:32:32 +000016 default_team: "trendy_team_camera_framework",
Bob Badour56786ac2021-02-25 15:24:36 -080017 default_applicable_licenses: ["frameworks_av_camera_license"],
18}
19
20// Added automatically by a large-scale-change that took the approach of
21// 'apply every license found to every target'. While this makes sure we respect
22// every license restriction, it may not be entirely correct.
23//
24// e.g. GPL in an MIT project might only apply to the contrib/ directory.
25//
26// Please consider splitting the single license below into multiple licenses,
27// taking care not to lose any license_kind information, and overriding the
28// default license using the 'licenses: [...]' property on targets as needed.
29//
30// For unused files, consider creating a 'fileGroup' with "//visibility:private"
31// to attach the license to, and including a comment whether the files may be
32// used in the current project.
33// See: http://go/android-license-faq
34license {
35 name: "frameworks_av_camera_license",
36 visibility: [":__subpackages__"],
37 license_kinds: [
38 "SPDX-license-identifier-Apache-2.0",
39 "SPDX-license-identifier-MIT",
40 "SPDX-license-identifier-Unicode-DFS",
41 ],
42 license_text: [
43 "NOTICE",
44 ],
45}
46
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -070047aconfig_declarations {
48 name: "camera_platform_flags",
49 package: "com.android.internal.camera.flags",
Oriol Prieto Gascoe7006452024-02-06 18:34:40 +000050 container: "system",
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -070051 srcs: ["camera_platform.aconfig"],
52}
53
54cc_aconfig_library {
55 name: "camera_platform_flags_c_lib",
56 aconfig_declarations: "camera_platform_flags",
Dennis Shen353dfbb2024-09-20 12:57:22 +000057}
58
59cc_aconfig_library {
60 name: "camera_platform_flags_c_lib_for_test",
61 aconfig_declarations: "camera_platform_flags",
Emilian Peevc1021592023-11-22 00:59:48 +000062 host_supported: true,
Dennis Shen353dfbb2024-09-20 12:57:22 +000063 mode: "test",
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -070064}
65
66java_aconfig_library {
67 name: "camera_platform_flags_java_lib",
68 aconfig_declarations: "camera_platform_flags",
69}
70
Trevor Radcliffede1d3172021-10-20 20:04:25 +000071cc_library_headers {
72 name: "camera_headers",
73 export_include_dirs: ["include"],
74}
Ronish Kaliab5dd44b2024-02-14 14:32:32 +000075
Aditya Wazirc10fe692021-07-28 17:56:21 +053076cc_library {
Dan Willemsene7cb7812017-04-19 19:23:50 -070077 name: "libcamera_client",
78
79 aidl: {
80 export_aidl_headers: true,
81 local_include_dirs: ["aidl"],
82 include_dirs: [
Dan Willemsene7cb7812017-04-19 19:23:50 -070083 "frameworks/native/aidl/gui",
Austin Borger65e64642024-06-11 15:58:23 -070084 "frameworks/native/libs/permission/aidl",
Jayant Chowdharydcae7962024-08-20 21:20:10 +000085 "hardware/interfaces/common/fmq/aidl",
86 "hardware/interfaces/common/aidl",
Dan Willemsene7cb7812017-04-19 19:23:50 -070087 ],
88 },
89
90 srcs: [
91 // AIDL files for camera interfaces
92 // The headers for these interfaces will be available to any modules that
93 // include libcamera_client, at the path "aidl/package/path/BnFoo.h"
Colin Cross6bf135b2017-11-14 13:05:37 -080094 ":libcamera_client_aidl",
Eino-Ville Talvalae8c96c72017-06-27 12:24:07 -070095
Dan Willemsene7cb7812017-04-19 19:23:50 -070096 // Source for camera interface parcelables, and manually-written interfaces
97 "Camera.cpp",
Austin Borgeraf8d5d42024-06-11 16:21:11 -070098 "CameraBase.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070099 "CameraMetadata.cpp",
100 "CameraParameters.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700101 "CameraParameters2.cpp",
Shuzhen Wang316781a2020-08-18 18:11:01 -0700102 "CameraSessionStats.cpp",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700103 "CameraUtils.cpp",
104 "CaptureResult.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700105 "ICamera.cpp",
106 "ICameraClient.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700107 "ICameraRecordingProxy.cpp",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700108 "VendorTagDescriptor.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700109 "camera2/CaptureRequest.cpp",
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -0800110 "camera2/ConcurrentCamera.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700111 "camera2/OutputConfiguration.cpp",
Emilian Peev35ae8262018-11-08 13:11:32 +0000112 "camera2/SessionConfiguration.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700113 "camera2/SubmitInfo.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700114 ],
115
116 shared_libs: [
Jayant Chowdharydcae7962024-08-20 21:20:10 +0000117 "android.hardware.common.fmq-V1-cpp",
118 "android.hardware.common-V2-cpp",
Eino-Ville Talvala6f1a9c12023-09-14 17:26:28 -0700119 "camera_platform_flags_c_lib",
Austin Borger65e64642024-06-11 15:58:23 -0700120 "framework-permission-aidl-cpp",
Austin Borger18b30a72022-10-27 12:20:29 -0700121 "lib-platform-compat-native-api",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700122 "libbase",
123 "libbinder",
124 "libcamera_metadata",
125 "libcutils",
126 "libgui",
127 "liblog",
128 "libnativewindow",
Austin Borger65e64642024-06-11 15:58:23 -0700129 "libpermission",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700130 "libutils",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700131 ],
132
133 include_dirs: [
Dan Willemsene7cb7812017-04-19 19:23:50 -0700134 "frameworks/native/include/media/openmax",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700135 "system/media/private/camera/include",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700136 ],
Vijay Venkatraman9b2049e2017-06-08 13:49:20 -0700137 export_include_dirs: [
Ronish Kaliab5dd44b2024-02-14 14:32:32 +0000138 "include",
139 "include/camera",
Vijay Venkatraman9b2049e2017-06-08 13:49:20 -0700140 ],
Ronish Kaliab5dd44b2024-02-14 14:32:32 +0000141 export_shared_lib_headers: [
Austin Borger65e64642024-06-11 15:58:23 -0700142 "framework-permission-aidl-cpp",
Jayant Chowdharydcae7962024-08-20 21:20:10 +0000143 "android.hardware.common.fmq-V1-cpp",
144 "android.hardware.common-V2-cpp",
Ronish Kaliab5dd44b2024-02-14 14:32:32 +0000145 "libcamera_metadata",
Ronish Kaliab5dd44b2024-02-14 14:32:32 +0000146 "libgui",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700147 "libnativewindow",
Ronish Kaliab5dd44b2024-02-14 14:32:32 +0000148 ],
Dan Willemsene7cb7812017-04-19 19:23:50 -0700149
150 cflags: [
Dan Willemsene7cb7812017-04-19 19:23:50 -0700151 "-Wall",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700152 "-Werror",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700153 "-Wextra",
154 ],
Mark Urbanusa096aba2017-06-02 12:19:05 -0700155
Dan Willemsene7cb7812017-04-19 19:23:50 -0700156}
Colin Cross6bf135b2017-11-14 13:05:37 -0800157
Austin Borger6db81852021-12-08 20:51:54 +0000158cc_library_host_static {
159 name: "libcamera_client_host",
160
161 srcs: [
162 "CameraMetadata.cpp",
163 "VendorTagDescriptor.cpp",
164 ],
165
166 shared_libs: [
167 "libbase",
168 "libcamera_metadata",
169 ],
170
171 include_dirs: [
Austin Borger6db81852021-12-08 20:51:54 +0000172 "frameworks/native/include/media/openmax",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700173 "system/media/private/camera/include",
Austin Borger6db81852021-12-08 20:51:54 +0000174 ],
175
176 export_include_dirs: [
177 "include",
Ronish Kaliab5dd44b2024-02-14 14:32:32 +0000178 "include/camera",
Austin Borger6db81852021-12-08 20:51:54 +0000179 ],
180}
181
Colin Cross6bf135b2017-11-14 13:05:37 -0800182// AIDL interface between camera clients and the camera service.
183filegroup {
184 name: "libcamera_client_aidl",
185 srcs: [
Avichal Rakesh6e57a2b2023-05-01 17:53:37 -0700186 "aidl/android/hardware/CameraExtensionSessionStats.aidl",
Shuzhen Wange3e8e732024-05-22 17:48:01 -0700187 "aidl/android/hardware/CameraFeatureCombinationStats.aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800188 "aidl/android/hardware/ICameraService.aidl",
189 "aidl/android/hardware/ICameraServiceListener.aidl",
190 "aidl/android/hardware/ICameraServiceProxy.aidl",
191 "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl",
192 "aidl/android/hardware/camera2/ICameraDeviceUser.aidl",
Cliff Wud8cae102021-03-11 01:37:42 +0800193 "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl",
194 "aidl/android/hardware/camera2/ICameraInjectionSession.aidl",
Avichal Rakesh6e57a2b2023-05-01 17:53:37 -0700195 "aidl/android/hardware/camera2/ICameraOfflineSession.aidl",
Jayant Chowdharydcae7962024-08-20 21:20:10 +0000196 "aidl/android/hardware/camera2/CameraMetadataInfo.aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800197 ],
Dan Willemsenfaeab0f2018-09-14 21:17:46 -0700198 path: "aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800199}
200
201// Extra AIDL files that are used by framework.jar but not libcamera_client
202// because they have hand-written native implementations.
203filegroup {
204 name: "libcamera_client_framework_aidl",
205 srcs: [
206 "aidl/android/hardware/ICamera.aidl",
207 "aidl/android/hardware/ICameraClient.aidl",
208 ],
Dan Willemsenfaeab0f2018-09-14 21:17:46 -0700209 path: "aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800210}