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, |
| 38 | export_include_dirs: ["include"] |
| 39 | } |
| 40 | |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 41 | cc_library_shared { |
| 42 | name: "libmediandk", |
| 43 | |
| 44 | srcs: [ |
| 45 | "NdkMediaCodec.cpp", |
| 46 | "NdkMediaCrypto.cpp", |
Robert Shih | 0df451b | 2017-12-08 14:16:50 -0800 | [diff] [blame] | 47 | "NdkMediaDataSource.cpp", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 48 | "NdkMediaExtractor.cpp", |
| 49 | "NdkMediaFormat.cpp", |
| 50 | "NdkMediaMuxer.cpp", |
| 51 | "NdkMediaDrm.cpp", |
| 52 | "NdkImage.cpp", |
| 53 | "NdkImageReader.cpp", |
| 54 | ], |
| 55 | |
| 56 | include_dirs: [ |
| 57 | "bionic/libc/private", |
| 58 | "frameworks/base/core/jni", |
| 59 | "frameworks/native/include/media/openmax", |
| 60 | "system/media/camera/include", |
| 61 | ], |
| 62 | |
| 63 | cflags: [ |
| 64 | "-fvisibility=hidden", |
| 65 | "-DEXPORT=__attribute__((visibility(\"default\")))", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 66 | "-Werror", |
| 67 | "-Wall", |
| 68 | ], |
| 69 | |
| 70 | static_libs: [ |
| 71 | "libgrallocusage", |
| 72 | ], |
| 73 | |
| 74 | shared_libs: [ |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 75 | "android.hardware.graphics.bufferqueue@1.0", |
| 76 | "android.hidl.token@1.0-utils", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 77 | "libbinder", |
| 78 | "libmedia", |
Jae Shin | 8568cb9 | 2017-10-30 11:13:36 +0900 | [diff] [blame] | 79 | "libmedia_omx", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 80 | "libmedia_jni", |
| 81 | "libmediadrm", |
Dongwon Kang | 7dc218e | 2018-01-29 08:59:33 -0800 | [diff] [blame] | 82 | "libmediaextractor", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 83 | "libstagefright", |
| 84 | "libstagefright_foundation", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 85 | "libstagefright_bufferqueue_helper", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 86 | "liblog", |
| 87 | "libutils", |
| 88 | "libcutils", |
| 89 | "libandroid", |
| 90 | "libandroid_runtime", |
| 91 | "libbinder", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 92 | "libhwbinder", |
| 93 | "libhidlbase", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 94 | "libgui", |
| 95 | "libui", |
Robert Shih | 730af22 | 2018-09-14 14:02:57 -0700 | [diff] [blame] | 96 | "libmedia2_jni_core", |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 97 | "libmediandk_utils", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 98 | ], |
| 99 | |
| 100 | export_include_dirs: ["include"], |
| 101 | |
| 102 | product_variables: { |
| 103 | pdk: { |
| 104 | enabled: false, |
| 105 | }, |
| 106 | }, |
dimitry | b8aca87 | 2018-12-04 15:58:40 +0100 | [diff] [blame^] | 107 | version_script: "libmediandk.map.txt", |
Colin Cross | 3f4c0df | 2017-05-04 16:19:06 -0700 | [diff] [blame] | 108 | } |
Jiyong Park | a88ef50 | 2017-08-10 20:12:24 +0900 | [diff] [blame] | 109 | |
| 110 | llndk_library { |
| 111 | name: "libmediandk", |
| 112 | symbol_file: "libmediandk.map.txt", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 113 | export_include_dirs: [ |
| 114 | "include", |
| 115 | ], |
Jiyong Park | a88ef50 | 2017-08-10 20:12:24 +0900 | [diff] [blame] | 116 | } |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 117 | |
| 118 | cc_library { |
| 119 | name: "libmediandk_utils", |
| 120 | |
| 121 | srcs: [ |
| 122 | "NdkMediaDataSourceCallbacks.cpp", |
| 123 | ], |
| 124 | |
| 125 | include_dirs: [ |
| 126 | "frameworks/av/media/libstagefright/include", |
| 127 | "frameworks/av/media/ndk/include", |
| 128 | ], |
| 129 | |
| 130 | export_include_dirs: [ |
| 131 | "include", |
| 132 | ], |
| 133 | |
| 134 | cflags: [ |
| 135 | "-Werror", |
| 136 | "-Wno-error=deprecated-declarations", |
| 137 | "-Wall", |
| 138 | ], |
| 139 | |
| 140 | shared_libs: [ |
| 141 | "libstagefright_foundation", |
| 142 | "liblog", |
| 143 | "libutils", |
| 144 | "libcutils", |
| 145 | ], |
| 146 | |
| 147 | sanitize: { |
| 148 | misc_undefined: [ |
| 149 | "unsigned-integer-overflow", |
| 150 | "signed-integer-overflow", |
| 151 | ], |
| 152 | cfi: true, |
Robert Shih | 2568eb9 | 2018-09-19 10:00:46 -0700 | [diff] [blame] | 153 | }, |
| 154 | } |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 155 | |
| 156 | cc_test { |
| 157 | name: "AImageReaderWindowHandleTest", |
| 158 | srcs: ["tests/AImageReaderWindowHandleTest.cpp"], |
| 159 | shared_libs: [ |
| 160 | "libbinder", |
| 161 | "libmediandk", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 162 | "libmediautils", |
Jayant Chowdhary | 249e1f2 | 2018-09-24 15:07:45 -0700 | [diff] [blame] | 163 | "libnativewindow", |
| 164 | "libgui", |
| 165 | "libutils", |
| 166 | "libui", |
| 167 | "libcutils", |
| 168 | "android.hardware.graphics.bufferqueue@1.0", |
| 169 | ], |
| 170 | cflags: [ |
| 171 | "-D__ANDROID_VNDK__", |
| 172 | ], |
| 173 | include_dirs: [ |
| 174 | "frameworks/av/media/ndk/", |
| 175 | ], |
| 176 | } |