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

Side by Side Diff: content/public/common/eme_constants.h

Issue 557723003: Implement Chromium side of MediaKeys.isTypeSupported(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Requested changes. Created 6 years, 2 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 CONTENT_PUBLIC_COMMON_EME_CODEC_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_EME_CONSTANTS_H_
6 #define CONTENT_PUBLIC_COMMON_EME_CODEC_H_ 6 #define CONTENT_PUBLIC_COMMON_EME_CONSTANTS_H_
7 7
8 namespace content { 8 namespace content {
9 9
10 // Defines bitmask values that specify registered initialization data types used
11 // in Encrypted Media Extensions (EME).
12 // The mask values are stored in a SupportedInitDataTypes.
13 enum EmeInitDataType {
14 EME_INIT_DATA_TYPE_NONE = 0,
15 #if defined(USE_PROPRIETARY_CODECS)
16 EME_INIT_DATA_TYPE_CENC = 1 << 0,
17 #endif // defined(USE_PROPRIETARY_CODECS)
18 EME_INIT_DATA_TYPE_WEBM = 1 << 1,
ddorwin 2014/09/23 22:48:16 nit: WEBM appears first in the other enum - be con
sandersd (OOO until July 31) 2014/09/24 22:22:33 Done.
19 };
20
10 // Defines bitmask values that specify codecs used in Encrypted Media Extension 21 // Defines bitmask values that specify codecs used in Encrypted Media Extension
11 // (EME). Each value represents a codec within a specific container. 22 // (EME). Each value represents a codec within a specific container.
12 // The mask values are stored in a SupportedCodecs. 23 // The mask values are stored in a SupportedCodecs.
13 enum EmeCodec { 24 enum EmeCodec {
ddorwin 2014/09/23 22:48:16 // *_ALL should only be used for checking the cont
sandersd (OOO until July 31) 2014/09/24 22:22:33 Done.
14 EME_CODEC_NONE = 0, 25 EME_CODEC_NONE = 0,
15 EME_CODEC_WEBM_VORBIS = 1 << 0, 26 EME_CODEC_WEBM_VORBIS = 1 << 0,
16 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_VORBIS, 27 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_VORBIS,
17 EME_CODEC_WEBM_VP8 = 1 << 1, 28 EME_CODEC_WEBM_VP8 = 1 << 1,
18 EME_CODEC_WEBM_VP9 = 1 << 2, 29 EME_CODEC_WEBM_VP9 = 1 << 2,
19 EME_CODEC_WEBM_VIDEO_ALL = (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9), 30 EME_CODEC_WEBM_VIDEO_ALL = (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9),
20 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL), 31 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL),
21 #if defined(USE_PROPRIETARY_CODECS) 32 #if defined(USE_PROPRIETARY_CODECS)
22 EME_CODEC_MP4_AAC = 1 << 3, 33 EME_CODEC_MP4_AAC = 1 << 3,
23 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC, 34 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC,
24 EME_CODEC_MP4_AVC1 = 1 << 4, 35 EME_CODEC_MP4_AVC1 = 1 << 4,
25 EME_CODEC_MP4_VIDEO_ALL = EME_CODEC_MP4_AVC1, 36 EME_CODEC_MP4_VIDEO_ALL = EME_CODEC_MP4_AVC1,
26 EME_CODEC_MP4_ALL = (EME_CODEC_MP4_AUDIO_ALL | EME_CODEC_MP4_VIDEO_ALL), 37 EME_CODEC_MP4_ALL = (EME_CODEC_MP4_AUDIO_ALL | EME_CODEC_MP4_VIDEO_ALL),
27 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL), 38 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL),
28 #else 39 #else
29 EME_CODEC_ALL = EME_CODEC_WEBM_ALL, 40 EME_CODEC_ALL = EME_CODEC_WEBM_ALL,
30 #endif // defined(USE_PROPRIETARY_CODECS) 41 #endif // defined(USE_PROPRIETARY_CODECS)
31 }; 42 };
32 43
44 typedef uint32 SupportedInitDataTypes;
33 typedef uint32 SupportedCodecs; 45 typedef uint32 SupportedCodecs;
34 46
35 } // namespace content 47 } // namespace content
36 48
37 #endif // CONTENT_PUBLIC_COMMON_EME_CODEC_H_ 49 #endif // CONTENT_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698