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

Side by Side Diff: webkit/renderer/media/crypto/key_systems.cc

Issue 16917014: Revert "Allow suppressed EME canPlayType() responses to be overridden with a flag." (r208096). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « media/base/media_switches.cc ('k') | webkit/renderer/media/crypto/key_systems_info.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 <map> 5 #include <map>
6 6
7 #include "webkit/renderer/media/crypto/key_systems.h" 7 #include "webkit/renderer/media/crypto/key_systems.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return false; 105 return false;
106 106
107 const CodecMappings& codecs = mime_iter->second; 107 const CodecMappings& codecs = mime_iter->second;
108 return (codecs.find(codec) != codecs.end()) && IsSystemCompatible(key_system); 108 return (codecs.find(codec) != codecs.end()) && IsSystemCompatible(key_system);
109 } 109 }
110 110
111 bool KeySystems::IsSupportedKeySystemWithMediaMimeType( 111 bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
112 const std::string& mime_type, 112 const std::string& mime_type,
113 const std::vector<std::string>& codecs, 113 const std::vector<std::string>& codecs,
114 const std::string& key_system) { 114 const std::string& key_system) {
115 // This method is only used by the canPlaytType() path (not the EME methods),
116 // so we check for suppressed key_systems here.
117 if(IsCanPlayTypeSuppressed(key_system))
118 return false;
119
120 if (codecs.empty()) 115 if (codecs.empty())
121 return IsSupportedKeySystemWithContainerAndCodec( 116 return IsSupportedKeySystemWithContainerAndCodec(
122 mime_type, std::string(), key_system); 117 mime_type, std::string(), key_system);
123 118
124 for (size_t i = 0; i < codecs.size(); ++i) { 119 for (size_t i = 0; i < codecs.size(); ++i) {
125 if (!IsSupportedKeySystemWithContainerAndCodec( 120 if (!IsSupportedKeySystemWithContainerAndCodec(
126 mime_type, codecs[i], key_system)) 121 mime_type, codecs[i], key_system))
127 return false; 122 return false;
128 } 123 }
129 124
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 for (int i = 0; i < kNumKeySystemToUUIDMapping; ++i) { 165 for (int i = 0; i < kNumKeySystemToUUIDMapping; ++i) {
171 if (kKeySystemToUUIDMapping[i].key_system == key_system) 166 if (kKeySystemToUUIDMapping[i].key_system == key_system)
172 return std::vector<uint8>(kKeySystemToUUIDMapping[i].uuid, 167 return std::vector<uint8>(kKeySystemToUUIDMapping[i].uuid,
173 kKeySystemToUUIDMapping[i].uuid + 16); 168 kKeySystemToUUIDMapping[i].uuid + 16);
174 } 169 }
175 return std::vector<uint8>(); 170 return std::vector<uint8>();
176 } 171 }
177 #endif // defined(OS_ANDROID) 172 #endif // defined(OS_ANDROID)
178 173
179 } // namespace webkit_media 174 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/base/media_switches.cc ('k') | webkit/renderer/media/crypto/key_systems_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698