blob: 570ca0199242ea36a45f586f834146b808f6d601 [file] [log] [blame]
Dongwon Kangb188ad82018-11-09 16:05:43 -08001// Copyright (C) 2018 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
Bob Badour56786ac2021-02-25 15:24:36 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_av_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_av_license"],
22}
23
Dongwon Kang28052d52019-02-14 21:49:08 -080024apex_defaults {
25 name: "com.android.media-defaults",
satayev26a0e1a2021-05-12 15:50:11 +010026 bootclasspath_fragments: ["com.android.media-bootclasspath-fragment"],
satayev95eb9de2021-05-18 14:33:22 +010027 systemserverclasspath_fragments: ["com.android.media-systemserverclasspath-fragment"],
Dongwon Kang8bd93d32019-05-03 14:58:08 +000028 multilib: {
29 first: {
30 // Extractor process runs only with the primary ABI.
31 native_shared_libs: [
32 // Extractor plugins
33 "libaacextractor",
34 "libamrextractor",
35 "libflacextractor",
36 "libmidiextractor",
37 "libmkvextractor",
38 "libmp3extractor",
39 "libmp4extractor",
40 "libmpeg2extractor",
41 "liboggextractor",
42 "libwavextractor",
43 ],
Chong Zhanga2e3a042020-10-26 11:58:11 -070044 // Transcoding service only run with primary ABI.
45 binaries: [
46 "mediatranscoding",
47 ],
Dongwon Kang8bd93d32019-05-03 14:58:08 +000048 },
49 },
Santiago Seifertef893d42020-11-13 17:36:40 +000050 // JNI
Ray Essick1831f7b2021-03-15 16:10:51 -070051 native_shared_libs: [
52 "libmediaparser-jni",
53 "libmediaformatshaper",
54 ],
Santiago Seifertef893d42020-11-13 17:36:40 +000055 compile_multilib: "both",
Marco Nelissen80e1a6d2019-04-30 15:52:10 -070056 prebuilts: [
Ray Essick44574862020-02-13 12:39:14 -080057 "code_coverage.policy",
Chong Zhanga2e3a042020-10-26 11:58:11 -070058 "com.android.media-mediatranscoding.rc",
Ray Essick8cd6d142022-03-25 12:01:29 -070059 "com.android.media-mediatranscoding.32rc",
Ray Essick44574862020-02-13 12:39:14 -080060 "crash_dump.policy",
Chong Zhanga2e3a042020-10-26 11:58:11 -070061 "mediaextractor.policy",
62 "media-linker-config",
Marco Nelissen80e1a6d2019-04-30 15:52:10 -070063 ],
Dongwon Kang1d3b2e72018-11-13 13:58:38 -080064 key: "com.android.media.key",
Jiyong Park3ef4f712019-02-11 11:00:31 +090065 certificate: ":com.android.media.certificate",
Jeff Hamilton0bce0c62019-03-06 22:23:40 -050066
67 // Use a custom AndroidManifest.xml used for API targeting.
68 androidManifest: ":com.android.media-androidManifest",
Jooyung Han97d7b652020-03-12 18:22:20 +090069
Gurpreet Singh0263a6d2022-03-04 14:43:33 +000070 // IMPORTANT: q-launched-apex-module enables the build system to make
Jooyung Han97d7b652020-03-12 18:22:20 +090071 // sure the package compatible to Android 10 in two ways:
72 // - build the APEX package compatible to Android 10
73 // so that the package can be installed.
74 // - build artifacts (lib/javalib/bin) against Android 10 SDK
75 // so that the artifacts can run.
Gurpreet Singh0263a6d2022-03-04 14:43:33 +000076 defaults: ["q-launched-apex-module"],
Nikita Ioffe92353282021-02-04 01:20:01 +000077 // Indicates that pre-installed version of this apex can be compressed.
78 // Whether it actually will be compressed is controlled on per-device basis.
79 compressible: true,
Dongwon Kangb188ad82018-11-09 16:05:43 -080080}
81
Chong Zhang0b83feb2018-12-20 17:44:13 -080082apex {
Dongwon Kang28052d52019-02-14 21:49:08 -080083 name: "com.android.media",
84 manifest: "manifest.json",
85 defaults: ["com.android.media-defaults"],
Anton Hansson8aad6e52021-05-20 18:00:07 +010086 prebuilts: ["current_sdkinfo"],
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090087}
88
Kiyoung Kimb5aa33d2020-10-06 17:43:40 +090089linker_config {
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090090 name: "media-linker-config",
Kiyoung Kimb5aa33d2020-10-06 17:43:40 +090091 src: "linker.config.json",
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090092 installable: false,
Dongwon Kang28052d52019-02-14 21:49:08 -080093}
94
satayev26a0e1a2021-05-12 15:50:11 +010095// Encapsulate the contributions made by the com.android.media to the bootclasspath.
96bootclasspath_fragment {
97 name: "com.android.media-bootclasspath-fragment",
98 contents: ["updatable-media"],
99 apex_available: ["com.android.media"],
Paul Duffin44517762021-06-29 01:58:33 +0100100
101 api: {
102 stub_libs: [
103 // Stubs for the APIs provided by updatable-media. This has to be
104 // specified explicitly because updatable-media is not a
105 // java_sdk_library.
106 "framework-media",
107 ],
108 },
109
110 // The bootclasspath_fragments that provide APIs on which this depends.
111 fragments: [
112 {
113 apex: "com.android.art",
114 module: "art-bootclasspath-fragment",
115 },
116 ],
117
118 // Additional stubs libraries that this fragment's contents use which are
119 // not provided by another bootclasspath_fragment.
120 additional_stubs: [
121 "android-non-updatable",
122 ],
123
124 // Additional hidden API flag files to override the defaults. This must only be
125 // modified by the Soong or platform compat team.
126 hidden_api: {
127 max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
Paul Duffin820590b2022-03-21 16:25:55 +0000128
129 // The following packages contain classes from other modules on the
130 // bootclasspath. That means that the hidden API flags for this module
131 // has to explicitly list every single class this module provides in
132 // that package to differentiate them from the classes provided by other
133 // modules. That can include private classes that are not part of the
134 // API.
135 split_packages: [
136 "android.media",
137 ],
138
139 // The following packages and all their subpackages currently only
140 // contain classes from this bootclasspath_fragment. Listing a package
141 // here won't prevent other bootclasspath modules from adding classes in
142 // any of those packages but it will prevent them from adding those
143 // classes into an API surface, e.g. public, system, etc.. Doing so will
144 // result in a build failure due to inconsistent flags.
145 package_prefixes: [
146 "android.media.internal",
147 ],
Paul Duffin44517762021-06-29 01:58:33 +0100148 },
satayev26a0e1a2021-05-12 15:50:11 +0100149}
150
satayev95eb9de2021-05-18 14:33:22 +0100151// Encapsulate the contributions made by the com.android.media to the systemserverclasspath.
152systemserverclasspath_fragment {
153 name: "com.android.media-systemserverclasspath-fragment",
154 contents: ["service-media-s"],
155 apex_available: ["com.android.media"],
156}
157
Jeff Hamilton0bce0c62019-03-06 22:23:40 -0500158filegroup {
159 name: "com.android.media-androidManifest",
160 srcs: ["AndroidManifest-media.xml"],
161}
162
163filegroup {
164 name: "com.android.media.swcodec-androidManifest",
165 srcs: ["AndroidManifest-swcodec.xml"],
166}
167
Dongwon Kang28052d52019-02-14 21:49:08 -0800168apex_defaults {
169 name: "com.android.media.swcodec-defaults",
Chong Zhang9bda4522019-02-27 13:43:50 -0800170 binaries: [
171 "mediaswcodec",
172 ],
Chong Zhang9206c3a2020-12-15 10:00:00 -0800173 native_shared_libs: [
Wonsik Kima5a1ad12021-02-19 12:09:38 -0800174 "libcodec2_hidl@1.0",
175 "libcodec2_hidl@1.1",
Sungtak Lee8577dab2021-03-12 02:25:50 -0800176 "libcodec2_hidl@1.2",
Chong Zhang9206c3a2020-12-15 10:00:00 -0800177 "libstagefright_foundation",
178 ],
Chong Zhang9bda4522019-02-27 13:43:50 -0800179 prebuilts: [
180 "com.android.media.swcodec-mediaswcodec.rc",
Ray Essick8cd6d142022-03-25 12:01:29 -0700181 "com.android.media.swcodec-mediaswcodec.32rc",
Chong Zhang9bda4522019-02-27 13:43:50 -0800182 "com.android.media.swcodec-ld.config.txt",
183 "mediaswcodec.policy",
Ray Essick44574862020-02-13 12:39:14 -0800184 "code_coverage.policy",
185 "crash_dump.policy",
Lajos Molnar882d2382019-04-08 17:47:33 -0700186 "mediaswcodec.xml",
Chong Zhang0b83feb2018-12-20 17:44:13 -0800187 ],
Chong Zhang0b83feb2018-12-20 17:44:13 -0800188 key: "com.android.media.swcodec.key",
Jiyong Park77057912019-02-11 12:30:20 +0900189 certificate: ":com.android.media.swcodec.certificate",
Jeff Hamilton0bce0c62019-03-06 22:23:40 -0500190
191 // Use a custom AndroidManifest.xml used for API targeting.
192 androidManifest: ":com.android.media.swcodec-androidManifest",
Jooyung Han97d7b652020-03-12 18:22:20 +0900193
Gurpreet Singh0263a6d2022-03-04 14:43:33 +0000194 // IMPORTANT: q-launched-apex-module enables the build system to make
Jooyung Han97d7b652020-03-12 18:22:20 +0900195 // sure the package compatible to Android 10 in two ways:
196 // - build the APEX package compatible to Android 10
197 // so that the package can be installed.
198 // - build artifacts (lib/javalib/bin) against Android 10 SDK
199 // so that the artifacts can run.
Gurpreet Singh0263a6d2022-03-04 14:43:33 +0000200 defaults: ["q-launched-apex-module"],
Nikita Ioffe92353282021-02-04 01:20:01 +0000201 // Indicates that pre-installed version of this apex can be compressed.
202 // Whether it actually will be compressed is controlled on per-device basis.
203 compressible: true,
Chong Zhang0b83feb2018-12-20 17:44:13 -0800204}
205
Ray Essick8cd6d142022-03-25 12:01:29 -0700206// install as mediatranscoding.* and mediaswcodec.* instead of init.*
207// so we are ready for day we have more than 1 *rc file within the apex.
208
Chong Zhang9bda4522019-02-27 13:43:50 -0800209prebuilt_etc {
Chong Zhanga2e3a042020-10-26 11:58:11 -0700210 name: "com.android.media-mediatranscoding.rc",
211 src: "mediatranscoding.rc",
Ray Essick8cd6d142022-03-25 12:01:29 -0700212 filename: "mediatranscoding.rc",
213 installable: false,
214}
215
216prebuilt_etc {
217 name: "com.android.media-mediatranscoding.32rc",
218 src: "mediatranscoding.32rc",
219 filename: "mediatranscoding.32rc",
Chong Zhanga2e3a042020-10-26 11:58:11 -0700220 installable: false,
221}
222
223prebuilt_etc {
Chong Zhang9bda4522019-02-27 13:43:50 -0800224 name: "com.android.media.swcodec-mediaswcodec.rc",
225 src: "mediaswcodec.rc",
Ray Essick8cd6d142022-03-25 12:01:29 -0700226 filename: "mediaswcodec.rc",
227 installable: false,
228}
229
230prebuilt_etc {
231 name: "com.android.media.swcodec-mediaswcodec.32rc",
232 src: "mediaswcodec.32rc",
233 filename: "mediaswcodec.32rc",
Chong Zhang9bda4522019-02-27 13:43:50 -0800234 installable: false,
235}
236
237prebuilt_etc {
238 name: "com.android.media.swcodec-ld.config.txt",
239 src: "ld.config.txt",
240 filename: "ld.config.txt",
241 installable: false,
242}
243
Dongwon Kang28052d52019-02-14 21:49:08 -0800244apex {
245 name: "com.android.media.swcodec",
246 manifest: "manifest_codec.json",
247 defaults: ["com.android.media.swcodec-defaults"],
248}
249
Dongwon Kangb188ad82018-11-09 16:05:43 -0800250apex_key {
Dongwon Kang1d3b2e72018-11-13 13:58:38 -0800251 name: "com.android.media.key",
Jiyong Park7733ba62018-11-22 16:28:07 +0900252 public_key: "com.android.media.avbpubkey",
253 private_key: "com.android.media.pem",
Dongwon Kangb188ad82018-11-09 16:05:43 -0800254}
Chong Zhang0b83feb2018-12-20 17:44:13 -0800255
256apex_key {
257 name: "com.android.media.swcodec.key",
258 public_key: "com.android.media.swcodec.avbpubkey",
259 private_key: "com.android.media.swcodec.pem",
260}
Jiyong Park3ef4f712019-02-11 11:00:31 +0900261
262android_app_certificate {
263 name: "com.android.media.certificate",
264 certificate: "com.android.media",
265}
Jiyong Park77057912019-02-11 12:30:20 +0900266
267android_app_certificate {
268 name: "com.android.media.swcodec.certificate",
269 certificate: "com.android.media.swcodec",
270}