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

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

Issue 2793163003: Add EME support for new VP9 codec string in WebM. (Closed)
Patch Set: Add another debug log Created 3 years, 8 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
« no previous file with comments | « chrome/renderer/media/chrome_key_systems.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 #include "media/media_features.h" 10 #include "media/media_features.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 // Defines values that specify registered Initialization Data Types used 14 // Defines values that specify registered Initialization Data Types used
15 // in Encrypted Media Extensions (EME). 15 // in Encrypted Media Extensions (EME).
16 // http://w3c.github.io/encrypted-media/initdata-format-registry.html#registry 16 // http://w3c.github.io/encrypted-media/initdata-format-registry.html#registry
17 enum class EmeInitDataType { UNKNOWN, WEBM, CENC, KEYIDS, MAX = KEYIDS }; 17 enum class EmeInitDataType { UNKNOWN, WEBM, CENC, KEYIDS, MAX = KEYIDS };
18 18
19 // Defines bitmask values that specify codecs used in Encrypted Media Extension 19 // Defines bitmask values that specify codecs used in Encrypted Media Extension
20 // (EME). Each value represents a codec within a specific container. 20 // (EME). Each value represents a codec within a specific container.
21 // The mask values are stored in a SupportedCodecs. 21 // The mask values are stored in a SupportedCodecs.
22 enum EmeCodec { 22 enum EmeCodec {
23 // *_ALL values should only be used for masking, do not use them to specify 23 // *_ALL values should only be used for masking, do not use them to specify
24 // codec support because they may be extended to include more codecs. 24 // codec support because they may be extended to include more codecs.
25 EME_CODEC_NONE = 0, 25 EME_CODEC_NONE = 0,
26 EME_CODEC_WEBM_OPUS = 1 << 0, 26 EME_CODEC_WEBM_OPUS = 1 << 0,
27 EME_CODEC_WEBM_VORBIS = 1 << 1, 27 EME_CODEC_WEBM_VORBIS = 1 << 1,
28 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_OPUS | EME_CODEC_WEBM_VORBIS,
29 EME_CODEC_WEBM_VP8 = 1 << 2, 28 EME_CODEC_WEBM_VP8 = 1 << 2,
30 EME_CODEC_WEBM_VP9 = 1 << 3, 29 EME_CODEC_WEBM_VP9 = 1 << 3,
31 EME_CODEC_WEBM_VIDEO_ALL = (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9), 30 EME_CODEC_MP4_AAC = 1 << 4,
31 EME_CODEC_MP4_AVC1 = 1 << 5,
32 EME_CODEC_COMMON_VP9 = 1 << 6,
33 EME_CODEC_MP4_HEVC = 1 << 7,
34 EME_CODEC_WEBM_AUDIO_ALL = EME_CODEC_WEBM_OPUS | EME_CODEC_WEBM_VORBIS,
35 EME_CODEC_WEBM_VIDEO_ALL =
36 (EME_CODEC_WEBM_VP8 | EME_CODEC_WEBM_VP9 | EME_CODEC_COMMON_VP9),
32 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL), 37 EME_CODEC_WEBM_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_WEBM_VIDEO_ALL),
33 #if BUILDFLAG(USE_PROPRIETARY_CODECS) 38 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
34 EME_CODEC_MP4_AAC = 1 << 4,
35 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC, 39 EME_CODEC_MP4_AUDIO_ALL = EME_CODEC_MP4_AAC,
36 EME_CODEC_MP4_AVC1 = 1 << 5,
37 EME_CODEC_MP4_VP9 = 1 << 6,
38 #if !BUILDFLAG(ENABLE_HEVC_DEMUXING) 40 #if !BUILDFLAG(ENABLE_HEVC_DEMUXING)
39 EME_CODEC_MP4_VIDEO_ALL = (EME_CODEC_MP4_AVC1 | EME_CODEC_MP4_VP9), 41 EME_CODEC_MP4_VIDEO_ALL = (EME_CODEC_MP4_AVC1 | EME_CODEC_COMMON_VP9),
40 #else 42 #else
41 EME_CODEC_MP4_HEVC = 1 << 7,
42 EME_CODEC_MP4_VIDEO_ALL = 43 EME_CODEC_MP4_VIDEO_ALL =
43 (EME_CODEC_MP4_AVC1 | EME_CODEC_MP4_VP9 | EME_CODEC_MP4_HEVC), 44 (EME_CODEC_MP4_AVC1 | EME_CODEC_COMMON_VP9 | EME_CODEC_MP4_HEVC),
44 #endif 45 #endif
45 EME_CODEC_MP4_ALL = (EME_CODEC_MP4_AUDIO_ALL | EME_CODEC_MP4_VIDEO_ALL), 46 EME_CODEC_MP4_ALL = (EME_CODEC_MP4_AUDIO_ALL | EME_CODEC_MP4_VIDEO_ALL),
46 EME_CODEC_AUDIO_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_MP4_AUDIO_ALL), 47 EME_CODEC_AUDIO_ALL = (EME_CODEC_WEBM_AUDIO_ALL | EME_CODEC_MP4_AUDIO_ALL),
47 EME_CODEC_VIDEO_ALL = (EME_CODEC_WEBM_VIDEO_ALL | EME_CODEC_MP4_VIDEO_ALL), 48 EME_CODEC_VIDEO_ALL = (EME_CODEC_WEBM_VIDEO_ALL | EME_CODEC_MP4_VIDEO_ALL),
48 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL), 49 EME_CODEC_ALL = (EME_CODEC_WEBM_ALL | EME_CODEC_MP4_ALL),
49 #else 50 #else
50 EME_CODEC_AUDIO_ALL = EME_CODEC_WEBM_AUDIO_ALL, 51 EME_CODEC_AUDIO_ALL = EME_CODEC_WEBM_AUDIO_ALL,
51 EME_CODEC_VIDEO_ALL = EME_CODEC_WEBM_VIDEO_ALL, 52 EME_CODEC_VIDEO_ALL = EME_CODEC_WEBM_VIDEO_ALL,
52 EME_CODEC_ALL = EME_CODEC_WEBM_ALL, 53 EME_CODEC_ALL = EME_CODEC_WEBM_ALL,
53 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) 54 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // This rule only has meaning on platforms that distinguish hardware-secure 122 // This rule only has meaning on platforms that distinguish hardware-secure
122 // codecs (ie. Android). 123 // codecs (ie. Android).
123 HW_SECURE_CODECS_REQUIRED, 124 HW_SECURE_CODECS_REQUIRED,
124 // The configuration option is supported without conditions. 125 // The configuration option is supported without conditions.
125 SUPPORTED, 126 SUPPORTED,
126 }; 127 };
127 128
128 } // namespace media 129 } // namespace media
129 130
130 #endif // MEDIA_BASE_EME_CONSTANTS_H_ 131 #endif // MEDIA_BASE_EME_CONSTANTS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/chrome_key_systems.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698