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

Side by Side Diff: media/base/key_systems.cc

Issue 1899423002: Revert of Implement support for vp9 in ISO-BMFF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « media/base/eme_constants.h ('k') | media/base/mime_util_internal.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "media/base/key_systems.h" 5 #include "media/base/key_systems.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "media/base/key_system_info.h" 17 #include "media/base/key_system_info.h"
18 #include "media/base/media.h" 18 #include "media/base/media.h"
19 #include "media/base/media_client.h" 19 #include "media/base/media_client.h"
20 #include "media/cdm/key_system_names.h" 20 #include "media/cdm/key_system_names.h"
21 #include "media/media_features.h"
22 #include "third_party/widevine/cdm/widevine_cdm_common.h" 21 #include "third_party/widevine/cdm/widevine_cdm_common.h"
23 22
24 namespace media { 23 namespace media {
25 24
26 const char kClearKeyKeySystem[] = "org.w3.clearkey"; 25 const char kClearKeyKeySystem[] = "org.w3.clearkey";
27 26
28 // These names are used by UMA. Do not change them! 27 // These names are used by UMA. Do not change them!
29 const char kClearKeyKeySystemNameForUMA[] = "ClearKey"; 28 const char kClearKeyKeySystemNameForUMA[] = "ClearKey";
30 const char kUnknownKeySystemNameForUMA[] = "Unknown"; 29 const char kUnknownKeySystemNameForUMA[] = "Unknown";
31 30
(...skipping 16 matching lines...) Expand all
48 47
49 // Mapping between codec names and enum values. 48 // Mapping between codec names and enum values.
50 static const NamedCodec kCodecStrings[] = { 49 static const NamedCodec kCodecStrings[] = {
51 {"opus", EME_CODEC_WEBM_OPUS}, // Opus. 50 {"opus", EME_CODEC_WEBM_OPUS}, // Opus.
52 {"vorbis", EME_CODEC_WEBM_VORBIS}, // Vorbis. 51 {"vorbis", EME_CODEC_WEBM_VORBIS}, // Vorbis.
53 {"vp8", EME_CODEC_WEBM_VP8}, // VP8. 52 {"vp8", EME_CODEC_WEBM_VP8}, // VP8.
54 {"vp8.0", EME_CODEC_WEBM_VP8}, // VP8. 53 {"vp8.0", EME_CODEC_WEBM_VP8}, // VP8.
55 {"vp9", EME_CODEC_WEBM_VP9}, // VP9. 54 {"vp9", EME_CODEC_WEBM_VP9}, // VP9.
56 {"vp9.0", EME_CODEC_WEBM_VP9}, // VP9. 55 {"vp9.0", EME_CODEC_WEBM_VP9}, // VP9.
57 #if defined(USE_PROPRIETARY_CODECS) 56 #if defined(USE_PROPRIETARY_CODECS)
58 #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
59 {"vp09", EME_CODEC_MP4_VP9}, // VP9 in MP4.
60 #endif
61 {"mp4a", EME_CODEC_MP4_AAC}, // AAC. 57 {"mp4a", EME_CODEC_MP4_AAC}, // AAC.
62 {"avc1", EME_CODEC_MP4_AVC1}, // AVC1. 58 {"avc1", EME_CODEC_MP4_AVC1}, // AVC1.
63 {"avc3", EME_CODEC_MP4_AVC1} // AVC3. 59 {"avc3", EME_CODEC_MP4_AVC1} // AVC3.
64 #endif // defined(USE_PROPRIETARY_CODECS) 60 #endif // defined(USE_PROPRIETARY_CODECS)
65 }; 61 };
66 62
67 static EmeRobustness ConvertRobustness(const std::string& robustness) { 63 static EmeRobustness ConvertRobustness(const std::string& robustness) {
68 if (robustness.empty()) 64 if (robustness.empty())
69 return EmeRobustness::EMPTY; 65 return EmeRobustness::EMPTY;
70 if (robustness == "SW_SECURE_CRYPTO") 66 if (robustness == "SW_SECURE_CRYPTO")
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 uint32_t mask) { 785 uint32_t mask) {
790 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); 786 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask);
791 } 787 }
792 788
793 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, 789 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type,
794 uint32_t mask) { 790 uint32_t mask) {
795 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask); 791 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask);
796 } 792 }
797 793
798 } // namespace media 794 } // namespace media
OLDNEW
« no previous file with comments | « media/base/eme_constants.h ('k') | media/base/mime_util_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698