blob: ba252268fac0224a12eef162ea8e5fe5eee2820d [file] [log] [blame]
Bob Badour56786ac2021-02-25 15:24:36 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_av_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_av_license"],
8}
9
Pawin Vongmasa36653902018-11-15 00:10:25 -080010cc_library_headers {
Pawin Vongmasad0f0e142018-11-15 03:36:28 -080011 name: "libcodec2_internal",
Pawin Vongmasa36653902018-11-15 00:10:25 -080012
13 export_include_dirs: [
14 "internal",
15 ],
16
17 // TODO: Remove this when this module is moved back to frameworks/av.
18 vendor_available: true,
Jooyung Hane3cf41a2020-04-30 04:22:22 +090019
20 min_sdk_version: "29",
Ray Essickef519d72022-01-30 19:34:35 -080021 apex_available: [
22 "//apex_available:platform",
23 "com.android.media.swcodec",
24 ],
25
26}
27
28cc_library_headers {
29 name: "libcodec2_vndk_headers",
30 vendor_available: true,
31 min_sdk_version: "29",
32
33 export_include_dirs: [
34 "include",
35 ],
36 apex_available: [
37 "//apex_available:platform",
38 "com.android.media.swcodec",
39 ],
Pawin Vongmasa36653902018-11-15 00:10:25 -080040}
41
42// !!!DO NOT DEPEND ON THIS SHARED LIBRARY DIRECTLY!!!
Pawin Vongmasad0f0e142018-11-15 03:36:28 -080043// use libcodec2-impl-defaults instead
S Vasudev Prasad5e525282020-11-23 12:15:40 +053044cc_library {
Pawin Vongmasad0f0e142018-11-15 03:36:28 -080045 name: "libcodec2_vndk",
Pawin Vongmasa36653902018-11-15 00:10:25 -080046 vendor_available: true,
Jooyung Hane3cf41a2020-04-30 04:22:22 +090047 min_sdk_version: "29",
Wonsik Kim155d5cb2019-10-09 12:49:49 -070048 // TODO: b/147147883
49 double_loadable: true,
Ray Essickef519d72022-01-30 19:34:35 -080050 apex_available: [
51 "//apex_available:platform",
52 "com.android.media.swcodec",
53 ],
54
Pawin Vongmasa36653902018-11-15 00:10:25 -080055
56 srcs: [
Pin-chih Linf72774b2019-11-19 18:26:47 +080057 "C2AllocatorBlob.cpp",
Pawin Vongmasa36653902018-11-15 00:10:25 -080058 "C2AllocatorIon.cpp",
59 "C2AllocatorGralloc.cpp",
60 "C2Buffer.cpp",
61 "C2Config.cpp",
John Stultz6a407882020-07-11 04:34:19 +000062 "C2DmaBufAllocator.cpp",
Sungtak Leefce527c2021-03-20 01:24:41 -070063 "C2Fence.cpp",
Pawin Vongmasa36653902018-11-15 00:10:25 -080064 "C2PlatformStorePluginLoader.cpp",
65 "C2Store.cpp",
66 "platform/C2BqBuffer.cpp",
Sungtak Leefce527c2021-03-20 01:24:41 -070067 "platform/C2SurfaceSyncObj.cpp",
Chong Zhangc8ce1d82019-03-27 10:18:38 -070068 "types.cpp",
Pawin Vongmasa36653902018-11-15 00:10:25 -080069 "util/C2Debug.cpp",
70 "util/C2InterfaceHelper.cpp",
71 "util/C2InterfaceUtils.cpp",
72 "util/C2ParamUtils.cpp",
73 ],
74
75 export_include_dirs: [
76 "include",
77 ],
78
79 export_shared_lib_headers: [
80 "libbase",
Sungtak Lee0d6979c2022-03-25 16:36:01 -070081 "libdmabufheap",
Sungtak Leed3318082018-09-07 15:52:43 -070082 "android.hardware.media.bufferpool@2.0",
Sungtak Lee92573a22022-12-10 05:48:38 +000083 "android.hardware.media.bufferpool2-V1-ndk",
Pawin Vongmasa36653902018-11-15 00:10:25 -080084 ],
85
86 local_include_dirs: [
87 "internal",
88 ],
89
Pawin Vongmasacc1b4762018-11-26 00:46:29 -080090 header_libs: [
91 "media_plugin_headers",
92 "libcodec2_headers",
Pawin Vongmasa36653902018-11-15 00:10:25 -080093 ],
94
95 shared_libs: [
Pawin Vongmasaef939bf2019-03-03 04:44:59 -080096 "android.hardware.graphics.bufferqueue@2.0",
Marissa Wall2a24a302019-11-25 11:19:18 -080097 "android.hardware.graphics.common@1.2",
Sungtak Lee92573a22022-12-10 05:48:38 +000098 "android.hardware.common-V2-ndk",
99 "android.hardware.common.fmq-V1-ndk",
Sungtak Leed3318082018-09-07 15:52:43 -0700100 "android.hardware.media.bufferpool@2.0",
Sungtak Lee92573a22022-12-10 05:48:38 +0000101 "android.hardware.media.bufferpool2-V1-ndk",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800102 "libbase",
Sungtak Lee92573a22022-12-10 05:48:38 +0000103 "libbinder_ndk",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800104 "libcutils",
105 "libdl",
Praveen Chavan34493f12021-02-18 00:51:50 -0800106 "libdmabufheap",
107 "libfmq",
108 "libgralloctypes",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800109 "libhidlbase",
110 "libion",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800111 "liblog",
Chong Zhangc8ce1d82019-03-27 10:18:38 -0700112 "libnativewindow",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800113 "libstagefright_foundation",
Pawin Vongmasa329ac9c2019-09-09 21:28:05 -0700114 "libstagefright_bufferpool@2.0.1",
Sungtak Lee92573a22022-12-10 05:48:38 +0000115 "libstagefright_aidl_bufferpool2",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800116 "libui",
117 "libutils",
118 ],
119
120 cflags: [
121 "-Werror",
122 "-Wall",
123 ],
124}
125
Lajos Molnar99d4d112022-01-28 12:42:05 -0800126// public dependency for statically linking to libcodec2_vndk for unit tests
127cc_defaults {
128 name: "libcodec2-static-defaults",
129
130 static_libs: [
131 "liblog",
132 "libion",
133 "libfmq",
134 "libbase",
135 "libutils",
136 "libcutils",
137 "libcodec2",
138 "libhidlbase",
139 "libdmabufheap",
140 "libcodec2_vndk",
141 "libnativewindow",
142 "libcodec2_soft_common",
143 "libsfplugin_ccodec_utils",
Sungtak Lee92573a22022-12-10 05:48:38 +0000144 "libstagefright_aidl_bufferpool2",
Lajos Molnar99d4d112022-01-28 12:42:05 -0800145 "libstagefright_foundation",
146 "libstagefright_bufferpool@2.0.1",
147 "libgralloctypes",
148 "android.hardware.graphics.mapper@2.0",
149 "android.hardware.graphics.mapper@3.0",
150 "android.hardware.media.bufferpool@2.0",
151 "android.hardware.graphics.allocator@2.0",
152 "android.hardware.graphics.allocator@3.0",
153 "android.hardware.graphics.bufferqueue@2.0",
Sungtak Lee92573a22022-12-10 05:48:38 +0000154 "android.hardware.common-V2-ndk",
155 "android.hardware.common.fmq-V1-ndk",
156 "android.hardware.media.bufferpool2-V1-ndk",
Lajos Molnar99d4d112022-01-28 12:42:05 -0800157 ],
158
159 shared_libs: [
Sungtak Lee92573a22022-12-10 05:48:38 +0000160 "libbinder_ndk",
Lajos Molnar99d4d112022-01-28 12:42:05 -0800161 "libui",
162 "libdl",
Lajos Molnar99d4d112022-01-28 12:42:05 -0800163 "libvndksupport",
164 "libprocessgroup",
165 ],
166}
167
Pawin Vongmasa36653902018-11-15 00:10:25 -0800168// public dependency for implementing Codec 2 components
169cc_defaults {
Pawin Vongmasad0f0e142018-11-15 03:36:28 -0800170 name: "libcodec2-impl-defaults",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800171
172 shared_libs: [
173 "libbase", // for C2_LOG
174 "liblog", // for ALOG
Pawin Vongmasad0f0e142018-11-15 03:36:28 -0800175 "libcodec2",
176 "libcodec2_vndk",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800177 "libutils",
178 ],
Jooyung Hane3cf41a2020-04-30 04:22:22 +0900179
180 min_sdk_version: "29",
Pawin Vongmasa36653902018-11-15 00:10:25 -0800181}
182
183// public dependency for implementing Codec 2 framework utilities
184// THIS IS ONLY FOR FRAMEWORK USE ONLY
185cc_defaults {
Pawin Vongmasad0f0e142018-11-15 03:36:28 -0800186 name: "libcodec2-internal-defaults",
187 defaults: ["libcodec2-impl-defaults"],
Pawin Vongmasa36653902018-11-15 00:10:25 -0800188
Wonsik Kim8f9e90a2020-02-25 14:40:18 -0800189 header_libs: [
190 "libcodec2_internal",
191 ],
192
Pawin Vongmasa36653902018-11-15 00:10:25 -0800193 shared_libs: [
194 "libcutils", // for properties
195 ],
196
197 // TODO: separate internal headers so they can be exposed here
198}