blob: 275e1312d8b4ca93898ef28cb84d02a72f50e9e9 [file] [log] [blame]
Dan Albertd7973ba2016-09-14 12:35:50 -07001// Copyright (C) 2016 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// Headers module is in frameworks/av/Android.bp because modules are not allowed
16// to refer to headers in parent directories and the headers live in
17// frameworks/av/include.
18
Bob Badour56786ac2021-02-25 15:24:36 -080019package {
Ronish Kaliab5dd44b2024-02-14 14:32:32 +000020 default_team: "trendy_team_camera_framework",
Bob Badour56786ac2021-02-25 15:24:36 -080021 default_applicable_licenses: ["frameworks_av_camera_ndk_license"],
22}
23
24// Added automatically by a large-scale-change that took the approach of
25// 'apply every license found to every target'. While this makes sure we respect
26// every license restriction, it may not be entirely correct.
27//
28// e.g. GPL in an MIT project might only apply to the contrib/ directory.
29//
30// Please consider splitting the single license below into multiple licenses,
31// taking care not to lose any license_kind information, and overriding the
32// default license using the 'licenses: [...]' property on targets as needed.
33//
34// For unused files, consider creating a 'fileGroup' with "//visibility:private"
35// to attach the license to, and including a comment whether the files may be
36// used in the current project.
37// See: http://go/android-license-faq
38license {
39 name: "frameworks_av_camera_ndk_license",
40 visibility: [":__subpackages__"],
41 license_kinds: [
42 "SPDX-license-identifier-Apache-2.0",
43 "SPDX-license-identifier-MIT",
44 "SPDX-license-identifier-Unicode-DFS",
45 ],
46 license_text: [
47 "NOTICE",
48 ],
49}
50
Dan Albertd7973ba2016-09-14 12:35:50 -070051ndk_library {
Dan Willemsen2c885592017-04-07 15:48:32 -070052 name: "libcamera2ndk",
Dan Albertd7973ba2016-09-14 12:35:50 -070053 symbol_file: "libcamera2ndk.map.txt",
54 first_version: "24",
Dan Albert1714f2e2017-01-05 16:00:15 -080055 unversioned_until: "current",
Dan Albertd7973ba2016-09-14 12:35:50 -070056}
Colin Cross7e8d4ba2017-05-04 16:17:42 -070057
58ndk_headers {
59 name: "libcamera2ndk_headers",
60 from: "include/camera",
61 to: "camera",
62 srcs: ["include/camera/**/*.h"],
63 license: "NOTICE",
64}
Zachary Iqbal096ab362018-10-17 11:02:59 -070065
66cc_library_shared {
dimitryd7e265b2018-11-07 17:12:15 +010067 name: "libcamera2ndk",
Zachary Iqbal096ab362018-10-17 11:02:59 -070068 srcs: [
Austin Borgeraf8d5d42024-06-11 16:21:11 -070069 "NdkCameraCaptureSession.cpp",
70 "NdkCameraDevice.cpp",
Zachary Iqbal096ab362018-10-17 11:02:59 -070071 "NdkCameraManager.cpp",
72 "NdkCameraMetadata.cpp",
Zachary Iqbal096ab362018-10-17 11:02:59 -070073 "NdkCaptureRequest.cpp",
Austin Borgeraf8d5d42024-06-11 16:21:11 -070074 "impl/ACameraCaptureSession.cpp",
75 "impl/ACameraDevice.cpp",
Zachary Iqbal096ab362018-10-17 11:02:59 -070076 "impl/ACameraManager.cpp",
77 "impl/ACameraMetadata.cpp",
Zachary Iqbal096ab362018-10-17 11:02:59 -070078 ],
79 shared_libs: [
Jan Sebechlebsky952e3c42024-04-05 13:13:11 +020080 "android.companion.virtual.virtualdevice_aidl-cpp",
Jayant Chowdharydcae7962024-08-20 21:20:10 +000081 "android.hardware.common-V2-cpp",
82 "android.hardware.common.fmq-V1-cpp",
Jyoti Bhayana1f9600b2024-10-29 20:25:32 -070083 "camera_platform_flags_c_lib",
Austin Borger65e64642024-06-11 15:58:23 -070084 "framework-permission-aidl-cpp",
Zachary Iqbal096ab362018-10-17 11:02:59 -070085 "libandroid_runtime",
Austin Borgeraf8d5d42024-06-11 16:21:11 -070086 "libbinder",
Zachary Iqbal096ab362018-10-17 11:02:59 -070087 "libcamera_client",
Zachary Iqbal096ab362018-10-17 11:02:59 -070088 "libcamera_metadata",
Austin Borgeraf8d5d42024-06-11 16:21:11 -070089 "libcutils",
Jayant Chowdharydcae7962024-08-20 21:20:10 +000090 "libfmq",
Austin Borgeraf8d5d42024-06-11 16:21:11 -070091 "libgui",
92 "liblog",
Zachary Iqbal096ab362018-10-17 11:02:59 -070093 "libmediandk",
94 "libnativewindow",
Austin Borgeraf8d5d42024-06-11 16:21:11 -070095 "libstagefright_foundation",
96 "libutils",
Zachary Iqbal096ab362018-10-17 11:02:59 -070097 ],
Jiawen Chen9f713e82020-01-15 11:06:13 -050098 header_libs: [
99 "jni_headers",
100 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -0700101 cflags: [
Jayant Chowdhary8e798a82021-01-29 09:45:47 -0800102 "-DEXPORT=__attribute__((visibility(\"default\")))",
Zachary Iqbal096ab362018-10-17 11:02:59 -0700103 "-Wall",
Zachary Iqbal096ab362018-10-17 11:02:59 -0700104 "-Werror",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700105 "-Wextra",
106 "-fvisibility=hidden",
Zachary Iqbal096ab362018-10-17 11:02:59 -0700107 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700108 // TODO: jchowdhary@, use header_libs instead b/131165718
109 include_dirs: [
110 "system/media/private/camera/include",
111 ],
Zachary Iqbal096ab362018-10-17 11:02:59 -0700112 export_include_dirs: ["include"],
113 export_shared_lib_headers: [
114 "libnativewindow",
dimitry99d67ef2018-11-07 17:09:11 +0100115 ],
116 version_script: "libcamera2ndk.map.txt",
Zachary Iqbal096ab362018-10-17 11:02:59 -0700117}
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800118
119cc_library_shared {
120 name: "libcamera2ndk_vendor",
Zhijun He7c856a22019-05-13 13:43:26 -0700121 vendor: true,
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800122 srcs: [
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700123 "NdkCameraCaptureSession.cpp",
124 "NdkCameraDevice.cpp",
125 "NdkCameraManager.cpp",
126 "NdkCameraMetadata.cpp",
127 "NdkCaptureRequest.cpp",
128 "impl/ACameraCaptureSession.cpp",
129 "impl/ACameraMetadata.cpp",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800130 "ndk_vendor/impl/ACameraDevice.cpp",
131 "ndk_vendor/impl/ACameraManager.cpp",
132 "ndk_vendor/impl/utils.cpp",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800133 ],
134
135 export_include_dirs: ["include"],
136 export_shared_lib_headers: [
137 "libcutils",
138 ],
139 local_include_dirs: [
140 ".",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800141 "impl",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700142 "include",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800143 ],
144 cflags: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800145 "-DEXPORT=__attribute__((visibility(\"default\")))",
146 "-D__ANDROID_VNDK__",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700147 "-fvisibility=hidden",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800148 ],
149
150 shared_libs: [
Avichal Rakeshf099b232022-10-27 15:44:50 -0700151 "android.frameworks.cameraservice.common-V1-ndk",
Jyoti Bhayana1f9600b2024-10-29 20:25:32 -0700152 "android.frameworks.cameraservice.device-V3-ndk",
153 "android.frameworks.cameraservice.service-V3-ndk",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700154 "libbinder_ndk",
155 "libcamera_metadata",
156 "libcutils",
157 "libfmq",
158 "libhardware",
159 "libhidlbase",
160 "liblog",
161 "libmediandk",
162 "libnativewindow",
163 "libstagefright_foundation",
164 "libutils",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800165 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800166 static_libs: [
167 "android.hardware.camera.common@1.0-helper",
Avichal Rakeshf099b232022-10-27 15:44:50 -0700168 "libaidlcommonsupport",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800169 "libarect",
170 ],
Jayant Chowdharyb16194d2019-04-19 16:04:01 -0700171 // TODO: jchowdhary@, use header_libs instead b/131165718
172 include_dirs: [
173 "system/media/private/camera/include",
174 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800175}
176
177cc_test {
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800178 name: "ACameraNdkVendorTest",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800179 vendor: true,
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800180 srcs: [
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800181 "ndk_vendor/tests/ACameraManagerTest.cpp",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700182 "ndk_vendor/tests/AImageReaderVendorTest.cpp",
Shuzhen Wang4fa28d22020-01-23 15:57:25 -0800183 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800184 shared_libs: [
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800185 "libcamera2ndk_vendor",
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800186 "libcamera_metadata",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700187 "libcutils",
Devin Moore5f866622023-06-05 22:25:40 +0000188 "libhidlbase",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700189 "liblog",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800190 "libmediandk",
191 "libnativewindow",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800192 "libui",
Austin Borgeraf8d5d42024-06-11 16:21:11 -0700193 "libutils",
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800194 ],
Jayant Chowdhary9401b552019-01-07 16:20:28 -0800195 static_libs: [
196 "android.hardware.camera.common@1.0-helper",
197 ],
Jayant Chowdhary6df26072018-11-06 23:55:12 -0800198 cflags: [
199 "-D__ANDROID_VNDK__",
200 ],
201}