Dan Albert | 2975a24 | 2016-09-23 16:17:45 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 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 | |
| 15 | // Headers module is in frameworks/av/Android.bp because modules are not allowed |
| 16 | // to refer to headers in parent directories and the headers live in |
| 17 | // frameworks/av/include. |
| 18 | |
| 19 | ndk_library { |
Dan Willemsen | 2c88559 | 2017-04-07 15:48:32 -0700 | [diff] [blame] | 20 | name: "libmediandk", |
Dan Albert | 2975a24 | 2016-09-23 16:17:45 -0700 | [diff] [blame] | 21 | symbol_file: "libmediandk.map.txt", |
| 22 | first_version: "21", |
Dan Albert | 1714f2e | 2017-01-05 16:00:15 -0800 | [diff] [blame] | 23 | unversioned_until: "current", |
Dan Albert | 2975a24 | 2016-09-23 16:17:45 -0700 | [diff] [blame] | 24 | } |
Colin Cross | 7e8d4ba | 2017-05-04 16:17:42 -0700 | [diff] [blame] | 25 | |
| 26 | ndk_headers { |
| 27 | name: "libmediandk_headers", |
| 28 | from: "include/media", |
| 29 | to: "media", |
| 30 | srcs: ["include/media/**/*.h"], |
| 31 | license: "NOTICE", |
| 32 | } |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 33 | |
Marco Nelissen | 5dcf85a | 2018-10-11 09:49:02 -0700 | [diff] [blame] | 34 | // for use with header_libs |
| 35 | cc_library_headers { |
| 36 | name: "media_ndk_headers", |
| 37 | vendor_available: true, |
S Vasudev Prasad | ebbc323 | 2020-03-13 15:59:32 +0530 | [diff] [blame] | 38 | export_include_dirs: ["include"], |
| 39 | host_supported: true, |
| 40 | target: { |
| 41 | darwin: { |
| 42 | enabled: false, |
| 43 | }, |
| 44 | }, |
Marco Nelissen | 5dcf85a | 2018-10-11 09:49:02 -0700 | [diff] [blame] | 45 | } |
| 46 | |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 47 | cc_library_shared { |
| 48 | name: "libmediandk", |
| 49 | |
| 50 | srcs: [ |
Dichen Zhang | 52a243e | 2019-11-08 11:02:03 -0800 | [diff] [blame] | 51 | "NdkJavaVMHelper.cpp", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 52 | "NdkMediaCodec.cpp", |
| 53 | "NdkMediaCrypto.cpp", |
Robert Shih | 0df451b | 2017-12-08 14:16:50 -0800 | [diff] [blame] | 54 | "NdkMediaDataSource.cpp", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 55 | "NdkMediaExtractor.cpp", |
| 56 | "NdkMediaFormat.cpp", |
| 57 | "NdkMediaMuxer.cpp", |
| 58 | "NdkMediaDrm.cpp", |
| 59 | "NdkImage.cpp", |
| 60 | "NdkImageReader.cpp", |
| 61 | ], |
| 62 | |
| 63 | include_dirs: [ |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 64 | "frameworks/base/core/jni", |
| 65 | "frameworks/native/include/media/openmax", |
| 66 | "system/media/camera/include", |
| 67 | ], |
| 68 | |
| 69 | cflags: [ |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 70 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 71 | "-Werror", |
| 72 | "-Wall", |
| 73 | ], |
| 74 | |
| 75 | static_libs: [ |
| 76 | "libgrallocusage", |
| 77 | ], |
| 78 | |
Marco Nelissen | 55b259c | 2019-09-27 10:21:55 -0700 | [diff] [blame] | 79 | header_libs: [ |
Orion Hodson | d3fd1ae | 2020-04-03 09:42:02 +0100 | [diff] [blame] | 80 | "jni_headers", |
Marco Nelissen | 55b259c | 2019-09-27 10:21:55 -0700 | [diff] [blame] | 81 | "libmediadrm_headers", |
Marco Nelissen | 7c96ea7 | 2020-01-10 15:46:22 -0800 | [diff] [blame] | 82 | "libmediametrics_headers", |
Marco Nelissen | 55b259c | 2019-09-27 10:21:55 -0700 | [diff] [blame] | 83 | ], |
| 84 | |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 85 | shared_libs: [ |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 86 | "android.hardware.graphics.bufferqueue@1.0", |
| 87 | "android.hidl.token@1.0-utils", |
Jooyung Han | f92acc7 | 2019-03-07 17:43:25 +0900 | [diff] [blame] | 88 | "libandroid_runtime_lazy", |
John W. Bruce | 9c4e0fa | 2019-05-03 17:12:44 -0700 | [diff] [blame] | 89 | "libbase", |
Marco Nelissen | fa8be7d | 2019-09-23 12:15:57 -0700 | [diff] [blame] | 90 | "libdatasource", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 91 | "libmedia", |
Marco Nelissen | 55b259c | 2019-09-27 10:21:55 -0700 | [diff] [blame] | 92 | "libmediadrm", |
Jae Shin | 8568cb9 | 2017-10-30 11:13:36 +0900 | [diff] [blame] | 93 | "libmedia_omx", |
Jooyung Han | 92f6462 | 2019-02-22 16:19:46 +0900 | [diff] [blame] | 94 | "libmedia_jni_utils", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 95 | "libstagefright", |
| 96 | "libstagefright_foundation", |
| 97 | "liblog", |
| 98 | "libutils", |
| 99 | "libcutils", |
Jooyung Han | c34e453 | 2019-02-21 11:34:07 +0900 | [diff] [blame] | 100 | "libnativewindow", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 101 | "libhidlbase", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 102 | "libgui", |
| 103 | "libui", |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 104 | "libmediandk_utils", |
Dichen Zhang | 52a243e | 2019-11-08 11:02:03 -0800 | [diff] [blame] | 105 | "libnativehelper", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 106 | ], |
| 107 | |
Orion Hodson | d3fd1ae | 2020-04-03 09:42:02 +0100 | [diff] [blame] | 108 | export_header_lib_headers: ["jni_headers"], |
| 109 | |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 110 | export_include_dirs: ["include"], |
| 111 | |
Pawin Vongmasa | 4861615 | 2019-02-21 06:28:10 -0800 | [diff] [blame] | 112 | export_shared_lib_headers: [ |
| 113 | "libgui", |
| 114 | ], |
| 115 | |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 116 | product_variables: { |
| 117 | pdk: { |
| 118 | enabled: false, |
| 119 | }, |
| 120 | }, |
dimitry | b8aca87 | 2018-12-04 15:58:40 +0100 | [diff] [blame] | 121 | version_script: "libmediandk.map.txt", |
Dongwon Kang | 33d2535 | 2018-12-12 13:36:43 +0000 | [diff] [blame] | 122 | stubs: { |
| 123 | symbol_file: "libmediandk.map.txt", |
| 124 | versions: ["29"], |
| 125 | }, |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 126 | } |
Jiyong Park | a88ef50 | 2017-08-10 20:12:24 +0900 | [diff] [blame] | 127 | |
| 128 | llndk_library { |
| 129 | name: "libmediandk", |
| 130 | symbol_file: "libmediandk.map.txt", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 131 | export_include_dirs: [ |
| 132 | "include", |
| 133 | ], |
Jiyong Park | a88ef50 | 2017-08-10 20:12:24 +0900 | [diff] [blame] | 134 | } |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 135 | |
| 136 | cc_library { |
| 137 | name: "libmediandk_utils", |
| 138 | |
| 139 | srcs: [ |
| 140 | "NdkMediaDataSourceCallbacks.cpp", |
| 141 | ], |
| 142 | |
| 143 | include_dirs: [ |
| 144 | "frameworks/av/media/libstagefright/include", |
| 145 | "frameworks/av/media/ndk/include", |
| 146 | ], |
| 147 | |
| 148 | export_include_dirs: [ |
| 149 | "include", |
| 150 | ], |
| 151 | |
| 152 | cflags: [ |
| 153 | "-Werror", |
| 154 | "-Wno-error=deprecated-declarations", |
| 155 | "-Wall", |
| 156 | ], |
| 157 | |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 158 | header_libs: [ |
| 159 | "libmedia_headers", |
| 160 | ], |
| 161 | |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 162 | shared_libs: [ |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 163 | ], |
| 164 | |
| 165 | sanitize: { |
| 166 | misc_undefined: [ |
| 167 | "unsigned-integer-overflow", |
| 168 | "signed-integer-overflow", |
| 169 | ], |
| 170 | cfi: true, |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 171 | }, |
| 172 | } |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 173 | |
| 174 | cc_test { |
| 175 | name: "AImageReaderWindowHandleTest", |
Ray Essick | f867ca7 | 2020-04-29 19:41:08 -0700 | [diff] [blame^] | 176 | test_suites: ["device-tests"], |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 177 | srcs: ["tests/AImageReaderWindowHandleTest.cpp"], |
| 178 | shared_libs: [ |
| 179 | "libbinder", |
| 180 | "libmediandk", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 181 | "libmediautils", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 182 | "libnativewindow", |
| 183 | "libgui", |
| 184 | "libutils", |
| 185 | "libui", |
| 186 | "libcutils", |
| 187 | "android.hardware.graphics.bufferqueue@1.0", |
| 188 | ], |
Marco Nelissen | a51151a | 2020-01-07 13:37:47 -0800 | [diff] [blame] | 189 | header_libs: [ |
| 190 | "libstagefright_foundation_headers", |
| 191 | ], |
| 192 | |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 193 | cflags: [ |
| 194 | "-D__ANDROID_VNDK__", |
| 195 | ], |
| 196 | include_dirs: [ |
| 197 | "frameworks/av/media/ndk/", |
| 198 | ], |
| 199 | } |
S Vasudev Prasad | af62b86 | 2020-04-22 16:10:05 +0530 | [diff] [blame] | 200 | |
| 201 | cc_library_static { |
| 202 | name: "libmediandk_format", |
| 203 | |
| 204 | host_supported: true, |
| 205 | |
| 206 | srcs: [ |
| 207 | "NdkMediaFormat.cpp", |
| 208 | ], |
| 209 | |
| 210 | header_libs: [ |
| 211 | "libstagefright_foundation_headers", |
| 212 | ], |
| 213 | |
| 214 | cflags: [ |
| 215 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
| 216 | "-Werror", |
| 217 | "-Wall", |
| 218 | ], |
| 219 | |
| 220 | export_include_dirs: ["include"], |
| 221 | |
| 222 | sanitize: { |
| 223 | misc_undefined: [ |
| 224 | "unsigned-integer-overflow", |
| 225 | "signed-integer-overflow", |
| 226 | ], |
| 227 | cfi: true, |
| 228 | }, |
| 229 | |
| 230 | target: { |
| 231 | darwin: { |
| 232 | enabled: false, |
| 233 | }, |
| 234 | }, |
| 235 | |
| 236 | apex_available: ["com.android.media"], |
| 237 | } |