Ray Essick | 1831f7b | 2021-03-15 16:10:51 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2021 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 | |
| 17 | |
| 18 | // these headers include the structure of needed function pointers |
| 19 | cc_library_headers { |
| 20 | name: "libmediaformatshaper_headers", |
| 21 | export_include_dirs: ["include"], |
| 22 | apex_available: [ |
| 23 | "//apex_available:platform", |
| 24 | "com.android.media", |
| 25 | ], |
| 26 | min_sdk_version: "29", |
| 27 | host_supported: true, |
| 28 | target: { |
| 29 | darwin: { |
| 30 | enabled: false, |
| 31 | }, |
| 32 | }, |
| 33 | } |
| 34 | |
| 35 | cc_defaults { |
| 36 | name: "libmediaformatshaper_defaults", |
| 37 | srcs: [ |
| 38 | "CodecProperties.cpp", |
| 39 | "FormatShaper.cpp", |
| 40 | "ManageShapingCodecs.cpp", |
| 41 | "VideoShaper.cpp", |
| 42 | "VQApply.cpp", |
| 43 | ], |
| 44 | |
| 45 | local_include_dirs: [ |
| 46 | "include", |
| 47 | ], |
| 48 | |
| 49 | shared_libs: [ |
| 50 | "liblog", |
| 51 | "libutils", |
| 52 | ], |
| 53 | |
| 54 | cflags: [ |
| 55 | "-Werror", |
| 56 | "-Wall", |
| 57 | "-fvisibility=hidden", |
| 58 | "-Wthread-safety", // enables GUARDED_BY() |
| 59 | ], |
| 60 | |
| 61 | target: { |
| 62 | android: { |
| 63 | shared_libs: [ |
| 64 | "libmediandk#29", |
| 65 | ], |
| 66 | }, |
| 67 | }, |
| 68 | |
| 69 | sanitize: { |
| 70 | cfi: true, |
| 71 | misc_undefined: [ |
| 72 | "unsigned-integer-overflow", |
| 73 | "signed-integer-overflow", |
| 74 | ], |
| 75 | }, |
| 76 | } |
| 77 | |
| 78 | cc_library { |
| 79 | name: "libmediaformatshaper", |
| 80 | defaults: ["libmediaformatshaper_defaults"], |
| 81 | |
| 82 | min_sdk_version: "29", |
| 83 | |
| 84 | apex_available: [ |
| 85 | "//apex_available:platform", |
| 86 | "com.android.media", |
| 87 | ], |
| 88 | |
| 89 | version_script: "exports.lds", |
| 90 | |
| 91 | } |