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

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

Issue 755143004: Advertise Opus support in EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable tests on Android. Created 6 years 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
« no previous file with comments | « content/browser/media/encrypted_media_browsertest.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
11 11
12 // Defines bitmask values that specify registered initialization data types used 12 // Defines bitmask values that specify registered initialization data types used
13 // in Encrypted Media Extensions (EME). 13 // in Encrypted Media Extensions (EME).
14 // The mask values are stored in a SupportedInitDataTypes. 14 // The mask values are stored in a SupportedInitDataTypes.
15 enum EmeInitDataType { 15 enum EmeInitDataType {
16 EME_INIT_DATA_TYPE_NONE = 0, 16 EME_INIT_DATA_TYPE_NONE = 0,
17 EME_INIT_DATA_TYPE_WEBM = 1 << 0, 17 EME_INIT_DATA_TYPE_WEBM = 1 << 0,
18 #if defined(USE_PROPRIETARY_CODECS) 18 #if defined(USE_PROPRIETARY_CODECS)
19 EME_INIT_DATA_TYPE_CENC = 1 << 1, 19 EME_INIT_DATA_TYPE_CENC = 1 << 1,
20 #endif // defined(USE_PROPRIETARY_CODECS) 20 #endif // defined(USE_PROPRIETARY_CODECS)
21 }; 21 };
22 22
23 // Defines bitmask values that specify codecs used in Encrypted Media Extension 23 // Defines bitmask values that specify codecs used in Encrypted Media Extension
24 // (EME). Each value represents a codec within a specific container. 24 // (EME). Each value represents a codec within a specific container.
25 // The mask values are stored in a SupportedCodecs. 25 // The mask values are stored in a SupportedCodecs.
26 enum EmeCodec { 26 enum EmeCodec {
27 // *_ALL values should only be used for masking, do not use them to specify 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. 28 // codec support because they may be extended to include more codecs.
29 EME_CODEC_NONE = 0, 29 EME_CODEC_NONE = 0,
30 EME_CODEC_WEBM_VORBIS = 1 << 0, 30 EME_CODEC_WEBM_OPUS = 1 << 0,
31 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_VORBIS, 31 EME_CODEC_WEBM_VORBIS = 1 << 1,
32 EME_CODEC_WEBM_VP8 = 1 << 1, 32 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_OPUS | EME_CODEC_WEBM_VORBIS,
33 EME_CODEC_WEBM_VP9 = 1 << 2, 33 EME_CODEC_WEBM_VP8 = 1 << 2,
34 EME_CODEC_WEBM_VP9 = 1 << 3,
34 EME_CODEC_WEBM_VIDEO_ALL = (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9), 35 EME_CODEC_WEBM_VIDEO_ALL = (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9),
35 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL), 36 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL),
36 #if defined(USE_PROPRIETARY_CODECS) 37 #if defined(USE_PROPRIETARY_CODECS)
37 EME_CODEC_MP4_AAC = 1 << 3, 38 EME_CODEC_MP4_AAC = 1 << 4,
38 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC, 39 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC,
39 EME_CODEC_MP4_AVC1 = 1 << 4, 40 EME_CODEC_MP4_AVC1 = 1 << 5,
40 EME_CODEC_MP4_VIDEO_ALL = EME_CODEC_MP4_AVC1, 41 EME_CODEC_MP4_VIDEO_ALL = EME_CODEC_MP4_AVC1,
41 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),
42 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL), 43 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL),
43 #else 44 #else
44 EME_CODEC_ALL = EME_CODEC_WEBM_ALL, 45 EME_CODEC_ALL = EME_CODEC_WEBM_ALL,
45 #endif // defined(USE_PROPRIETARY_CODECS) 46 #endif // defined(USE_PROPRIETARY_CODECS)
46 }; 47 };
47 48
48 typedef uint32_t SupportedInitDataTypes; 49 typedef uint32_t SupportedInitDataTypes;
49 typedef uint32_t SupportedCodecs; 50 typedef uint32_t SupportedCodecs;
50 51
51 } // namespace media 52 } // namespace media
52 53
53 #endif // MEDIA_BASE_EME_CONSTANTS_H_ 54 #endif // MEDIA_BASE_EME_CONSTANTS_H_
OLDNEW
« no previous file with comments | « content/browser/media/encrypted_media_browsertest.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698