blob: 4c5b16069c304b14d52539570c1f7bc366c6cfcb [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 {
16 default_applicable_licenses: ["frameworks_av_camera_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32// See: http://go/android-license-faq
33license {
34 name: "frameworks_av_camera_license",
35 visibility: [":__subpackages__"],
36 license_kinds: [
37 "SPDX-license-identifier-Apache-2.0",
38 "SPDX-license-identifier-MIT",
39 "SPDX-license-identifier-Unicode-DFS",
40 ],
41 license_text: [
42 "NOTICE",
43 ],
44}
45
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -070046aconfig_declarations {
47 name: "camera_platform_flags",
48 package: "com.android.internal.camera.flags",
Oriol Prieto Gascoe7006452024-02-06 18:34:40 +000049 container: "system",
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -070050 srcs: ["camera_platform.aconfig"],
51}
52
53cc_aconfig_library {
54 name: "camera_platform_flags_c_lib",
55 aconfig_declarations: "camera_platform_flags",
Emilian Peevc1021592023-11-22 00:59:48 +000056 host_supported: true,
Eino-Ville Talvalaae70f8c2023-08-18 10:10:55 -070057}
58
59java_aconfig_library {
60 name: "camera_platform_flags_java_lib",
61 aconfig_declarations: "camera_platform_flags",
62}
63
Trevor Radcliffede1d3172021-10-20 20:04:25 +000064cc_library_headers {
65 name: "camera_headers",
66 export_include_dirs: ["include"],
67}
Aditya Wazirc10fe692021-07-28 17:56:21 +053068cc_library {
Dan Willemsene7cb7812017-04-19 19:23:50 -070069 name: "libcamera_client",
70
71 aidl: {
72 export_aidl_headers: true,
73 local_include_dirs: ["aidl"],
74 include_dirs: [
Dan Willemsene7cb7812017-04-19 19:23:50 -070075 "frameworks/native/aidl/gui",
76 ],
77 },
78
79 srcs: [
80 // AIDL files for camera interfaces
81 // The headers for these interfaces will be available to any modules that
82 // include libcamera_client, at the path "aidl/package/path/BnFoo.h"
Colin Cross6bf135b2017-11-14 13:05:37 -080083 ":libcamera_client_aidl",
Eino-Ville Talvalae8c96c72017-06-27 12:24:07 -070084
Dan Willemsene7cb7812017-04-19 19:23:50 -070085 // Source for camera interface parcelables, and manually-written interfaces
86 "Camera.cpp",
87 "CameraMetadata.cpp",
88 "CameraParameters.cpp",
89 "CaptureResult.cpp",
90 "CameraParameters2.cpp",
Shuzhen Wang316781a2020-08-18 18:11:01 -070091 "CameraSessionStats.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070092 "ICamera.cpp",
93 "ICameraClient.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070094 "ICameraRecordingProxy.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070095 "camera2/CaptureRequest.cpp",
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -080096 "camera2/ConcurrentCamera.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070097 "camera2/OutputConfiguration.cpp",
Emilian Peev35ae8262018-11-08 13:11:32 +000098 "camera2/SessionConfiguration.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070099 "camera2/SubmitInfo.cpp",
100 "CameraBase.cpp",
101 "CameraUtils.cpp",
102 "VendorTagDescriptor.cpp",
103 ],
104
105 shared_libs: [
Eino-Ville Talvala6f1a9c12023-09-14 17:26:28 -0700106 "camera_platform_flags_c_lib",
Jayant Chowdharyef30c3b2021-02-22 22:47:39 +0000107 "libbase",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700108 "libcutils",
109 "libutils",
110 "liblog",
111 "libbinder",
112 "libgui",
113 "libcamera_metadata",
Mathias Agopiandefb1b02017-04-27 22:40:10 -0700114 "libnativewindow",
Austin Borger18b30a72022-10-27 12:20:29 -0700115 "lib-platform-compat-native-api",
Dan Willemsene7cb7812017-04-19 19:23:50 -0700116 ],
117
118 include_dirs: [
119 "system/media/private/camera/include",
120 "frameworks/native/include/media/openmax",
121 ],
Vijay Venkatraman9b2049e2017-06-08 13:49:20 -0700122 export_include_dirs: [
123 "include",
124 "include/camera"
125 ],
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -0800126 export_shared_lib_headers: ["libcamera_metadata", "libnativewindow", "libgui"],
Dan Willemsene7cb7812017-04-19 19:23:50 -0700127
128 cflags: [
129 "-Werror",
130 "-Wall",
131 "-Wextra",
132 ],
Mark Urbanusa096aba2017-06-02 12:19:05 -0700133
Dan Willemsene7cb7812017-04-19 19:23:50 -0700134}
Colin Cross6bf135b2017-11-14 13:05:37 -0800135
Austin Borger6db81852021-12-08 20:51:54 +0000136cc_library_host_static {
137 name: "libcamera_client_host",
138
139 srcs: [
140 "CameraMetadata.cpp",
141 "VendorTagDescriptor.cpp",
142 ],
143
144 shared_libs: [
145 "libbase",
146 "libcamera_metadata",
147 ],
148
149 include_dirs: [
150 "system/media/private/camera/include",
151 "frameworks/native/include/media/openmax",
152 ],
153
154 export_include_dirs: [
155 "include",
156 "include/camera"
157 ],
158}
159
Colin Cross6bf135b2017-11-14 13:05:37 -0800160// AIDL interface between camera clients and the camera service.
161filegroup {
162 name: "libcamera_client_aidl",
163 srcs: [
Avichal Rakesh6e57a2b2023-05-01 17:53:37 -0700164 "aidl/android/hardware/CameraExtensionSessionStats.aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800165 "aidl/android/hardware/ICameraService.aidl",
malikakash73125c62023-07-21 22:44:34 +0000166 "aidl/android/hardware/CameraIdRemapping.aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800167 "aidl/android/hardware/ICameraServiceListener.aidl",
168 "aidl/android/hardware/ICameraServiceProxy.aidl",
169 "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl",
170 "aidl/android/hardware/camera2/ICameraDeviceUser.aidl",
Cliff Wud8cae102021-03-11 01:37:42 +0800171 "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl",
172 "aidl/android/hardware/camera2/ICameraInjectionSession.aidl",
Avichal Rakesh6e57a2b2023-05-01 17:53:37 -0700173 "aidl/android/hardware/camera2/ICameraOfflineSession.aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800174 ],
Dan Willemsenfaeab0f2018-09-14 21:17:46 -0700175 path: "aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800176}
177
178// Extra AIDL files that are used by framework.jar but not libcamera_client
179// because they have hand-written native implementations.
180filegroup {
181 name: "libcamera_client_framework_aidl",
182 srcs: [
183 "aidl/android/hardware/ICamera.aidl",
184 "aidl/android/hardware/ICameraClient.aidl",
185 ],
Dan Willemsenfaeab0f2018-09-14 21:17:46 -0700186 path: "aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800187}