blob: b9abd1282fc3e0db4806bd4329e3f2e359325cd9 [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",
Jiyong Park61984712020-02-24 18:36:41 +090026 updatable: true,
satayev26a0e1a2021-05-12 15:50:11 +010027 bootclasspath_fragments: ["com.android.media-bootclasspath-fragment"],
satayev95eb9de2021-05-18 14:33:22 +010028 systemserverclasspath_fragments: ["com.android.media-systemserverclasspath-fragment"],
Dongwon Kang8bd93d32019-05-03 14:58:08 +000029 multilib: {
30 first: {
31 // Extractor process runs only with the primary ABI.
32 native_shared_libs: [
33 // Extractor plugins
34 "libaacextractor",
35 "libamrextractor",
36 "libflacextractor",
37 "libmidiextractor",
38 "libmkvextractor",
39 "libmp3extractor",
40 "libmp4extractor",
41 "libmpeg2extractor",
42 "liboggextractor",
43 "libwavextractor",
44 ],
Chong Zhanga2e3a042020-10-26 11:58:11 -070045 // Transcoding service only run with primary ABI.
46 binaries: [
47 "mediatranscoding",
48 ],
Dongwon Kang8bd93d32019-05-03 14:58:08 +000049 },
50 },
Santiago Seifertef893d42020-11-13 17:36:40 +000051 // JNI
Ray Essick1831f7b2021-03-15 16:10:51 -070052 native_shared_libs: [
53 "libmediaparser-jni",
54 "libmediaformatshaper",
55 ],
Santiago Seifertef893d42020-11-13 17:36:40 +000056 compile_multilib: "both",
Marco Nelissen80e1a6d2019-04-30 15:52:10 -070057 prebuilts: [
Ray Essick44574862020-02-13 12:39:14 -080058 "code_coverage.policy",
Chong Zhanga2e3a042020-10-26 11:58:11 -070059 "com.android.media-mediatranscoding.rc",
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
70 // IMPORTANT: For the APEX to be installed on Android 10 (API 29),
71 // min_sdk_version should be 29. This enables the build system to make
72 // sure the package compatible to Android 10 in two ways:
73 // - build the APEX package compatible to Android 10
74 // so that the package can be installed.
75 // - build artifacts (lib/javalib/bin) against Android 10 SDK
76 // so that the artifacts can run.
Jooyung Han80ec0df2020-03-09 13:10:12 +090077 min_sdk_version: "29",
Nikita Ioffe92353282021-02-04 01:20:01 +000078 // Indicates that pre-installed version of this apex can be compressed.
79 // Whether it actually will be compressed is controlled on per-device basis.
80 compressible: true,
Dongwon Kangb188ad82018-11-09 16:05:43 -080081}
82
Chong Zhang0b83feb2018-12-20 17:44:13 -080083apex {
Dongwon Kang28052d52019-02-14 21:49:08 -080084 name: "com.android.media",
85 manifest: "manifest.json",
86 defaults: ["com.android.media-defaults"],
Anton Hansson8aad6e52021-05-20 18:00:07 +010087 prebuilts: ["current_sdkinfo"],
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090088}
89
Kiyoung Kimb5aa33d2020-10-06 17:43:40 +090090linker_config {
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090091 name: "media-linker-config",
Kiyoung Kimb5aa33d2020-10-06 17:43:40 +090092 src: "linker.config.json",
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090093 installable: false,
Dongwon Kang28052d52019-02-14 21:49:08 -080094}
95
satayev26a0e1a2021-05-12 15:50:11 +010096// Encapsulate the contributions made by the com.android.media to the bootclasspath.
97bootclasspath_fragment {
98 name: "com.android.media-bootclasspath-fragment",
99 contents: ["updatable-media"],
100 apex_available: ["com.android.media"],
Paul Duffin44517762021-06-29 01:58:33 +0100101
102 api: {
103 stub_libs: [
104 // Stubs for the APIs provided by updatable-media. This has to be
105 // specified explicitly because updatable-media is not a
106 // java_sdk_library.
107 "framework-media",
108 ],
109 },
110
111 // The bootclasspath_fragments that provide APIs on which this depends.
112 fragments: [
113 {
114 apex: "com.android.art",
115 module: "art-bootclasspath-fragment",
116 },
117 ],
118
119 // Additional stubs libraries that this fragment's contents use which are
120 // not provided by another bootclasspath_fragment.
121 additional_stubs: [
122 "android-non-updatable",
123 ],
124
125 // Additional hidden API flag files to override the defaults. This must only be
126 // modified by the Soong or platform compat team.
127 hidden_api: {
128 max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
129 },
satayev26a0e1a2021-05-12 15:50:11 +0100130}
131
satayev95eb9de2021-05-18 14:33:22 +0100132// Encapsulate the contributions made by the com.android.media to the systemserverclasspath.
133systemserverclasspath_fragment {
134 name: "com.android.media-systemserverclasspath-fragment",
135 contents: ["service-media-s"],
136 apex_available: ["com.android.media"],
137}
138
Jeff Hamilton0bce0c62019-03-06 22:23:40 -0500139filegroup {
140 name: "com.android.media-androidManifest",
141 srcs: ["AndroidManifest-media.xml"],
142}
143
144filegroup {
145 name: "com.android.media.swcodec-androidManifest",
146 srcs: ["AndroidManifest-swcodec.xml"],
147}
148
Dongwon Kang28052d52019-02-14 21:49:08 -0800149apex_defaults {
150 name: "com.android.media.swcodec-defaults",
Jiyong Park61984712020-02-24 18:36:41 +0900151 updatable: true,
Chong Zhang9bda4522019-02-27 13:43:50 -0800152 binaries: [
153 "mediaswcodec",
154 ],
Chong Zhang9206c3a2020-12-15 10:00:00 -0800155 native_shared_libs: [
Wonsik Kima5a1ad12021-02-19 12:09:38 -0800156 "libcodec2_hidl@1.0",
157 "libcodec2_hidl@1.1",
Sungtak Lee8577dab2021-03-12 02:25:50 -0800158 "libcodec2_hidl@1.2",
Chong Zhang9206c3a2020-12-15 10:00:00 -0800159 "libstagefright_foundation",
160 ],
Chong Zhang9bda4522019-02-27 13:43:50 -0800161 prebuilts: [
162 "com.android.media.swcodec-mediaswcodec.rc",
163 "com.android.media.swcodec-ld.config.txt",
164 "mediaswcodec.policy",
Ray Essick44574862020-02-13 12:39:14 -0800165 "code_coverage.policy",
166 "crash_dump.policy",
Lajos Molnar882d2382019-04-08 17:47:33 -0700167 "mediaswcodec.xml",
Chong Zhang0b83feb2018-12-20 17:44:13 -0800168 ],
Chong Zhang0b83feb2018-12-20 17:44:13 -0800169 key: "com.android.media.swcodec.key",
Jiyong Park77057912019-02-11 12:30:20 +0900170 certificate: ":com.android.media.swcodec.certificate",
Jeff Hamilton0bce0c62019-03-06 22:23:40 -0500171
172 // Use a custom AndroidManifest.xml used for API targeting.
173 androidManifest: ":com.android.media.swcodec-androidManifest",
Jooyung Han97d7b652020-03-12 18:22:20 +0900174
175 // IMPORTANT: For the APEX to be installed on Android 10 (API 29),
176 // min_sdk_version should be 29. This enables the build system to make
177 // sure the package compatible to Android 10 in two ways:
178 // - build the APEX package compatible to Android 10
179 // so that the package can be installed.
180 // - build artifacts (lib/javalib/bin) against Android 10 SDK
181 // so that the artifacts can run.
Jooyung Han80ec0df2020-03-09 13:10:12 +0900182 min_sdk_version: "29",
Nikita Ioffe92353282021-02-04 01:20:01 +0000183 // Indicates that pre-installed version of this apex can be compressed.
184 // Whether it actually will be compressed is controlled on per-device basis.
185 compressible: true,
Chong Zhang0b83feb2018-12-20 17:44:13 -0800186}
187
Chong Zhang9bda4522019-02-27 13:43:50 -0800188prebuilt_etc {
Chong Zhanga2e3a042020-10-26 11:58:11 -0700189 name: "com.android.media-mediatranscoding.rc",
190 src: "mediatranscoding.rc",
191 filename: "init.rc",
192 installable: false,
193}
194
195prebuilt_etc {
Chong Zhang9bda4522019-02-27 13:43:50 -0800196 name: "com.android.media.swcodec-mediaswcodec.rc",
197 src: "mediaswcodec.rc",
198 filename: "init.rc",
199 installable: false,
200}
201
202prebuilt_etc {
203 name: "com.android.media.swcodec-ld.config.txt",
204 src: "ld.config.txt",
205 filename: "ld.config.txt",
206 installable: false,
207}
208
Dongwon Kang28052d52019-02-14 21:49:08 -0800209apex {
210 name: "com.android.media.swcodec",
211 manifest: "manifest_codec.json",
212 defaults: ["com.android.media.swcodec-defaults"],
213}
214
Dongwon Kangb188ad82018-11-09 16:05:43 -0800215apex_key {
Dongwon Kang1d3b2e72018-11-13 13:58:38 -0800216 name: "com.android.media.key",
Jiyong Park7733ba62018-11-22 16:28:07 +0900217 public_key: "com.android.media.avbpubkey",
218 private_key: "com.android.media.pem",
Dongwon Kangb188ad82018-11-09 16:05:43 -0800219}
Chong Zhang0b83feb2018-12-20 17:44:13 -0800220
221apex_key {
222 name: "com.android.media.swcodec.key",
223 public_key: "com.android.media.swcodec.avbpubkey",
224 private_key: "com.android.media.swcodec.pem",
225}
Jiyong Park3ef4f712019-02-11 11:00:31 +0900226
227android_app_certificate {
228 name: "com.android.media.certificate",
229 certificate: "com.android.media",
230}
Jiyong Park77057912019-02-11 12:30:20 +0900231
232android_app_certificate {
233 name: "com.android.media.swcodec.certificate",
234 certificate: "com.android.media.swcodec",
235}