blob: aacb9a820ffcfe38fc50b646859eecce2f3a5fe5 [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 Badourc8375042021-02-12 21:02:31 -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,
Hyundo Moonda8546d2021-01-05 10:50:04 +090027 java_libs: [
28 "updatable-media",
29 "service-media-s",
30 ],
Dongwon Kang8bd93d32019-05-03 14:58:08 +000031 multilib: {
32 first: {
33 // Extractor process runs only with the primary ABI.
34 native_shared_libs: [
35 // Extractor plugins
36 "libaacextractor",
37 "libamrextractor",
38 "libflacextractor",
39 "libmidiextractor",
40 "libmkvextractor",
41 "libmp3extractor",
42 "libmp4extractor",
43 "libmpeg2extractor",
44 "liboggextractor",
45 "libwavextractor",
46 ],
Chong Zhanga2e3a042020-10-26 11:58:11 -070047 // Transcoding service only run with primary ABI.
48 binaries: [
49 "mediatranscoding",
50 ],
Dongwon Kang8bd93d32019-05-03 14:58:08 +000051 },
52 },
Santiago Seifertef893d42020-11-13 17:36:40 +000053 // JNI
54 native_shared_libs: ["libmediaparser-jni"],
55 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 Essick44574862020-02-13 12:39:14 -080059 "crash_dump.policy",
Chong Zhanga2e3a042020-10-26 11:58:11 -070060 "mediaextractor.policy",
61 "media-linker-config",
Marco Nelissen80e1a6d2019-04-30 15:52:10 -070062 ],
Dongwon Kang1d3b2e72018-11-13 13:58:38 -080063 key: "com.android.media.key",
Jiyong Park3ef4f712019-02-11 11:00:31 +090064 certificate: ":com.android.media.certificate",
Jeff Hamilton0bce0c62019-03-06 22:23:40 -050065
66 // Use a custom AndroidManifest.xml used for API targeting.
67 androidManifest: ":com.android.media-androidManifest",
Jooyung Han97d7b652020-03-12 18:22:20 +090068
69 // IMPORTANT: For the APEX to be installed on Android 10 (API 29),
70 // min_sdk_version should be 29. This enables the build system to make
71 // 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.
Jooyung Han80ec0df2020-03-09 13:10:12 +090076 min_sdk_version: "29",
Dongwon Kangb188ad82018-11-09 16:05:43 -080077}
78
Chong Zhang0b83feb2018-12-20 17:44:13 -080079apex {
Dongwon Kang28052d52019-02-14 21:49:08 -080080 name: "com.android.media",
81 manifest: "manifest.json",
82 defaults: ["com.android.media-defaults"],
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090083}
84
Kiyoung Kimb5aa33d2020-10-06 17:43:40 +090085linker_config {
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090086 name: "media-linker-config",
Kiyoung Kimb5aa33d2020-10-06 17:43:40 +090087 src: "linker.config.json",
Kiyoung Kim0c5ccf42020-09-09 14:17:30 +090088 installable: false,
Dongwon Kang28052d52019-02-14 21:49:08 -080089}
90
Jeff Hamilton0bce0c62019-03-06 22:23:40 -050091filegroup {
92 name: "com.android.media-androidManifest",
93 srcs: ["AndroidManifest-media.xml"],
94}
95
96filegroup {
97 name: "com.android.media.swcodec-androidManifest",
98 srcs: ["AndroidManifest-swcodec.xml"],
99}
100
Dongwon Kang28052d52019-02-14 21:49:08 -0800101apex_defaults {
102 name: "com.android.media.swcodec-defaults",
Jiyong Park61984712020-02-24 18:36:41 +0900103 updatable: true,
Chong Zhang9bda4522019-02-27 13:43:50 -0800104 binaries: [
105 "mediaswcodec",
106 ],
Chong Zhang9206c3a2020-12-15 10:00:00 -0800107 native_shared_libs: [
Wonsik Kima5a1ad12021-02-19 12:09:38 -0800108 "libcodec2_hidl@1.0",
109 "libcodec2_hidl@1.1",
Chong Zhang9206c3a2020-12-15 10:00:00 -0800110 "libstagefright_foundation",
111 ],
Chong Zhang9bda4522019-02-27 13:43:50 -0800112 prebuilts: [
113 "com.android.media.swcodec-mediaswcodec.rc",
114 "com.android.media.swcodec-ld.config.txt",
115 "mediaswcodec.policy",
Ray Essick44574862020-02-13 12:39:14 -0800116 "code_coverage.policy",
117 "crash_dump.policy",
Lajos Molnar882d2382019-04-08 17:47:33 -0700118 "mediaswcodec.xml",
Chong Zhang0b83feb2018-12-20 17:44:13 -0800119 ],
Chong Zhang0b83feb2018-12-20 17:44:13 -0800120 key: "com.android.media.swcodec.key",
Jiyong Park77057912019-02-11 12:30:20 +0900121 certificate: ":com.android.media.swcodec.certificate",
Jeff Hamilton0bce0c62019-03-06 22:23:40 -0500122
123 // Use a custom AndroidManifest.xml used for API targeting.
124 androidManifest: ":com.android.media.swcodec-androidManifest",
Jooyung Han97d7b652020-03-12 18:22:20 +0900125
126 // IMPORTANT: For the APEX to be installed on Android 10 (API 29),
127 // min_sdk_version should be 29. This enables the build system to make
128 // sure the package compatible to Android 10 in two ways:
129 // - build the APEX package compatible to Android 10
130 // so that the package can be installed.
131 // - build artifacts (lib/javalib/bin) against Android 10 SDK
132 // so that the artifacts can run.
Jooyung Han80ec0df2020-03-09 13:10:12 +0900133 min_sdk_version: "29",
Chong Zhang0b83feb2018-12-20 17:44:13 -0800134}
135
Chong Zhang9bda4522019-02-27 13:43:50 -0800136prebuilt_etc {
Chong Zhanga2e3a042020-10-26 11:58:11 -0700137 name: "com.android.media-mediatranscoding.rc",
138 src: "mediatranscoding.rc",
139 filename: "init.rc",
140 installable: false,
141}
142
143prebuilt_etc {
Chong Zhang9bda4522019-02-27 13:43:50 -0800144 name: "com.android.media.swcodec-mediaswcodec.rc",
145 src: "mediaswcodec.rc",
146 filename: "init.rc",
147 installable: false,
148}
149
150prebuilt_etc {
151 name: "com.android.media.swcodec-ld.config.txt",
152 src: "ld.config.txt",
153 filename: "ld.config.txt",
154 installable: false,
155}
156
Dongwon Kang28052d52019-02-14 21:49:08 -0800157apex {
158 name: "com.android.media.swcodec",
159 manifest: "manifest_codec.json",
160 defaults: ["com.android.media.swcodec-defaults"],
161}
162
Dongwon Kangb188ad82018-11-09 16:05:43 -0800163apex_key {
Dongwon Kang1d3b2e72018-11-13 13:58:38 -0800164 name: "com.android.media.key",
Jiyong Park7733ba62018-11-22 16:28:07 +0900165 public_key: "com.android.media.avbpubkey",
166 private_key: "com.android.media.pem",
Dongwon Kangb188ad82018-11-09 16:05:43 -0800167}
Chong Zhang0b83feb2018-12-20 17:44:13 -0800168
169apex_key {
170 name: "com.android.media.swcodec.key",
171 public_key: "com.android.media.swcodec.avbpubkey",
172 private_key: "com.android.media.swcodec.pem",
173}
Jiyong Park3ef4f712019-02-11 11:00:31 +0900174
175android_app_certificate {
176 name: "com.android.media.certificate",
177 certificate: "com.android.media",
178}
Jiyong Park77057912019-02-11 12:30:20 +0900179
180android_app_certificate {
181 name: "com.android.media.swcodec.certificate",
182 certificate: "com.android.media.swcodec",
183}