| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 } | 436 } |
| 437 | 437 |
| 438 DCHECK_EQ(key_system_properties_map_.count(properties->GetKeySystemName()), | 438 DCHECK_EQ(key_system_properties_map_.count(properties->GetKeySystemName()), |
| 439 0u) | 439 0u) |
| 440 << "Key system '" << properties->GetKeySystemName() | 440 << "Key system '" << properties->GetKeySystemName() |
| 441 << "' already registered"; | 441 << "' already registered"; |
| 442 | 442 |
| 443 #if defined(OS_ANDROID) | 443 #if defined(OS_ANDROID) |
| 444 // Ensure that the renderer can access the decoders necessary to use the | 444 // Ensure that the renderer can access the decoders necessary to use the |
| 445 // key system. | 445 // key system. |
| 446 if (!properties->UseAesDecryptor() && !ArePlatformDecodersAvailable()) { | 446 if (!properties->UseAesDecryptor() && !HasPlatformDecoderSupport()) { |
| 447 DLOG(WARNING) << properties->GetKeySystemName() << " not registered"; | 447 DLOG(WARNING) << properties->GetKeySystemName() << " not registered"; |
| 448 continue; | 448 continue; |
| 449 } | 449 } |
| 450 #endif // defined(OS_ANDROID) | 450 #endif // defined(OS_ANDROID) |
| 451 | 451 |
| 452 key_system_properties_map_[properties->GetKeySystemName()] = | 452 key_system_properties_map_[properties->GetKeySystemName()] = |
| 453 std::move(properties); | 453 std::move(properties); |
| 454 } | 454 } |
| 455 } | 455 } |
| 456 | 456 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 uint32_t mask) { | 736 uint32_t mask) { |
| 737 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); | 737 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); |
| 738 } | 738 } |
| 739 | 739 |
| 740 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, | 740 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, |
| 741 uint32_t mask) { | 741 uint32_t mask) { |
| 742 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask); | 742 KeySystemsImpl::GetInstance()->AddMimeTypeCodecMask(mime_type, mask); |
| 743 } | 743 } |
| 744 | 744 |
| 745 } // namespace media | 745 } // namespace media |
| OLD | NEW |