• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// libmediadrm
3//
4
5package {
6    // See: http://go/android-license-faq
7    // A large-scale-change added 'default_applicable_licenses' to import
8    // all of the 'license_kinds' from "frameworks_av_license"
9    // to get the below license kinds:
10    //   SPDX-license-identifier-Apache-2.0
11    default_applicable_licenses: ["frameworks_av_license"],
12}
13
14cc_library_headers {
15    name: "libmediadrm_headers",
16
17    export_include_dirs: [
18        "interface"
19    ],
20
21}
22
23cc_library {
24    name: "libmediadrm",
25
26    srcs: [
27        "DrmPluginPath.cpp",
28        "DrmSessionManager.cpp",
29        "SharedLibrary.cpp",
30        "DrmHal.cpp",
31        "DrmHalHidl.cpp",
32        "DrmHalAidl.cpp",
33        "CryptoHal.cpp",
34        "CryptoHalHidl.cpp",
35        "CryptoHalAidl.cpp",
36        "DrmUtils.cpp",
37        "DrmHalListener.cpp",
38    ],
39
40    local_include_dirs: [
41        "include",
42        "interface"
43    ],
44
45    export_include_dirs: [
46        "include"
47    ],
48
49    header_libs: [
50        "libmedia_headers",
51    ],
52
53    shared_libs: [
54        "libbinder_ndk",
55        "libcutils",
56        "libdl",
57        "liblog",
58        "libmedia",
59        "libmediadrmmetrics_lite",
60        "libmediametrics#1",
61        "libmediautils",
62        "libstagefright_foundation",
63        "libutils",
64        "android.hardware.drm@1.0",
65        "android.hardware.drm@1.1",
66        "android.hardware.drm@1.2",
67        "android.hardware.drm@1.3",
68        "android.hardware.drm@1.4",
69        "libhidlallocatorutils",
70        "libhidlbase",
71        "android.hardware.drm-V1-ndk",
72    ],
73
74    static_libs: [
75        "resourcemanager_aidl_interface-ndk",
76        "libaidlcommonsupport",
77    ],
78
79    export_shared_lib_headers: [
80        "android.hardware.drm@1.0",
81        "android.hardware.drm@1.1",
82        "android.hardware.drm@1.2",
83        "android.hardware.drm@1.4",
84    ],
85
86    cflags: [
87        "-Werror",
88        "-Wall",
89    ],
90}
91
92// This is the version of the drm metrics configured for protobuf lite.
93cc_library_shared {
94    name: "libmediadrmmetrics_lite",
95    srcs: [
96        "DrmMetrics.cpp",
97        "PluginMetricsReporting.cpp",
98        "protos/metrics.proto",
99    ],
100
101    local_include_dirs: [
102        "include"
103    ],
104
105    proto: {
106        export_proto_headers: true,
107        type: "lite",
108    },
109    header_libs: [
110        "libmedia_headers",
111    ],
112    shared_libs: [
113        "android.hardware.drm@1.0",
114        "android.hardware.drm@1.1",
115        "android.hardware.drm@1.2",
116        "liblog",
117        "libmediametrics",
118        "libprotobuf-cpp-lite",
119        "libutils",
120    ],
121    cflags: [
122        // Suppress unused parameter and no error options. These cause problems
123        // with the when using the map type in a proto definition.
124        "-Wno-unused-parameter",
125    ],
126}
127
128// This is the version of the drm metrics library configured for full protobuf.
129cc_library_shared {
130    name: "libmediadrmmetrics_full",
131    srcs: [
132        "DrmMetrics.cpp",
133        "PluginMetricsReporting.cpp",
134        "protos/metrics.proto",
135    ],
136
137    local_include_dirs: [
138        "include"
139    ],
140
141    proto: {
142        export_proto_headers: true,
143        type: "full",
144    },
145    header_libs: [
146        "libmedia_headers",
147    ],
148    shared_libs: [
149        "android.hardware.drm@1.0",
150        "android.hardware.drm@1.1",
151        "android.hardware.drm@1.2",
152        "libbase",
153        "liblog",
154        "libmediametrics",
155        "libprotobuf-cpp-full",
156        "libstagefright_foundation",
157        "libutils",
158    ],
159    cflags: [
160        // Suppress unused parameter and no error options. These cause problems
161        // when using the map type in a proto definition.
162        "-Wno-unused-parameter",
163    ],
164}
165
166cc_library_shared {
167    name: "libmediadrmmetrics_consumer",
168    srcs: [
169        "DrmMetricsConsumer.cpp",
170    ],
171
172    shared_libs: [
173        "android.hardware.drm@1.0",
174        "android.hardware.drm@1.1",
175        "android.hardware.drm@1.2",
176        "libbinder",
177        "libhidlbase",
178        "liblog",
179        "libmediadrm",
180        "libmediadrmmetrics_full",
181        "libutils",
182    ],
183
184    header_libs: [
185        "libmediametrics_headers",
186        "libstagefright_foundation_headers",
187        "libmedia_headers",
188    ],
189}
190