Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 1 | // 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 Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 15 | package { |
| 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 |
| 33 | license { |
| 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 Talvala | ae70f8c | 2023-08-18 10:10:55 -0700 | [diff] [blame] | 46 | aconfig_declarations { |
| 47 | name: "camera_platform_flags", |
| 48 | package: "com.android.internal.camera.flags", |
| 49 | srcs: ["camera_platform.aconfig"], |
| 50 | } |
| 51 | |
| 52 | cc_aconfig_library { |
| 53 | name: "camera_platform_flags_c_lib", |
| 54 | aconfig_declarations: "camera_platform_flags", |
Emilian Peev | c102159 | 2023-11-22 00:59:48 +0000 | [diff] [blame^] | 55 | host_supported: true, |
Eino-Ville Talvala | ae70f8c | 2023-08-18 10:10:55 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | java_aconfig_library { |
| 59 | name: "camera_platform_flags_java_lib", |
| 60 | aconfig_declarations: "camera_platform_flags", |
| 61 | } |
| 62 | |
Trevor Radcliffe | de1d317 | 2021-10-20 20:04:25 +0000 | [diff] [blame] | 63 | cc_library_headers { |
| 64 | name: "camera_headers", |
| 65 | export_include_dirs: ["include"], |
| 66 | } |
Aditya Wazir | c10fe69 | 2021-07-28 17:56:21 +0530 | [diff] [blame] | 67 | cc_library { |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 68 | name: "libcamera_client", |
| 69 | |
| 70 | aidl: { |
| 71 | export_aidl_headers: true, |
| 72 | local_include_dirs: ["aidl"], |
| 73 | include_dirs: [ |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 74 | "frameworks/native/aidl/gui", |
| 75 | ], |
| 76 | }, |
| 77 | |
| 78 | srcs: [ |
| 79 | // AIDL files for camera interfaces |
| 80 | // The headers for these interfaces will be available to any modules that |
| 81 | // include libcamera_client, at the path "aidl/package/path/BnFoo.h" |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 82 | ":libcamera_client_aidl", |
Eino-Ville Talvala | e8c96c7 | 2017-06-27 12:24:07 -0700 | [diff] [blame] | 83 | |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 84 | // Source for camera interface parcelables, and manually-written interfaces |
| 85 | "Camera.cpp", |
| 86 | "CameraMetadata.cpp", |
| 87 | "CameraParameters.cpp", |
| 88 | "CaptureResult.cpp", |
| 89 | "CameraParameters2.cpp", |
Shuzhen Wang | 316781a | 2020-08-18 18:11:01 -0700 | [diff] [blame] | 90 | "CameraSessionStats.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 91 | "ICamera.cpp", |
| 92 | "ICameraClient.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 93 | "ICameraRecordingProxy.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 94 | "camera2/CaptureRequest.cpp", |
Jayant Chowdhary | 2bbdce4 | 2020-01-12 14:55:41 -0800 | [diff] [blame] | 95 | "camera2/ConcurrentCamera.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 96 | "camera2/OutputConfiguration.cpp", |
Emilian Peev | 35ae826 | 2018-11-08 13:11:32 +0000 | [diff] [blame] | 97 | "camera2/SessionConfiguration.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 98 | "camera2/SubmitInfo.cpp", |
| 99 | "CameraBase.cpp", |
| 100 | "CameraUtils.cpp", |
| 101 | "VendorTagDescriptor.cpp", |
| 102 | ], |
| 103 | |
| 104 | shared_libs: [ |
Eino-Ville Talvala | 6f1a9c1 | 2023-09-14 17:26:28 -0700 | [diff] [blame] | 105 | "camera_platform_flags_c_lib", |
Jayant Chowdhary | ef30c3b | 2021-02-22 22:47:39 +0000 | [diff] [blame] | 106 | "libbase", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 107 | "libcutils", |
| 108 | "libutils", |
| 109 | "liblog", |
| 110 | "libbinder", |
| 111 | "libgui", |
| 112 | "libcamera_metadata", |
Mathias Agopian | defb1b0 | 2017-04-27 22:40:10 -0700 | [diff] [blame] | 113 | "libnativewindow", |
Austin Borger | 18b30a7 | 2022-10-27 12:20:29 -0700 | [diff] [blame] | 114 | "lib-platform-compat-native-api", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 115 | ], |
| 116 | |
| 117 | include_dirs: [ |
| 118 | "system/media/private/camera/include", |
| 119 | "frameworks/native/include/media/openmax", |
| 120 | ], |
Vijay Venkatraman | 9b2049e | 2017-06-08 13:49:20 -0700 | [diff] [blame] | 121 | export_include_dirs: [ |
| 122 | "include", |
| 123 | "include/camera" |
| 124 | ], |
Jayant Chowdhary | 2bbdce4 | 2020-01-12 14:55:41 -0800 | [diff] [blame] | 125 | export_shared_lib_headers: ["libcamera_metadata", "libnativewindow", "libgui"], |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 126 | |
| 127 | cflags: [ |
| 128 | "-Werror", |
| 129 | "-Wall", |
| 130 | "-Wextra", |
| 131 | ], |
Mark Urbanus | a096aba | 2017-06-02 12:19:05 -0700 | [diff] [blame] | 132 | |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 133 | } |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 134 | |
Austin Borger | 6db8185 | 2021-12-08 20:51:54 +0000 | [diff] [blame] | 135 | cc_library_host_static { |
| 136 | name: "libcamera_client_host", |
| 137 | |
| 138 | srcs: [ |
| 139 | "CameraMetadata.cpp", |
| 140 | "VendorTagDescriptor.cpp", |
| 141 | ], |
| 142 | |
| 143 | shared_libs: [ |
| 144 | "libbase", |
| 145 | "libcamera_metadata", |
| 146 | ], |
| 147 | |
| 148 | include_dirs: [ |
| 149 | "system/media/private/camera/include", |
| 150 | "frameworks/native/include/media/openmax", |
| 151 | ], |
| 152 | |
| 153 | export_include_dirs: [ |
| 154 | "include", |
| 155 | "include/camera" |
| 156 | ], |
| 157 | } |
| 158 | |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 159 | // AIDL interface between camera clients and the camera service. |
| 160 | filegroup { |
| 161 | name: "libcamera_client_aidl", |
| 162 | srcs: [ |
Avichal Rakesh | 6e57a2b | 2023-05-01 17:53:37 -0700 | [diff] [blame] | 163 | "aidl/android/hardware/CameraExtensionSessionStats.aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 164 | "aidl/android/hardware/ICameraService.aidl", |
malikakash | 73125c6 | 2023-07-21 22:44:34 +0000 | [diff] [blame] | 165 | "aidl/android/hardware/CameraIdRemapping.aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 166 | "aidl/android/hardware/ICameraServiceListener.aidl", |
| 167 | "aidl/android/hardware/ICameraServiceProxy.aidl", |
| 168 | "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl", |
| 169 | "aidl/android/hardware/camera2/ICameraDeviceUser.aidl", |
Cliff Wu | d8cae10 | 2021-03-11 01:37:42 +0800 | [diff] [blame] | 170 | "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl", |
| 171 | "aidl/android/hardware/camera2/ICameraInjectionSession.aidl", |
Avichal Rakesh | 6e57a2b | 2023-05-01 17:53:37 -0700 | [diff] [blame] | 172 | "aidl/android/hardware/camera2/ICameraOfflineSession.aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 173 | ], |
Dan Willemsen | faeab0f | 2018-09-14 21:17:46 -0700 | [diff] [blame] | 174 | path: "aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | // Extra AIDL files that are used by framework.jar but not libcamera_client |
| 178 | // because they have hand-written native implementations. |
| 179 | filegroup { |
| 180 | name: "libcamera_client_framework_aidl", |
| 181 | srcs: [ |
| 182 | "aidl/android/hardware/ICamera.aidl", |
| 183 | "aidl/android/hardware/ICameraClient.aidl", |
| 184 | ], |
Dan Willemsen | faeab0f | 2018-09-14 21:17:46 -0700 | [diff] [blame] | 185 | path: "aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 186 | } |