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 | |
Trevor Radcliffe | de1d317 | 2021-10-20 20:04:25 +0000 | [diff] [blame^] | 46 | cc_library_headers { |
| 47 | name: "camera_headers", |
| 48 | export_include_dirs: ["include"], |
| 49 | } |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 50 | cc_library_shared { |
| 51 | name: "libcamera_client", |
| 52 | |
| 53 | aidl: { |
| 54 | export_aidl_headers: true, |
| 55 | local_include_dirs: ["aidl"], |
| 56 | include_dirs: [ |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 57 | "frameworks/native/aidl/gui", |
| 58 | ], |
| 59 | }, |
| 60 | |
| 61 | srcs: [ |
| 62 | // AIDL files for camera interfaces |
| 63 | // The headers for these interfaces will be available to any modules that |
| 64 | // include libcamera_client, at the path "aidl/package/path/BnFoo.h" |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 65 | ":libcamera_client_aidl", |
Eino-Ville Talvala | e8c96c7 | 2017-06-27 12:24:07 -0700 | [diff] [blame] | 66 | |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 67 | // Source for camera interface parcelables, and manually-written interfaces |
| 68 | "Camera.cpp", |
| 69 | "CameraMetadata.cpp", |
| 70 | "CameraParameters.cpp", |
| 71 | "CaptureResult.cpp", |
| 72 | "CameraParameters2.cpp", |
Shuzhen Wang | 316781a | 2020-08-18 18:11:01 -0700 | [diff] [blame] | 73 | "CameraSessionStats.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 74 | "ICamera.cpp", |
| 75 | "ICameraClient.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 76 | "ICameraRecordingProxy.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 77 | "camera2/CaptureRequest.cpp", |
Jayant Chowdhary | 2bbdce4 | 2020-01-12 14:55:41 -0800 | [diff] [blame] | 78 | "camera2/ConcurrentCamera.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 79 | "camera2/OutputConfiguration.cpp", |
Emilian Peev | 35ae826 | 2018-11-08 13:11:32 +0000 | [diff] [blame] | 80 | "camera2/SessionConfiguration.cpp", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 81 | "camera2/SubmitInfo.cpp", |
| 82 | "CameraBase.cpp", |
| 83 | "CameraUtils.cpp", |
| 84 | "VendorTagDescriptor.cpp", |
| 85 | ], |
| 86 | |
| 87 | shared_libs: [ |
Jayant Chowdhary | ef30c3b | 2021-02-22 22:47:39 +0000 | [diff] [blame] | 88 | "libbase", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 89 | "libcutils", |
| 90 | "libutils", |
| 91 | "liblog", |
| 92 | "libbinder", |
| 93 | "libgui", |
| 94 | "libcamera_metadata", |
Mathias Agopian | defb1b0 | 2017-04-27 22:40:10 -0700 | [diff] [blame] | 95 | "libnativewindow", |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 96 | ], |
| 97 | |
| 98 | include_dirs: [ |
| 99 | "system/media/private/camera/include", |
| 100 | "frameworks/native/include/media/openmax", |
| 101 | ], |
Vijay Venkatraman | 9b2049e | 2017-06-08 13:49:20 -0700 | [diff] [blame] | 102 | export_include_dirs: [ |
| 103 | "include", |
| 104 | "include/camera" |
| 105 | ], |
Jayant Chowdhary | 2bbdce4 | 2020-01-12 14:55:41 -0800 | [diff] [blame] | 106 | export_shared_lib_headers: ["libcamera_metadata", "libnativewindow", "libgui"], |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 107 | |
| 108 | cflags: [ |
| 109 | "-Werror", |
| 110 | "-Wall", |
| 111 | "-Wextra", |
| 112 | ], |
Mark Urbanus | a096aba | 2017-06-02 12:19:05 -0700 | [diff] [blame] | 113 | |
Dan Willemsen | e7cb781 | 2017-04-19 19:23:50 -0700 | [diff] [blame] | 114 | } |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 115 | |
| 116 | // AIDL interface between camera clients and the camera service. |
| 117 | filegroup { |
| 118 | name: "libcamera_client_aidl", |
| 119 | srcs: [ |
| 120 | "aidl/android/hardware/ICameraService.aidl", |
| 121 | "aidl/android/hardware/ICameraServiceListener.aidl", |
| 122 | "aidl/android/hardware/ICameraServiceProxy.aidl", |
| 123 | "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl", |
| 124 | "aidl/android/hardware/camera2/ICameraDeviceUser.aidl", |
Yin-Chia Yeh | b978c38 | 2019-10-30 00:22:37 -0700 | [diff] [blame] | 125 | "aidl/android/hardware/camera2/ICameraOfflineSession.aidl", |
Cliff Wu | d8cae10 | 2021-03-11 01:37:42 +0800 | [diff] [blame] | 126 | "aidl/android/hardware/camera2/ICameraInjectionCallback.aidl", |
| 127 | "aidl/android/hardware/camera2/ICameraInjectionSession.aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 128 | ], |
Dan Willemsen | faeab0f | 2018-09-14 21:17:46 -0700 | [diff] [blame] | 129 | path: "aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | // Extra AIDL files that are used by framework.jar but not libcamera_client |
| 133 | // because they have hand-written native implementations. |
| 134 | filegroup { |
| 135 | name: "libcamera_client_framework_aidl", |
| 136 | srcs: [ |
| 137 | "aidl/android/hardware/ICamera.aidl", |
| 138 | "aidl/android/hardware/ICameraClient.aidl", |
| 139 | ], |
Dan Willemsen | faeab0f | 2018-09-14 21:17:46 -0700 | [diff] [blame] | 140 | path: "aidl", |
Colin Cross | 6bf135b | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 141 | } |