Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Side by Side Diff: media/base/eme_constants.h

Issue 1005903003: Implement robustness strings in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarify CrOS Widevine robustness rules. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_EME_CONSTANTS_H_ 5 #ifndef MEDIA_BASE_EME_CONSTANTS_H_
6 #define MEDIA_BASE_EME_CONSTANTS_H_ 6 #define MEDIA_BASE_EME_CONSTANTS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 namespace media { 10 namespace media {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 EME_CODEC_MP4_ALL = (EME_CODEC_MP4_AUDIO_ALL | EME_CODEC_MP4_VIDEO_ALL), 42 EME_CODEC_MP4_ALL = (EME_CODEC_MP4_AUDIO_ALL | EME_CODEC_MP4_VIDEO_ALL),
43 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL), 43 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL),
44 #else 44 #else
45 EME_CODEC_ALL = EME_CODEC_WEBM_ALL, 45 EME_CODEC_ALL = EME_CODEC_WEBM_ALL,
46 #endif // defined(USE_PROPRIETARY_CODECS) 46 #endif // defined(USE_PROPRIETARY_CODECS)
47 }; 47 };
48 48
49 typedef uint32_t SupportedInitDataTypes; 49 typedef uint32_t SupportedInitDataTypes;
50 typedef uint32_t SupportedCodecs; 50 typedef uint32_t SupportedCodecs;
51 51
52 // Note: The encrypted media permission, referenced in several enums below, is
53 // equivalent to access to a distinctive identifier. For Widevine, we assume
54 // that it is equivalent to remote attestation succeeding. (Remote attestation
ddorwin 2015/03/18 01:08:04 This only applies to Chrome OS. That should be cle
sandersd (OOO until July 31) 2015/03/18 20:41:37 Done.
55 // can fail for other reasons, but those reasons are not yet considered.)
56
52 enum EmeSessionTypeSupport { 57 enum EmeSessionTypeSupport {
53 // Invalid default value. 58 // Invalid default value.
54 EME_SESSION_TYPE_INVALID, 59 EME_SESSION_TYPE_INVALID,
55 // The session type is not supported. 60 // The session type is not supported.
56 EME_SESSION_TYPE_NOT_SUPPORTED, 61 EME_SESSION_TYPE_NOT_SUPPORTED,
57 // The session type is supported if the encrypted media permission is granted. 62 // The session type is supported if the encrypted media permission is granted.
58 EME_SESSION_TYPE_SUPPORTED_WITH_PERMISSION, 63 EME_SESSION_TYPE_SUPPORTED_WITH_PERMISSION,
59 // The session type is always supported. 64 // The session type is always supported.
60 EME_SESSION_TYPE_SUPPORTED, 65 EME_SESSION_TYPE_SUPPORTED,
61 }; 66 };
62 67
68 // Used to declare support for distinctive identifier and persistent state.
63 enum EmeFeatureSupport { 69 enum EmeFeatureSupport {
64 // Invalid default value. 70 // Invalid default value.
65 EME_FEATURE_INVALID, 71 EME_FEATURE_INVALID,
66 // Access to the feature is not supported at all. 72 // Access to the feature is not supported at all.
67 EME_FEATURE_NOT_SUPPORTED, 73 EME_FEATURE_NOT_SUPPORTED,
68 // Access to the feature may be requested if the encrypted media permission is 74 // Access to the feature may be requested if the encrypted media permission is
69 // granted. 75 // granted.
70 EME_FEATURE_REQUESTABLE_WITH_PERMISSION, 76 EME_FEATURE_REQUESTABLE_WITH_PERMISSION,
71 // Access to the feature may be requested. 77 // Access to the feature may be requested.
72 EME_FEATURE_REQUESTABLE, 78 EME_FEATURE_REQUESTABLE,
73 // Access to the feature cannot be blocked. 79 // Access to the feature cannot be blocked.
74 EME_FEATURE_ALWAYS_ENABLED, 80 EME_FEATURE_ALWAYS_ENABLED,
75 }; 81 };
76 82
83 // Used to query support for distinctive identifier and persistent state.
77 enum EmeFeatureRequirement { 84 enum EmeFeatureRequirement {
78 EME_FEATURE_NOT_ALLOWED, 85 EME_FEATURE_NOT_ALLOWED,
79 EME_FEATURE_OPTIONAL, 86 EME_FEATURE_OPTIONAL,
80 EME_FEATURE_REQUIRED, 87 EME_FEATURE_REQUIRED,
81 }; 88 };
82 89
90 enum class EmeMediaType {
91 AUDIO,
92 VIDEO,
93 };
94
95 // Robustness values understood by KeySystems. Each value imples all those
96 // before it. (This may need to be redesigned to support non-Widevine CDMs.)
97 enum class EmeRobustness {
98 INVALID,
99 EMPTY,
100 SW_SECURE_CRYPTO,
101 SW_SECURE_DECODE,
102 HW_SECURE_CRYPTO,
103 HW_SECURE_DECODE,
104 HW_SECURE_ALL,
105 };
106
107 // Configuration rules indicate the configuration state required to support a
108 // configuration option (note: a configuration option may be disallowing a
109 // feature). Configuration rules are used to answer queries about distinctive
110 // identifier, persistent state, and robustness requirements, as well as to
111 // describe support for different session types.
112 enum class EmeConfigRule {
113 // The configuration option is not supported.
114 NOT_SUPPORTED,
115 // The configuration option is supported if the encrypted media permission is
116 // granted.
117 PERMISSION_REQUIRED,
118 // The configuration option is supported, but the user experience may be
119 // improved if the encrypted media permission is granted.
120 PERMISSION_RECOMMENDED,
121 // The configuration option is supported without conditions.
122 SUPPORTED,
123 };
124
83 } // namespace media 125 } // namespace media
84 126
85 #endif // MEDIA_BASE_EME_CONSTANTS_H_ 127 #endif // MEDIA_BASE_EME_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698