Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 411 // Distinctive identifiers and persistent state can only be reliably blocked | 411 // Distinctive identifiers and persistent state can only be reliably blocked |
| 412 // (and therefore be safely configurable) for Pepper-hosted key systems. For | 412 // (and therefore be safely configurable) for Pepper-hosted key systems. For |
| 413 // other platforms, (except for the AES decryptor) assume that the CDM can | 413 // other platforms, (except for the AES decryptor) assume that the CDM can |
| 414 // and will do anything. | 414 // and will do anything. |
| 415 bool can_block = properties->UseAesDecryptor(); | 415 bool can_block = properties->UseAesDecryptor(); |
| 416 #if defined(ENABLE_PEPPER_CDMS) | 416 #if defined(ENABLE_PEPPER_CDMS) |
| 417 DCHECK_EQ(properties->UseAesDecryptor(), | 417 DCHECK_EQ(properties->UseAesDecryptor(), |
| 418 properties->GetPepperType().empty()); | 418 properties->GetPepperType().empty()); |
| 419 if (!properties->GetPepperType().empty()) | 419 if (!properties->GetPepperType().empty()) |
| 420 can_block = true; | 420 can_block = true; |
| 421 #elif defined(OS_ANDROID) | |
| 422 if (IsExternalClearKey(properties->GetKeySystemName())) | |
| 423 can_block = true; | |
|
ddorwin
2016/09/14 01:06:27
Please add a comment. Maybe above with the general
xhwang
2016/09/16 18:50:17
Done.
| |
| 421 #endif | 424 #endif |
| 422 if (!can_block) { | 425 if (!can_block) { |
| 423 DCHECK(properties->GetDistinctiveIdentifierSupport() == | 426 DCHECK(properties->GetDistinctiveIdentifierSupport() == |
| 424 EmeFeatureSupport::ALWAYS_ENABLED); | 427 EmeFeatureSupport::ALWAYS_ENABLED); |
| 425 DCHECK(properties->GetPersistentStateSupport() == | 428 DCHECK(properties->GetPersistentStateSupport() == |
| 426 EmeFeatureSupport::ALWAYS_ENABLED); | 429 EmeFeatureSupport::ALWAYS_ENABLED); |
| 427 } | 430 } |
| 428 | 431 |
| 429 DCHECK_EQ(key_system_properties_map_.count(properties->GetKeySystemName()), | 432 DCHECK_EQ(key_system_properties_map_.count(properties->GetKeySystemName()), |
| 430 0u) | 433 0u) |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 727 uint32_t mask) { | 730 uint32_t mask) { |
| 728 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); | 731 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); |
| 729 } | 732 } |
| 730 | 733 |
| 731 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, | 734 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, |
| 732 uint32_t mask) { | 735 uint32_t mask) { |
| 733 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask); | 736 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask); |
| 734 } | 737 } |
| 735 | 738 |
| 736 } // namespace media | 739 } // namespace media |
| OLD | NEW |