1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "frameworks_av_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["frameworks_av_license"], 8} 9 10cc_library_headers { 11 name: "libcodec2_internal", 12 13 export_include_dirs: [ 14 "internal", 15 ], 16 17 // TODO: Remove this when this module is moved back to frameworks/av. 18 vendor_available: true, 19 20 min_sdk_version: "29", 21 apex_available: [ 22 "//apex_available:platform", 23 "com.android.media.swcodec", 24 ], 25 26} 27 28cc_library_headers { 29 name: "libcodec2_vndk_headers", 30 vendor_available: true, 31 min_sdk_version: "29", 32 33 export_include_dirs: [ 34 "include", 35 ], 36 apex_available: [ 37 "//apex_available:platform", 38 "com.android.media.swcodec", 39 ], 40} 41 42// !!!DO NOT DEPEND ON THIS SHARED LIBRARY DIRECTLY!!! 43// use libcodec2-impl-defaults instead 44cc_library { 45 name: "libcodec2_vndk", 46 vendor_available: true, 47 min_sdk_version: "29", 48 // TODO: b/147147883 49 double_loadable: true, 50 apex_available: [ 51 "//apex_available:platform", 52 "com.android.media.swcodec", 53 ], 54 55 56 srcs: [ 57 "C2AllocatorBlob.cpp", 58 "C2AllocatorIon.cpp", 59 "C2AllocatorGralloc.cpp", 60 "C2Buffer.cpp", 61 "C2Config.cpp", 62 "C2DmaBufAllocator.cpp", 63 "C2Fence.cpp", 64 "C2PlatformStorePluginLoader.cpp", 65 "C2Store.cpp", 66 "platform/C2BqBuffer.cpp", 67 "platform/C2SurfaceSyncObj.cpp", 68 "types.cpp", 69 "util/C2Debug.cpp", 70 "util/C2InterfaceHelper.cpp", 71 "util/C2InterfaceUtils.cpp", 72 "util/C2ParamUtils.cpp", 73 ], 74 75 export_include_dirs: [ 76 "include", 77 ], 78 79 export_shared_lib_headers: [ 80 "libbase", 81 "libdmabufheap", 82 "android.hardware.media.bufferpool@2.0", 83 "android.hardware.media.bufferpool2-V1-ndk", 84 ], 85 86 local_include_dirs: [ 87 "internal", 88 ], 89 90 header_libs: [ 91 "media_plugin_headers", 92 "libcodec2_headers", 93 ], 94 95 shared_libs: [ 96 "android.hardware.graphics.bufferqueue@2.0", 97 "android.hardware.graphics.common@1.2", 98 "android.hardware.common-V2-ndk", 99 "android.hardware.common.fmq-V1-ndk", 100 "android.hardware.media.bufferpool@2.0", 101 "android.hardware.media.bufferpool2-V1-ndk", 102 "libbase", 103 "libbinder_ndk", 104 "libcutils", 105 "libdl", 106 "libdmabufheap", 107 "libfmq", 108 "libgralloctypes", 109 "libhidlbase", 110 "libion", 111 "liblog", 112 "libnativewindow", 113 "libstagefright_foundation", 114 "libstagefright_bufferpool@2.0.1", 115 "libstagefright_aidl_bufferpool2", 116 "libui", 117 "libutils", 118 ], 119 120 cflags: [ 121 "-Werror", 122 "-Wall", 123 ], 124} 125 126// public dependency for statically linking to libcodec2_vndk for unit tests 127cc_defaults { 128 name: "libcodec2-static-defaults", 129 130 static_libs: [ 131 "liblog", 132 "libion", 133 "libfmq", 134 "libbase", 135 "libutils", 136 "libcutils", 137 "libcodec2", 138 "libhidlbase", 139 "libdmabufheap", 140 "libcodec2_vndk", 141 "libnativewindow", 142 "libcodec2_soft_common", 143 "libsfplugin_ccodec_utils", 144 "libstagefright_aidl_bufferpool2", 145 "libstagefright_foundation", 146 "libstagefright_bufferpool@2.0.1", 147 "libgralloctypes", 148 "android.hardware.graphics.mapper@2.0", 149 "android.hardware.graphics.mapper@3.0", 150 "android.hardware.media.bufferpool@2.0", 151 "android.hardware.graphics.allocator@2.0", 152 "android.hardware.graphics.allocator@3.0", 153 "android.hardware.graphics.bufferqueue@2.0", 154 "android.hardware.common-V2-ndk", 155 "android.hardware.common.fmq-V1-ndk", 156 "android.hardware.media.bufferpool2-V1-ndk", 157 ], 158 159 shared_libs: [ 160 "libbinder_ndk", 161 "libui", 162 "libdl", 163 "libvndksupport", 164 "libprocessgroup", 165 ], 166} 167 168// public dependency for implementing Codec 2 components 169cc_defaults { 170 name: "libcodec2-impl-defaults", 171 172 shared_libs: [ 173 "libbase", // for C2_LOG 174 "liblog", // for ALOG 175 "libcodec2", 176 "libcodec2_vndk", 177 "libutils", 178 ], 179 180 min_sdk_version: "29", 181} 182 183// public dependency for implementing Codec 2 framework utilities 184// THIS IS ONLY FOR FRAMEWORK USE ONLY 185cc_defaults { 186 name: "libcodec2-internal-defaults", 187 defaults: ["libcodec2-impl-defaults"], 188 189 header_libs: [ 190 "libcodec2_internal", 191 ], 192 193 shared_libs: [ 194 "libcutils", // for properties 195 ], 196 197 // TODO: separate internal headers so they can be exposed here 198} 199