blob: 534fa91b27e7e06c73ce62801ceeb2d97259ac60 [file] [log] [blame]
hkuang26587cb2020-01-16 10:36:08 -08001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Bob Badour56786ac2021-02-25 15:24:36 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "frameworks_av_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["frameworks_av_license"],
24}
25
hkuang0627dbf2020-08-25 13:53:56 -070026filegroup {
27 name: "libmediatranscoding_aidl",
Hangyu Kuang06069a52019-11-26 15:28:36 -080028 srcs: [
29 "aidl/android/media/IMediaTranscodingService.aidl",
Chong Zhang8e062632020-03-31 10:56:37 -070030 "aidl/android/media/ITranscodingClient.aidl",
Chong Zhang6d58e4b2020-03-31 09:41:10 -070031 "aidl/android/media/ITranscodingClientCallback.aidl",
Hangyu Kuang06069a52019-11-26 15:28:36 -080032 "aidl/android/media/TranscodingErrorCode.aidl",
Chong Zhangbc062482020-10-14 16:43:53 -070033 "aidl/android/media/TranscodingSessionPriority.aidl",
34 "aidl/android/media/TranscodingSessionStats.aidl",
Hangyu Kuang06069a52019-11-26 15:28:36 -080035 "aidl/android/media/TranscodingType.aidl",
36 "aidl/android/media/TranscodingVideoCodecType.aidl",
hkuangb6f39b32020-05-12 14:44:14 -070037 "aidl/android/media/TranscodingVideoTrackFormat.aidl",
Chong Zhangbc062482020-10-14 16:43:53 -070038 "aidl/android/media/TranscodingSessionParcel.aidl",
hkuang48c365e2020-01-13 16:33:42 -080039 "aidl/android/media/TranscodingRequestParcel.aidl",
40 "aidl/android/media/TranscodingResultParcel.aidl",
hkuang22d6ae82020-05-27 11:05:55 -070041 "aidl/android/media/TranscodingTestConfig.aidl",
Hangyu Kuang06069a52019-11-26 15:28:36 -080042 ],
hkuang0627dbf2020-08-25 13:53:56 -070043 path: "aidl",
44}
45
46// AIDL interfaces of MediaTranscoding.
47aidl_interface {
48 name: "mediatranscoding_aidl_interface",
49 unstable: true,
50 local_include_dir: "aidl",
51 srcs: [":libmediatranscoding_aidl"],
hkuangf6f372a2020-05-01 16:21:39 -070052 backend:
53 {
54 java: {
55 enabled: true,
Chong Zhanga2e3a042020-10-26 11:58:11 -070056 apex_available: [
57 "com.android.media",
58 "test_com.android.media",
59 ],
60 min_sdk_version: "29",
61 },
62 ndk: {
63 enabled: true,
64 apex_available: [
65 "com.android.media",
66 "test_com.android.media",
67 ],
68 min_sdk_version: "29",
hkuangf6f372a2020-05-01 16:21:39 -070069 },
70 },
Hangyu Kuang06069a52019-11-26 15:28:36 -080071}
hkuang26587cb2020-01-16 10:36:08 -080072
Chong Zhang4c542062020-12-08 16:38:09 -080073cc_library {
hkuang26587cb2020-01-16 10:36:08 -080074 name: "libmediatranscoding",
75
Chong Zhanga2e3a042020-10-26 11:58:11 -070076 min_sdk_version: "29",
77 apex_available: [
78 "com.android.media",
79 "test_com.android.media",
80 ],
81
hkuang26587cb2020-01-16 10:36:08 -080082 srcs: [
Dan Albertb253cec2021-01-21 20:28:04 +000083 "TranscoderWrapper.cpp",
Chong Zhang8677f1f2021-01-21 20:37:35 +000084 "TranscodingClientManager.cpp",
85 "TranscodingResourcePolicy.cpp",
86 "TranscodingSessionController.cpp",
87 "TranscodingThermalPolicy.cpp",
88 "TranscodingUidPolicy.cpp",
hkuang26587cb2020-01-16 10:36:08 -080089 ],
90
91 shared_libs: [
Chong Zhanga2e3a042020-10-26 11:58:11 -070092 "libandroid#31",
hkuang26587cb2020-01-16 10:36:08 -080093 "libbinder_ndk",
94 "libcutils",
95 "liblog",
96 "libutils",
hkuang6709a932020-04-16 18:22:00 -070097 "libmediatranscoder",
Chong Zhang66469272020-06-04 16:51:55 -070098 "libmediandk",
hkuang26587cb2020-01-16 10:36:08 -080099 ],
Chong Zhangf9077512020-09-21 21:02:06 -0700100 export_shared_lib_headers: [
101 "libmediandk",
102 ],
hkuang26587cb2020-01-16 10:36:08 -0800103
104 export_include_dirs: ["include"],
105
106 static_libs: [
107 "mediatranscoding_aidl_interface-ndk_platform",
Jeongik Cha7f2285b2021-01-28 00:49:46 +0900108 "resourceobserver_aidl_interface-V1-ndk_platform",
hkuang26587cb2020-01-16 10:36:08 -0800109 ],
110
111 cflags: [
hkuang26587cb2020-01-16 10:36:08 -0800112 "-Wall",
hkuang08b38d02020-04-17 14:29:33 -0700113 "-Werror",
114 "-Wformat",
115 "-Wno-error=deprecated-declarations",
116 "-Wthread-safety",
117 "-Wunused",
118 "-Wunreachable-code",
hkuang26587cb2020-01-16 10:36:08 -0800119 ],
120
121 sanitize: {
122 misc_undefined: [
123 "unsigned-integer-overflow",
124 "signed-integer-overflow",
125 ],
126 cfi: true,
127 },
128}