hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 1 | /* |
| 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 Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame^] | 17 | package { |
| 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 | |
hkuang | 0627dbf | 2020-08-25 13:53:56 -0700 | [diff] [blame] | 26 | filegroup { |
| 27 | name: "libmediatranscoding_aidl", |
Hangyu Kuang | 06069a5 | 2019-11-26 15:28:36 -0800 | [diff] [blame] | 28 | srcs: [ |
| 29 | "aidl/android/media/IMediaTranscodingService.aidl", |
Chong Zhang | 8e06263 | 2020-03-31 10:56:37 -0700 | [diff] [blame] | 30 | "aidl/android/media/ITranscodingClient.aidl", |
Chong Zhang | 6d58e4b | 2020-03-31 09:41:10 -0700 | [diff] [blame] | 31 | "aidl/android/media/ITranscodingClientCallback.aidl", |
Hangyu Kuang | 06069a5 | 2019-11-26 15:28:36 -0800 | [diff] [blame] | 32 | "aidl/android/media/TranscodingErrorCode.aidl", |
Chong Zhang | bc06248 | 2020-10-14 16:43:53 -0700 | [diff] [blame] | 33 | "aidl/android/media/TranscodingSessionPriority.aidl", |
| 34 | "aidl/android/media/TranscodingSessionStats.aidl", |
Hangyu Kuang | 06069a5 | 2019-11-26 15:28:36 -0800 | [diff] [blame] | 35 | "aidl/android/media/TranscodingType.aidl", |
| 36 | "aidl/android/media/TranscodingVideoCodecType.aidl", |
hkuang | b6f39b3 | 2020-05-12 14:44:14 -0700 | [diff] [blame] | 37 | "aidl/android/media/TranscodingVideoTrackFormat.aidl", |
Chong Zhang | bc06248 | 2020-10-14 16:43:53 -0700 | [diff] [blame] | 38 | "aidl/android/media/TranscodingSessionParcel.aidl", |
hkuang | 48c365e | 2020-01-13 16:33:42 -0800 | [diff] [blame] | 39 | "aidl/android/media/TranscodingRequestParcel.aidl", |
| 40 | "aidl/android/media/TranscodingResultParcel.aidl", |
hkuang | 22d6ae8 | 2020-05-27 11:05:55 -0700 | [diff] [blame] | 41 | "aidl/android/media/TranscodingTestConfig.aidl", |
Hangyu Kuang | 06069a5 | 2019-11-26 15:28:36 -0800 | [diff] [blame] | 42 | ], |
hkuang | 0627dbf | 2020-08-25 13:53:56 -0700 | [diff] [blame] | 43 | path: "aidl", |
| 44 | } |
| 45 | |
| 46 | // AIDL interfaces of MediaTranscoding. |
| 47 | aidl_interface { |
| 48 | name: "mediatranscoding_aidl_interface", |
| 49 | unstable: true, |
| 50 | local_include_dir: "aidl", |
| 51 | srcs: [":libmediatranscoding_aidl"], |
hkuang | f6f372a | 2020-05-01 16:21:39 -0700 | [diff] [blame] | 52 | backend: |
| 53 | { |
| 54 | java: { |
| 55 | enabled: true, |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 56 | 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", |
hkuang | f6f372a | 2020-05-01 16:21:39 -0700 | [diff] [blame] | 69 | }, |
| 70 | }, |
Hangyu Kuang | 06069a5 | 2019-11-26 15:28:36 -0800 | [diff] [blame] | 71 | } |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 72 | |
Chong Zhang | 4c54206 | 2020-12-08 16:38:09 -0800 | [diff] [blame] | 73 | cc_library { |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 74 | name: "libmediatranscoding", |
| 75 | |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 76 | min_sdk_version: "29", |
| 77 | apex_available: [ |
| 78 | "com.android.media", |
| 79 | "test_com.android.media", |
| 80 | ], |
| 81 | |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 82 | srcs: [ |
Dan Albert | b253cec | 2021-01-21 20:28:04 +0000 | [diff] [blame] | 83 | "TranscoderWrapper.cpp", |
Chong Zhang | 8677f1f | 2021-01-21 20:37:35 +0000 | [diff] [blame] | 84 | "TranscodingClientManager.cpp", |
| 85 | "TranscodingResourcePolicy.cpp", |
| 86 | "TranscodingSessionController.cpp", |
| 87 | "TranscodingThermalPolicy.cpp", |
| 88 | "TranscodingUidPolicy.cpp", |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 89 | ], |
| 90 | |
| 91 | shared_libs: [ |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 92 | "libandroid#31", |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 93 | "libbinder_ndk", |
| 94 | "libcutils", |
| 95 | "liblog", |
| 96 | "libutils", |
hkuang | 6709a93 | 2020-04-16 18:22:00 -0700 | [diff] [blame] | 97 | "libmediatranscoder", |
Chong Zhang | 6646927 | 2020-06-04 16:51:55 -0700 | [diff] [blame] | 98 | "libmediandk", |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 99 | ], |
Chong Zhang | f907751 | 2020-09-21 21:02:06 -0700 | [diff] [blame] | 100 | export_shared_lib_headers: [ |
| 101 | "libmediandk", |
| 102 | ], |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 103 | |
| 104 | export_include_dirs: ["include"], |
| 105 | |
| 106 | static_libs: [ |
| 107 | "mediatranscoding_aidl_interface-ndk_platform", |
Jeongik Cha | 7f2285b | 2021-01-28 00:49:46 +0900 | [diff] [blame] | 108 | "resourceobserver_aidl_interface-V1-ndk_platform", |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 109 | ], |
| 110 | |
| 111 | cflags: [ |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 112 | "-Wall", |
hkuang | 08b38d0 | 2020-04-17 14:29:33 -0700 | [diff] [blame] | 113 | "-Werror", |
| 114 | "-Wformat", |
| 115 | "-Wno-error=deprecated-declarations", |
| 116 | "-Wthread-safety", |
| 117 | "-Wunused", |
| 118 | "-Wunreachable-code", |
hkuang | 26587cb | 2020-01-16 10:36:08 -0800 | [diff] [blame] | 119 | ], |
| 120 | |
| 121 | sanitize: { |
| 122 | misc_undefined: [ |
| 123 | "unsigned-integer-overflow", |
| 124 | "signed-integer-overflow", |
| 125 | ], |
| 126 | cfi: true, |
| 127 | }, |
| 128 | } |