blob: 2c01496734f10a7eed80f47cebd969379a9c9f7b [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 Badourc8375042021-02-12 21:02:31 -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
Dan Willemsene7cb7812017-04-19 19:23:50 -070046cc_library_shared {
47 name: "libcamera_client",
48
49 aidl: {
50 export_aidl_headers: true,
51 local_include_dirs: ["aidl"],
52 include_dirs: [
Dan Willemsene7cb7812017-04-19 19:23:50 -070053 "frameworks/native/aidl/gui",
54 ],
55 },
56
57 srcs: [
58 // AIDL files for camera interfaces
59 // The headers for these interfaces will be available to any modules that
60 // include libcamera_client, at the path "aidl/package/path/BnFoo.h"
Colin Cross6bf135b2017-11-14 13:05:37 -080061 ":libcamera_client_aidl",
Eino-Ville Talvalae8c96c72017-06-27 12:24:07 -070062
Dan Willemsene7cb7812017-04-19 19:23:50 -070063 // Source for camera interface parcelables, and manually-written interfaces
64 "Camera.cpp",
65 "CameraMetadata.cpp",
66 "CameraParameters.cpp",
67 "CaptureResult.cpp",
68 "CameraParameters2.cpp",
Shuzhen Wang316781a2020-08-18 18:11:01 -070069 "CameraSessionStats.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070070 "ICamera.cpp",
71 "ICameraClient.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070072 "ICameraRecordingProxy.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070073 "camera2/CaptureRequest.cpp",
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -080074 "camera2/ConcurrentCamera.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070075 "camera2/OutputConfiguration.cpp",
Emilian Peev35ae8262018-11-08 13:11:32 +000076 "camera2/SessionConfiguration.cpp",
Dan Willemsene7cb7812017-04-19 19:23:50 -070077 "camera2/SubmitInfo.cpp",
78 "CameraBase.cpp",
79 "CameraUtils.cpp",
80 "VendorTagDescriptor.cpp",
81 ],
82
83 shared_libs: [
Jayant Chowdharyef30c3b2021-02-22 22:47:39 +000084 "libbase",
Dan Willemsene7cb7812017-04-19 19:23:50 -070085 "libcutils",
86 "libutils",
87 "liblog",
88 "libbinder",
89 "libgui",
90 "libcamera_metadata",
Mathias Agopiandefb1b02017-04-27 22:40:10 -070091 "libnativewindow",
Dan Willemsene7cb7812017-04-19 19:23:50 -070092 ],
93
94 include_dirs: [
95 "system/media/private/camera/include",
96 "frameworks/native/include/media/openmax",
97 ],
Vijay Venkatraman9b2049e2017-06-08 13:49:20 -070098 export_include_dirs: [
99 "include",
100 "include/camera"
101 ],
Jayant Chowdhary2bbdce42020-01-12 14:55:41 -0800102 export_shared_lib_headers: ["libcamera_metadata", "libnativewindow", "libgui"],
Dan Willemsene7cb7812017-04-19 19:23:50 -0700103
104 cflags: [
105 "-Werror",
106 "-Wall",
107 "-Wextra",
108 ],
Mark Urbanusa096aba2017-06-02 12:19:05 -0700109
Dan Willemsene7cb7812017-04-19 19:23:50 -0700110}
Colin Cross6bf135b2017-11-14 13:05:37 -0800111
112// AIDL interface between camera clients and the camera service.
113filegroup {
114 name: "libcamera_client_aidl",
115 srcs: [
116 "aidl/android/hardware/ICameraService.aidl",
117 "aidl/android/hardware/ICameraServiceListener.aidl",
118 "aidl/android/hardware/ICameraServiceProxy.aidl",
119 "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl",
120 "aidl/android/hardware/camera2/ICameraDeviceUser.aidl",
Yin-Chia Yehb978c382019-10-30 00:22:37 -0700121 "aidl/android/hardware/camera2/ICameraOfflineSession.aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800122 ],
Dan Willemsenfaeab0f2018-09-14 21:17:46 -0700123 path: "aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800124}
125
126// Extra AIDL files that are used by framework.jar but not libcamera_client
127// because they have hand-written native implementations.
128filegroup {
129 name: "libcamera_client_framework_aidl",
130 srcs: [
131 "aidl/android/hardware/ICamera.aidl",
132 "aidl/android/hardware/ICameraClient.aidl",
133 ],
Dan Willemsenfaeab0f2018-09-14 21:17:46 -0700134 path: "aidl",
Colin Cross6bf135b2017-11-14 13:05:37 -0800135}