blob: 9cc0600412b9c6358a7c979cd4d4364066c7ae6d [file] [log] [blame]
Robert Shih2194bb42021-01-16 20:29:56 -08001/**
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 */
16package android.hardware.drm@1.4;
17
18import @1.1::SecurityLevel;
19import @1.2::IDrmPlugin;
20
21/**
22 * IDrmPlugin is used to interact with a specific drm plugin that was
23 * created by IDrmFactory::createPlugin. A drm plugin provides methods for
24 * obtaining drm keys to be used by a codec to decrypt protected video
25 * content.
26 */
27interface IDrmPlugin extends @1.2::IDrmPlugin {
28
29 /**
30 * Check if the specified mime-type & security level require a secure decoder
31 * component.
32 *
33 * @param mime The content mime-type
34 * @param level the requested security level
35 * @return secureRequired must be true if and only if a secure decoder is required
36 * for the specified mime-type & security level
37 */
38 requiresSecureDecoder(string mime, @1.1::SecurityLevel level) generates (bool secureRequired);
39
40 /**
41 * Check if the specified mime-type requires a secure decoder component
42 * at the highest security level supported on the device.
43 *
44 * @param mime The content mime-type
45 * @return secureRequired must be true if and only if a secure decoder is required
46 * for the specified mime-type
47 */
48 requiresSecureDecoderDefault(string mime) generates (bool secureRequired);
49
50};