• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: [
3        "frameworks_av_media_libstagefright_foundation_license",
4    ],
5}
6
7// Added automatically by a large-scale-change
8// See: http://go/android-license-faq
9license {
10    name: "frameworks_av_media_libstagefright_foundation_license",
11    visibility: [":__subpackages__"],
12    license_kinds: [
13        "SPDX-license-identifier-Apache-2.0",
14    ],
15    license_text: [
16        "NOTICE",
17    ],
18}
19
20cc_library_headers {
21    name: "libstagefright_foundation_headers",
22    export_include_dirs: ["include"],
23    vendor_available: true,
24    host_supported: true,
25    min_sdk_version: "29",
26    apex_available: [
27        "//apex_available:platform",
28        "com.android.media",
29        "com.android.media.swcodec",
30    ],
31}
32
33cc_defaults {
34    name: "libstagefright_foundation_defaults",
35    vendor_available: true,
36    host_supported: true,
37    double_loadable: true,
38
39    local_include_dirs: [
40        "include/media/stagefright/foundation",
41    ],
42
43    header_libs: [
44        "av-headers",
45        // this is only needed for the vendor variant that removes libbinder, but vendor
46        // target below does not allow adding header_libs.
47        "libbinder_headers",
48        "libstagefright_foundation_headers",
49        "media_ndk_headers",
50        "media_plugin_headers",
51    ],
52
53    export_header_lib_headers: [
54        "libstagefright_foundation_headers",
55        "media_plugin_headers",
56    ],
57
58    cflags: [
59        "-Wno-multichar",
60        "-Werror",
61        "-Wall",
62    ],
63
64    shared_libs: [
65        "libbinder",
66        "libutils",
67        "libcutils",
68        "liblog",
69    ],
70
71    srcs: [
72        "AAtomizer.cpp",
73        "ABitReader.cpp",
74        "ABuffer.cpp",
75        "ADebug.cpp",
76        "AHandler.cpp",
77        "ALooper.cpp",
78        "ALooperRoster.cpp",
79        "AMessage.cpp",
80        "AString.cpp",
81        "AStringUtils.cpp",
82        "AudioPresentationInfo.cpp",
83        "ByteUtils.cpp",
84        "ColorUtils.cpp",
85        "ColorUtils_fill.cpp",
86        "FoundationUtils.cpp",
87        "MediaBuffer.cpp",
88        "MediaBufferBase.cpp",
89        "MediaBufferGroup.cpp",
90        "MediaDefs.cpp",
91        "MediaKeys.cpp",
92        "MetaData.cpp",
93        "MetaDataBase.cpp",
94        "OpusHeader.cpp",
95        "avc_utils.cpp",
96        "base64.cpp",
97        "hexdump.cpp",
98    ],
99
100    target: {
101        vendor: {
102            // TODO: add libbinder_headers here instead of above when it becomes supported
103            exclude_shared_libs: [
104                "libbinder",
105            ],
106            cflags: [
107                "-DNO_IMEMORY",
108            ],
109        },
110        host: {
111            sanitize: {
112                cfi: false,
113            },
114        },
115        apex: {
116            exclude_shared_libs: [
117                "libbinder",
118            ],
119        },
120        darwin: {
121            enabled: false,
122        },
123    },
124
125    sanitize: {
126        misc_undefined: [
127            "unsigned-integer-overflow",
128            "signed-integer-overflow",
129        ],
130        cfi: true,
131    },
132}
133
134cc_library {
135    name: "libstagefright_foundation",
136    defaults: ["libstagefright_foundation_defaults"],
137    min_sdk_version: "29",
138    apex_available: [
139        "//apex_available:platform",
140        "com.android.media",
141        "com.android.media.swcodec",
142    ],
143}
144
145cc_library_static {
146    name: "libstagefright_foundation_without_imemory",
147    defaults: ["libstagefright_foundation_defaults"],
148    min_sdk_version: "29",
149    apex_available: ["com.android.media"],
150
151
152    cflags: [
153        "-Wno-multichar",
154        "-Werror",
155        "-Wall",
156        "-DNO_IMEMORY",
157    ],
158}
159
160// this gets linked into extractors in media mainline module
161// so must be ndk api 29 so that it runs on >=Q
162cc_library_static {
163    name: "libstagefright_foundation_colorutils_ndk",
164    host_supported: true,
165    vendor_available: true,
166
167    target: {
168        darwin: {
169            enabled: false,
170        },
171    },
172
173    shared_libs: [
174        "liblog",
175        "libutils", // for sp<>
176        // actually invokes this, but called from folks who already load it
177        // "libmediandk",
178    ],
179
180    header_libs: [
181        // this is only needed for the vendor variant that removes libbinder, but vendor
182        // target below does not allow adding header_libs.
183        "libbinder_headers",
184        "libstagefright_foundation_headers",
185        "media_ndk_headers",
186        "media_plugin_headers",
187    ],
188
189    local_include_dirs: [
190        "include/media/stagefright/foundation",
191    ],
192
193    cflags: [
194        "-Werror",
195        "-Wall",
196    ],
197
198    srcs: [
199        "ColorUtils_ndk.cpp",
200        "ColorUtils_fill.cpp",
201    ],
202
203    sanitize: {
204        misc_undefined: [
205            "unsigned-integer-overflow",
206            "signed-integer-overflow",
207        ],
208        cfi: true,
209    },
210
211    min_sdk_version: "29",
212    apex_available: [
213        "//apex_available:platform",
214        "com.android.media",
215        "com.android.media.swcodec",
216    ],
217
218}
219