blob: 74754ea5beab756f5a87247ccbee79e0ecf8a819 [file] [log] [blame]
Dan Albert2975a242016-09-23 16:17:45 -07001// 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
19ndk_library {
Dan Willemsen2c885592017-04-07 15:48:32 -070020 name: "libmediandk",
Dan Albert2975a242016-09-23 16:17:45 -070021 symbol_file: "libmediandk.map.txt",
22 first_version: "21",
Dan Albert1714f2e2017-01-05 16:00:15 -080023 unversioned_until: "current",
Dan Albert2975a242016-09-23 16:17:45 -070024}
Colin Cross7e8d4ba2017-05-04 16:17:42 -070025
26ndk_headers {
27 name: "libmediandk_headers",
28 from: "include/media",
29 to: "media",
30 srcs: ["include/media/**/*.h"],
31 license: "NOTICE",
32}
Colin Cross3f4c0df2017-05-04 16:19:06 -070033
Marco Nelissen5dcf85a2018-10-11 09:49:02 -070034// for use with header_libs
35cc_library_headers {
36 name: "media_ndk_headers",
37 vendor_available: true,
38 export_include_dirs: ["include"]
39}
40
Colin Cross3f4c0df2017-05-04 16:19:06 -070041cc_library_shared {
42 name: "libmediandk",
43
44 srcs: [
45 "NdkMediaCodec.cpp",
46 "NdkMediaCrypto.cpp",
Robert Shih0df451b2017-12-08 14:16:50 -080047 "NdkMediaDataSource.cpp",
Colin Cross3f4c0df2017-05-04 16:19:06 -070048 "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: [
Colin Cross3f4c0df2017-05-04 16:19:06 -070064 "-DEXPORT=__attribute__((visibility(\"default\")))",
Colin Cross3f4c0df2017-05-04 16:19:06 -070065 "-Werror",
66 "-Wall",
67 ],
68
69 static_libs: [
70 "libgrallocusage",
71 ],
72
73 shared_libs: [
Jayant Chowdhary249e1f22018-09-24 15:07:45 -070074 "android.hardware.graphics.bufferqueue@1.0",
75 "android.hidl.token@1.0-utils",
Colin Cross3f4c0df2017-05-04 16:19:06 -070076 "libbinder",
77 "libmedia",
Jae Shin8568cb92017-10-30 11:13:36 +090078 "libmedia_omx",
Colin Cross3f4c0df2017-05-04 16:19:06 -070079 "libmedia_jni",
80 "libmediadrm",
Colin Cross3f4c0df2017-05-04 16:19:06 -070081 "libstagefright",
82 "libstagefright_foundation",
Jayant Chowdhary249e1f22018-09-24 15:07:45 -070083 "libstagefright_bufferqueue_helper",
Colin Cross3f4c0df2017-05-04 16:19:06 -070084 "liblog",
85 "libutils",
86 "libcutils",
87 "libandroid",
88 "libandroid_runtime",
89 "libbinder",
Jayant Chowdhary249e1f22018-09-24 15:07:45 -070090 "libhidlbase",
Colin Cross3f4c0df2017-05-04 16:19:06 -070091 "libgui",
92 "libui",
Robert Shih730af222018-09-14 14:02:57 -070093 "libmedia2_jni_core",
Robert Shih2568eb92018-09-19 10:00:46 -070094 "libmediandk_utils",
Colin Cross3f4c0df2017-05-04 16:19:06 -070095 ],
96
97 export_include_dirs: ["include"],
98
99 product_variables: {
100 pdk: {
101 enabled: false,
102 },
103 },
dimitryb8aca872018-12-04 15:58:40 +0100104 version_script: "libmediandk.map.txt",
Dongwon Kang33d25352018-12-12 13:36:43 +0000105 stubs: {
106 symbol_file: "libmediandk.map.txt",
107 versions: ["29"],
108 },
Colin Cross3f4c0df2017-05-04 16:19:06 -0700109}
Jiyong Parka88ef502017-08-10 20:12:24 +0900110
111llndk_library {
112 name: "libmediandk",
113 symbol_file: "libmediandk.map.txt",
Jayant Chowdhary249e1f22018-09-24 15:07:45 -0700114 export_include_dirs: [
115 "include",
116 ],
Jiyong Parka88ef502017-08-10 20:12:24 +0900117}
Robert Shih2568eb92018-09-19 10:00:46 -0700118
119cc_library {
120 name: "libmediandk_utils",
121
122 srcs: [
123 "NdkMediaDataSourceCallbacks.cpp",
124 ],
125
126 include_dirs: [
127 "frameworks/av/media/libstagefright/include",
128 "frameworks/av/media/ndk/include",
129 ],
130
131 export_include_dirs: [
132 "include",
133 ],
134
135 cflags: [
136 "-Werror",
137 "-Wno-error=deprecated-declarations",
138 "-Wall",
139 ],
140
141 shared_libs: [
Robert Shih2568eb92018-09-19 10:00:46 -0700142 ],
143
144 sanitize: {
145 misc_undefined: [
146 "unsigned-integer-overflow",
147 "signed-integer-overflow",
148 ],
149 cfi: true,
Robert Shih2568eb92018-09-19 10:00:46 -0700150 },
151}
Jayant Chowdhary249e1f22018-09-24 15:07:45 -0700152
153cc_test {
154 name: "AImageReaderWindowHandleTest",
155 srcs: ["tests/AImageReaderWindowHandleTest.cpp"],
156 shared_libs: [
157 "libbinder",
158 "libmediandk",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -0800159 "libmediautils",
Jayant Chowdhary249e1f22018-09-24 15:07:45 -0700160 "libnativewindow",
161 "libgui",
162 "libutils",
163 "libui",
164 "libcutils",
165 "android.hardware.graphics.bufferqueue@1.0",
166 ],
167 cflags: [
168 "-D__ANDROID_VNDK__",
169 ],
170 include_dirs: [
171 "frameworks/av/media/ndk/",
172 ],
173}