Disable Enhanced Bookmark for ICS devices
[chromium-blink-merge.git] / media / base / eme_constants.h
blob4462c5cc0b251686c30bb1ef99b5a716248d7710
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_EME_CONSTANTS_H_
6 #define MEDIA_BASE_EME_CONSTANTS_H_
8 #include <stdint.h>
10 namespace media {
12 // Defines bitmask values that specify registered initialization data types used
13 // in Encrypted Media Extensions (EME).
14 // The mask values are stored in a SupportedInitDataTypes.
15 enum EmeInitDataType {
16 EME_INIT_DATA_TYPE_NONE = 0,
17 EME_INIT_DATA_TYPE_WEBM = 1 << 0,
18 #if defined(USE_PROPRIETARY_CODECS)
19 EME_INIT_DATA_TYPE_CENC = 1 << 1,
20 #endif // defined(USE_PROPRIETARY_CODECS)
23 // Defines bitmask values that specify codecs used in Encrypted Media Extension
24 // (EME). Each value represents a codec within a specific container.
25 // The mask values are stored in a SupportedCodecs.
26 enum EmeCodec {
27 // *_ALL values should only be used for masking, do not use them to specify
28 // codec support because they may be extended to include more codecs.
29 EME_CODEC_NONE = 0,
30 EME_CODEC_WEBM_OPUS = 1 << 0,
31 EME_CODEC_WEBM_VORBIS = 1 << 1,
32 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_OPUS | EME_CODEC_WEBM_VORBIS,
33 EME_CODEC_WEBM_VP8 = 1 << 2,
34 EME_CODEC_WEBM_VP9 = 1 << 3,
35 EME_CODEC_WEBM_VIDEO_ALL = (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9),
36 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL),
37 #if defined(USE_PROPRIETARY_CODECS)
38 EME_CODEC_MP4_AAC = 1 << 4,
39 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC,
40 EME_CODEC_MP4_AVC1 = 1 << 5,
41 EME_CODEC_MP4_VIDEO_ALL = EME_CODEC_MP4_AVC1,
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),
44 #else
45 EME_CODEC_ALL = EME_CODEC_WEBM_ALL,
46 #endif // defined(USE_PROPRIETARY_CODECS)
49 typedef uint32_t SupportedInitDataTypes;
50 typedef uint32_t SupportedCodecs;
52 enum EmeSessionTypeSupport {
53 // Invalid default value.
54 EME_SESSION_TYPE_INVALID,
55 // The session type is not supported.
56 EME_SESSION_TYPE_NOT_SUPPORTED,
57 // The session type is supported if the encrypted media permission is granted.
58 EME_SESSION_TYPE_SUPPORTED_WITH_PERMISSION,
59 // The session type is always supported.
60 EME_SESSION_TYPE_SUPPORTED,
63 enum EmeFeatureSupport {
64 // Invalid default value.
65 EME_FEATURE_INVALID,
66 // Access to the feature is not supported at all.
67 EME_FEATURE_NOT_SUPPORTED,
68 // Access to the feature may be requested if the encrypted media permission is
69 // granted.
70 EME_FEATURE_REQUESTABLE_WITH_PERMISSION,
71 // Access to the feature may be requested.
72 EME_FEATURE_REQUESTABLE,
73 // Access to the feature cannot be blocked.
74 EME_FEATURE_ALWAYS_ENABLED,
77 enum EmeFeatureRequirement {
78 EME_FEATURE_NOT_ALLOWED,
79 EME_FEATURE_OPTIONAL,
80 EME_FEATURE_REQUIRED,
83 } // namespace media
85 #endif // MEDIA_BASE_EME_CONSTANTS_H_