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