| /* |
| * Copyright (C) 2020 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "frameworks_av_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["frameworks_av_license"], |
| } |
| |
| filegroup { |
| name: "libmediatranscoding_aidl", |
| srcs: [ |
| "aidl/android/media/IMediaTranscodingService.aidl", |
| "aidl/android/media/ITranscodingClient.aidl", |
| "aidl/android/media/ITranscodingClientCallback.aidl", |
| "aidl/android/media/TranscodingErrorCode.aidl", |
| "aidl/android/media/TranscodingSessionPriority.aidl", |
| "aidl/android/media/TranscodingSessionStats.aidl", |
| "aidl/android/media/TranscodingType.aidl", |
| "aidl/android/media/TranscodingVideoCodecType.aidl", |
| "aidl/android/media/TranscodingVideoTrackFormat.aidl", |
| "aidl/android/media/TranscodingSessionParcel.aidl", |
| "aidl/android/media/TranscodingRequestParcel.aidl", |
| "aidl/android/media/TranscodingResultParcel.aidl", |
| "aidl/android/media/TranscodingTestConfig.aidl", |
| ], |
| path: "aidl", |
| } |
| |
| // AIDL interfaces of MediaTranscoding. |
| aidl_interface { |
| name: "mediatranscoding_aidl_interface", |
| unstable: true, |
| local_include_dir: "aidl", |
| srcs: [":libmediatranscoding_aidl"], |
| backend: |
| { |
| java: { |
| enabled: true, |
| apex_available: [ |
| "com.android.media", |
| "test_com.android.media", |
| ], |
| min_sdk_version: "29", |
| }, |
| ndk: { |
| enabled: true, |
| apex_available: [ |
| "com.android.media", |
| "test_com.android.media", |
| ], |
| min_sdk_version: "29", |
| }, |
| }, |
| } |
| |
| cc_library { |
| name: "libmediatranscoding", |
| |
| min_sdk_version: "29", |
| apex_available: [ |
| "com.android.media", |
| "test_com.android.media", |
| ], |
| |
| srcs: [ |
| "TranscoderWrapper.cpp", |
| "TranscodingClientManager.cpp", |
| "TranscodingResourcePolicy.cpp", |
| "TranscodingSessionController.cpp", |
| "TranscodingThermalPolicy.cpp", |
| "TranscodingUidPolicy.cpp", |
| ], |
| |
| shared_libs: [ |
| "libandroid#31", |
| "libbinder_ndk", |
| "libcutils", |
| "liblog", |
| "libutils", |
| "libmediatranscoder", |
| "libmediandk", |
| ], |
| export_shared_lib_headers: [ |
| "libmediandk", |
| ], |
| |
| export_include_dirs: ["include"], |
| |
| static_libs: [ |
| "mediatranscoding_aidl_interface-ndk_platform", |
| "resourceobserver_aidl_interface-V1-ndk_platform", |
| ], |
| |
| cflags: [ |
| "-Wall", |
| "-Werror", |
| "-Wformat", |
| "-Wno-error=deprecated-declarations", |
| "-Wthread-safety", |
| "-Wunused", |
| "-Wunreachable-code", |
| ], |
| |
| sanitize: { |
| misc_undefined: [ |
| "unsigned-integer-overflow", |
| "signed-integer-overflow", |
| ], |
| cfi: true, |
| }, |
| } |