Chromium Code Reviews| Index: media/base/key_systems.cc |
| diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc |
| index 2fc70532499d79cd50e87c1c6850e7bfc75543a0..de85220c25124e28ae4f83efe9a7cf4ee947d9cf 100644 |
| --- a/media/base/key_systems.cc |
| +++ b/media/base/key_systems.cc |
| @@ -140,9 +140,9 @@ static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) { |
| // key system-specific behaviors not fully defined by the EME specification. |
| // That specification should be provided by the owner of the domain that is the |
| // reverse of the |key_system| string. |
| -// This involves more than calling a library, SDK, or platform API. KeySystems |
| -// must be populated appropriately, and there will likely be glue code to adapt |
| -// to the API of the library, SDK, or platform API. |
| +// This involves more than calling a library, SDK, or platform API. |
| +// KeySystemsImpl must be populated appropriately, and there will likely be glue |
| +// code to adapt to the API of the library, SDK, or platform API. |
| // |
| // Chromium mainline contains this data and glue code for specific key systems, |
| // which should help ensure interoperability with other implementations using |
| @@ -151,7 +151,7 @@ static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) { |
| // If you need to add support for other key systems, ensure that you have |
| // obtained the specification for how to integrate it with EME, implemented the |
| // appropriate glue/adapter code, and added all the appropriate data to |
| -// KeySystems. Only then should you change this function. |
| +// KeySystemsImpl. Only then should you change this function. |
| static bool IsPotentiallySupportedKeySystem(const std::string& key_system) { |
| // Known and supported key systems. |
| if (key_system == kWidevineKeySystem) |
| @@ -178,9 +178,9 @@ static bool IsPotentiallySupportedKeySystem(const std::string& key_system) { |
| return false; |
| } |
| -class KeySystems { |
| +class KeySystemsImpl : public KeySystems { |
| public: |
| - static KeySystems& GetInstance(); |
| + static KeySystemsImpl& GetInstance(); |
| void UpdateIfNeeded(); |
| @@ -192,11 +192,15 @@ class KeySystems { |
| const std::string& key_system, |
| const std::string& init_data_type); |
| + bool PrefixedIsSupportedKeySystemWithMediaMimeType( |
| + const std::string& mime_type, |
| + const std::vector<std::string>& codecs, |
| + const std::string& key_system); |
| + |
| bool IsSupportedKeySystemWithMediaMimeType( |
| const std::string& mime_type, |
| const std::vector<std::string>& codecs, |
| - const std::string& key_system, |
| - bool is_prefixed); |
| + const std::string& key_system) const; |
| std::string GetKeySystemNameForUMA(const std::string& key_system) const; |
| @@ -206,24 +210,30 @@ class KeySystems { |
| std::string GetPepperType(const std::string& concrete_key_system); |
| #endif |
| + bool IsSupportedCodecCombination( |
| + const std::string& key_system, |
| + EmeMediaType media_type, |
| + const std::string& container_mime_type, |
| + const std::vector<std::string>& codecs) const override; |
| + |
| EmeConfigRule GetRobustnessConfigRule( |
| const std::string& key_system, |
| EmeMediaType media_type, |
| - EmeRobustness robustness); |
| + EmeRobustness robustness) const override; |
| EmeConfigRule GetPersistentLicenseSessionConfigRule( |
| - const std::string& key_system); |
| + const std::string& key_system) const override; |
| EmeConfigRule GetPersistentReleaseMessageSessionConfigRule( |
| - const std::string& key_system); |
| + const std::string& key_system) const override; |
| EmeConfigRule GetPersistentStateConfigRule( |
| const std::string& key_system, |
| - EmeFeatureRequirement requirement); |
| + EmeFeatureRequirement requirement) const override; |
| EmeConfigRule GetDistinctiveIdentifierConfigRule( |
| const std::string& key_system, |
| - EmeFeatureRequirement requirement); |
| + EmeFeatureRequirement requirement) const override; |
| void AddContainerMask(const std::string& container, uint32 mask); |
| void AddCodecMask(const std::string& codec, uint32 mask); |
| @@ -236,7 +246,7 @@ class KeySystems { |
| void AddConcreteSupportedKeySystems( |
| const std::vector<KeySystemInfo>& concrete_key_systems); |
| - friend struct base::DefaultLazyInstanceTraits<KeySystems>; |
| + friend struct base::DefaultLazyInstanceTraits<KeySystemsImpl>; |
| typedef base::hash_map<std::string, KeySystemInfo> KeySystemInfoMap; |
| typedef base::hash_map<std::string, std::string> ParentKeySystemMap; |
| @@ -245,8 +255,8 @@ class KeySystems { |
| typedef base::hash_map<std::string, EmeInitDataType> InitDataTypesMap; |
| typedef base::hash_map<std::string, std::string> KeySystemNameForUMAMap; |
| - KeySystems(); |
| - ~KeySystems() {} |
| + KeySystemsImpl(); |
| + ~KeySystemsImpl() {} |
| EmeInitDataType GetInitDataTypeForName( |
| const std::string& init_data_type) const; |
| @@ -289,20 +299,21 @@ class KeySystems { |
| // Makes sure all methods are called from the same thread. |
| base::ThreadChecker thread_checker_; |
| - DISALLOW_COPY_AND_ASSIGN(KeySystems); |
| + DISALLOW_COPY_AND_ASSIGN(KeySystemsImpl); |
| }; |
| -static base::LazyInstance<KeySystems> g_key_systems = LAZY_INSTANCE_INITIALIZER; |
| +static base::LazyInstance<KeySystemsImpl> g_key_systems = |
| + LAZY_INSTANCE_INITIALIZER; |
| -KeySystems& KeySystems::GetInstance() { |
| - KeySystems& key_systems = g_key_systems.Get(); |
| +KeySystemsImpl& KeySystemsImpl::GetInstance() { |
| + KeySystemsImpl& key_systems = g_key_systems.Get(); |
| key_systems.UpdateIfNeeded(); |
| return key_systems; |
| } |
| // Because we use a LazyInstance, the key systems info must be populated when |
| // the instance is lazily initiated. |
| -KeySystems::KeySystems() { |
| +KeySystemsImpl::KeySystemsImpl() { |
| for (size_t i = 0; i < arraysize(kInitDataTypeNames); ++i) { |
| const std::string& name = kInitDataTypeNames[i].name; |
| DCHECK(!init_data_type_name_map_.count(name)); |
| @@ -325,7 +336,7 @@ KeySystems::KeySystems() { |
| UpdateSupportedKeySystems(); |
| } |
| -EmeInitDataType KeySystems::GetInitDataTypeForName( |
| +EmeInitDataType KeySystemsImpl::GetInitDataTypeForName( |
| const std::string& init_data_type) const { |
| InitDataTypesMap::const_iterator iter = |
| init_data_type_name_map_.find(init_data_type); |
| @@ -334,7 +345,7 @@ EmeInitDataType KeySystems::GetInitDataTypeForName( |
| return EME_INIT_DATA_TYPE_NONE; |
| } |
| -SupportedCodecs KeySystems::GetCodecMaskForContainer( |
| +SupportedCodecs KeySystemsImpl::GetCodecMaskForContainer( |
| const std::string& container) const { |
| ContainerCodecsMap::const_iterator iter = |
| container_to_codec_mask_map_.find(container); |
| @@ -343,14 +354,14 @@ SupportedCodecs KeySystems::GetCodecMaskForContainer( |
| return EME_CODEC_NONE; |
| } |
| -EmeCodec KeySystems::GetCodecForString(const std::string& codec) const { |
| +EmeCodec KeySystemsImpl::GetCodecForString(const std::string& codec) const { |
| CodecsMap::const_iterator iter = codec_string_map_.find(codec); |
| if (iter != codec_string_map_.end()) |
| return iter->second; |
| return EME_CODEC_NONE; |
| } |
| -const std::string& KeySystems::PrefixedGetConcreteKeySystemNameFor( |
| +const std::string& KeySystemsImpl::PrefixedGetConcreteKeySystemNameFor( |
| const std::string& key_system) const { |
| ParentKeySystemMap::const_iterator iter = |
| parent_key_system_map_.find(key_system); |
| @@ -359,7 +370,7 @@ const std::string& KeySystems::PrefixedGetConcreteKeySystemNameFor( |
| return key_system; |
| } |
| -void KeySystems::InitializeUMAInfo() { |
| +void KeySystemsImpl::InitializeUMAInfo() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK(key_system_name_for_uma_map_.empty()); |
| @@ -379,12 +390,12 @@ void KeySystems::InitializeUMAInfo() { |
| kClearKeyKeySystemNameForUMA; |
| } |
| -void KeySystems::UpdateIfNeeded() { |
| +void KeySystemsImpl::UpdateIfNeeded() { |
| if (GetMediaClient() && GetMediaClient()->IsKeySystemsUpdateNeeded()) |
| UpdateSupportedKeySystems(); |
| } |
| -void KeySystems::UpdateSupportedKeySystems() { |
| +void KeySystemsImpl::UpdateSupportedKeySystems() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| concrete_key_system_map_.clear(); |
| parent_key_system_map_.clear(); |
| @@ -402,7 +413,7 @@ void KeySystems::UpdateSupportedKeySystems() { |
| AddConcreteSupportedKeySystems(key_systems_info); |
| } |
| -void KeySystems::AddConcreteSupportedKeySystems( |
| +void KeySystemsImpl::AddConcreteSupportedKeySystems( |
| const std::vector<KeySystemInfo>& concrete_key_systems) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK(concrete_key_system_map_.empty()); |
| @@ -486,12 +497,13 @@ void KeySystems::AddConcreteSupportedKeySystems( |
| } |
| } |
| -bool KeySystems::IsConcreteSupportedKeySystem(const std::string& key_system) { |
| +bool KeySystemsImpl::IsConcreteSupportedKeySystem( |
| + const std::string& key_system) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| return concrete_key_system_map_.count(key_system) != 0; |
| } |
| -bool KeySystems::IsSupportedContainer( |
| +bool KeySystemsImpl::IsSupportedContainer( |
| const std::string& container, |
| SupportedCodecs key_system_supported_codecs) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -512,7 +524,7 @@ bool KeySystems::IsSupportedContainer( |
| return (supported_codecs & key_system_supported_codecs) != 0; |
| } |
| -bool KeySystems::IsSupportedContainerAndCodecs( |
| +bool KeySystemsImpl::IsSupportedContainerAndCodecs( |
| const std::string& container, |
| const std::vector<std::string>& codecs, |
| SupportedCodecs key_system_supported_codecs) const { |
| @@ -544,13 +556,13 @@ bool KeySystems::IsSupportedContainerAndCodecs( |
| return true; |
| } |
| -bool KeySystems::IsSupportedKeySystem(const std::string& key_system) { |
| +bool KeySystemsImpl::IsSupportedKeySystem(const std::string& key_system) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| // Unprefixed EME only supports concrete key systems. |
| return concrete_key_system_map_.count(key_system) != 0; |
| } |
| -bool KeySystems::IsSupportedKeySystemWithInitDataType( |
| +bool KeySystemsImpl::IsSupportedKeySystemWithInitDataType( |
| const std::string& key_system, |
| const std::string& init_data_type) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -567,27 +579,18 @@ bool KeySystems::IsSupportedKeySystemWithInitDataType( |
| return (info.supported_init_data_types & eme_init_data_type) != 0; |
| } |
| -// TODO(sandersd): Reorganize to be more similar to |
| -// IsKeySystemSupportedWithInitDataType(). Note that a fork may still be |
| -// required; http://crbug.com/417461. |
| -bool KeySystems::IsSupportedKeySystemWithMediaMimeType( |
| +bool KeySystemsImpl::PrefixedIsSupportedKeySystemWithMediaMimeType( |
| const std::string& mime_type, |
| const std::vector<std::string>& codecs, |
| - const std::string& key_system, |
| - bool is_prefixed) { |
| + const std::string& key_system) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| - const bool report_to_uma = is_prefixed; |
| - // If |is_prefixed| and |key_system| is a parent key system, use its concrete |
| - // child. |
| - const std::string& concrete_key_system = is_prefixed ? |
| - PrefixedGetConcreteKeySystemNameFor(key_system) : |
| - key_system; |
| + const std::string& concrete_key_system = |
| + PrefixedGetConcreteKeySystemNameFor(key_system); |
| bool has_type = !mime_type.empty(); |
| - if (report_to_uma) |
| - key_systems_support_uma_.ReportKeySystemQuery(key_system, has_type); |
| + key_systems_support_uma_.ReportKeySystemQuery(key_system, has_type); |
| // Check key system support. |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -595,8 +598,7 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType( |
| if (key_system_iter == concrete_key_system_map_.end()) |
| return false; |
| - if (report_to_uma) |
| - key_systems_support_uma_.ReportKeySystemSupport(key_system, false); |
| + key_systems_support_uma_.ReportKeySystemSupport(key_system, false); |
| if (!has_type) { |
| DCHECK(codecs.empty()); |
| @@ -615,12 +617,43 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType( |
| return false; |
| } |
| - if (report_to_uma) |
| - key_systems_support_uma_.ReportKeySystemSupport(key_system, true); |
| + key_systems_support_uma_.ReportKeySystemSupport(key_system, true); |
| + |
| + return true; |
| +} |
| + |
| +bool KeySystemsImpl::IsSupportedKeySystemWithMediaMimeType( |
| + const std::string& mime_type, |
| + const std::vector<std::string>& codecs, |
| + const std::string& key_system) const { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + |
| + KeySystemInfoMap::const_iterator key_system_iter = |
| + concrete_key_system_map_.find(key_system); |
| + if (key_system_iter == concrete_key_system_map_.end()) |
| + return false; |
| + |
| + if (!mime_type.empty()) { |
|
ddorwin
2015/03/20 00:55:03
invert
sandersd (OOO until July 31)
2015/03/20 22:53:19
Done.
|
| + DCHECK(codecs.empty()); |
| + return true; |
| + } |
| + |
| + SupportedCodecs key_system_supported_codecs = |
| + key_system_iter->second.supported_codecs; |
| + |
| + if (!IsSupportedContainer(mime_type, key_system_supported_codecs)) |
| + return false; |
| + |
| + if (!codecs.empty() && |
| + !IsSupportedContainerAndCodecs( |
| + mime_type, codecs, key_system_supported_codecs)) { |
| + return false; |
| + } |
| + |
| return true; |
| } |
| -std::string KeySystems::GetKeySystemNameForUMA( |
| +std::string KeySystemsImpl::GetKeySystemNameForUMA( |
| const std::string& key_system) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -632,7 +665,7 @@ std::string KeySystems::GetKeySystemNameForUMA( |
| return iter->second; |
| } |
| -bool KeySystems::UseAesDecryptor(const std::string& concrete_key_system) { |
| +bool KeySystemsImpl::UseAesDecryptor(const std::string& concrete_key_system) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -646,7 +679,8 @@ bool KeySystems::UseAesDecryptor(const std::string& concrete_key_system) { |
| } |
| #if defined(ENABLE_PEPPER_CDMS) |
| -std::string KeySystems::GetPepperType(const std::string& concrete_key_system) { |
| +std::string KeySystemsImpl::GetPepperType( |
| + const std::string& concrete_key_system) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -662,10 +696,19 @@ std::string KeySystems::GetPepperType(const std::string& concrete_key_system) { |
| } |
| #endif |
| -EmeConfigRule KeySystems::GetRobustnessConfigRule( |
| +bool KeySystemsImpl::IsSupportedCodecCombination( |
| const std::string& key_system, |
| EmeMediaType media_type, |
| - EmeRobustness robustness) { |
| + const std::string& container_mime_type, |
| + const std::vector<std::string>& codecs) const { |
| + return IsSupportedKeySystemWithMediaMimeType( |
|
ddorwin
2015/03/20 00:55:03
TODO to check/use media_type?
sandersd (OOO until July 31)
2015/03/20 22:53:19
Done.
|
| + container_mime_type, codecs, key_system); |
| +} |
| + |
| +EmeConfigRule KeySystemsImpl::GetRobustnessConfigRule( |
| + const std::string& key_system, |
| + EmeMediaType media_type, |
| + EmeRobustness robustness) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| if (robustness == EmeRobustness::INVALID) |
| @@ -721,8 +764,8 @@ EmeConfigRule KeySystems::GetRobustnessConfigRule( |
| return EmeConfigRule::SUPPORTED; |
| } |
| -EmeConfigRule KeySystems::GetPersistentLicenseSessionConfigRule( |
| - const std::string& key_system) { |
| +EmeConfigRule KeySystemsImpl::GetPersistentLicenseSessionConfigRule( |
| + const std::string& key_system) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -735,8 +778,8 @@ EmeConfigRule KeySystems::GetPersistentLicenseSessionConfigRule( |
| key_system_iter->second.persistent_license_support); |
| } |
| -EmeConfigRule KeySystems::GetPersistentReleaseMessageSessionConfigRule( |
| - const std::string& key_system) { |
| +EmeConfigRule KeySystemsImpl::GetPersistentReleaseMessageSessionConfigRule( |
| + const std::string& key_system) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -749,9 +792,9 @@ EmeConfigRule KeySystems::GetPersistentReleaseMessageSessionConfigRule( |
| key_system_iter->second.persistent_release_message_support); |
| } |
| -EmeConfigRule KeySystems::GetPersistentStateConfigRule( |
| +EmeConfigRule KeySystemsImpl::GetPersistentStateConfigRule( |
| const std::string& key_system, |
| - EmeFeatureRequirement requirement) { |
| + EmeFeatureRequirement requirement) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -791,9 +834,9 @@ EmeConfigRule KeySystems::GetPersistentStateConfigRule( |
| return EmeConfigRule::SUPPORTED; |
| } |
| -EmeConfigRule KeySystems::GetDistinctiveIdentifierConfigRule( |
| +EmeConfigRule KeySystemsImpl::GetDistinctiveIdentifierConfigRule( |
| const std::string& key_system, |
| - EmeFeatureRequirement requirement) { |
| + EmeFeatureRequirement requirement) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| KeySystemInfoMap::const_iterator key_system_iter = |
| @@ -829,13 +872,14 @@ EmeConfigRule KeySystems::GetDistinctiveIdentifierConfigRule( |
| return EmeConfigRule::SUPPORTED; |
| } |
| -void KeySystems::AddContainerMask(const std::string& container, uint32 mask) { |
| +void KeySystemsImpl::AddContainerMask(const std::string& container, |
| + uint32 mask) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK(!container_to_codec_mask_map_.count(container)); |
| container_to_codec_mask_map_[container] = static_cast<EmeCodec>(mask); |
| } |
| -void KeySystems::AddCodecMask(const std::string& codec, uint32 mask) { |
| +void KeySystemsImpl::AddCodecMask(const std::string& codec, uint32 mask) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK(!codec_string_map_.count(codec)); |
| codec_string_map_[codec] = static_cast<EmeCodec>(mask); |
| @@ -843,6 +887,10 @@ void KeySystems::AddCodecMask(const std::string& codec, uint32 mask) { |
| //------------------------------------------------------------------------------ |
|
ddorwin
2015/03/20 00:55:03
nit: This should either be at 893 or duplicated th
|
| +KeySystems& KeySystems::GetInstance() { |
| + return KeySystemsImpl::GetInstance(); |
| +} |
| + |
| std::string GetUnprefixedKeySystemName(const std::string& key_system) { |
| if (key_system == kClearKeyKeySystem) |
| return kUnsupportedClearKeyKeySystem; |
| @@ -875,11 +923,11 @@ bool IsSaneInitDataTypeWithContainer( |
| } |
| bool PrefixedIsSupportedConcreteKeySystem(const std::string& key_system) { |
| - return KeySystems::GetInstance().IsConcreteSupportedKeySystem(key_system); |
| + return KeySystemsImpl::GetInstance().IsConcreteSupportedKeySystem(key_system); |
| } |
| bool IsSupportedKeySystem(const std::string& key_system) { |
| - if (!KeySystems::GetInstance().IsSupportedKeySystem(key_system)) |
| + if (!KeySystemsImpl::GetInstance().IsSupportedKeySystem(key_system)) |
| return false; |
| // TODO(ddorwin): Move this to where we add key systems when prefixed EME is |
| @@ -897,7 +945,7 @@ bool IsSupportedKeySystem(const std::string& key_system) { |
| bool IsSupportedKeySystemWithInitDataType( |
| const std::string& key_system, |
| const std::string& init_data_type) { |
| - return KeySystems::GetInstance().IsSupportedKeySystemWithInitDataType( |
| + return KeySystemsImpl::GetInstance().IsSupportedKeySystemWithInitDataType( |
| key_system, init_data_type); |
| } |
| @@ -905,66 +953,33 @@ bool IsSupportedKeySystemWithMediaMimeType( |
| const std::string& mime_type, |
| const std::vector<std::string>& codecs, |
| const std::string& key_system) { |
|
ddorwin
2015/03/20 00:55:03
Eventually, we should make the parameters have a c
sandersd (OOO until July 31)
2015/03/20 22:53:19
Acknowledged.
|
| - return KeySystems::GetInstance().IsSupportedKeySystemWithMediaMimeType( |
| - mime_type, codecs, key_system, false); |
| + return KeySystemsImpl::GetInstance().IsSupportedKeySystemWithMediaMimeType( |
| + mime_type, codecs, key_system); |
| } |
| bool PrefixedIsSupportedKeySystemWithMediaMimeType( |
| const std::string& mime_type, |
| const std::vector<std::string>& codecs, |
| const std::string& key_system) { |
| - return KeySystems::GetInstance().IsSupportedKeySystemWithMediaMimeType( |
| - mime_type, codecs, key_system, true); |
| + return KeySystemsImpl::GetInstance() |
| + .PrefixedIsSupportedKeySystemWithMediaMimeType(mime_type, codecs, |
| + key_system); |
| } |
| std::string GetKeySystemNameForUMA(const std::string& key_system) { |
| - return KeySystems::GetInstance().GetKeySystemNameForUMA(key_system); |
| + return KeySystemsImpl::GetInstance().GetKeySystemNameForUMA(key_system); |
| } |
| bool CanUseAesDecryptor(const std::string& concrete_key_system) { |
| - return KeySystems::GetInstance().UseAesDecryptor(concrete_key_system); |
| + return KeySystemsImpl::GetInstance().UseAesDecryptor(concrete_key_system); |
| } |
| #if defined(ENABLE_PEPPER_CDMS) |
| std::string GetPepperType(const std::string& concrete_key_system) { |
| - return KeySystems::GetInstance().GetPepperType(concrete_key_system); |
| + return KeySystemsImpl::GetInstance().GetPepperType(concrete_key_system); |
| } |
| #endif |
| -EmeConfigRule GetRobustnessConfigRule( |
| - const std::string& key_system, |
| - EmeMediaType media_type, |
| - EmeRobustness robustness) { |
| - return KeySystems::GetInstance().GetRobustnessConfigRule( |
| - key_system, media_type, robustness); |
| -} |
| - |
| -EmeConfigRule GetPersistentLicenseSessionConfigRule( |
| - const std::string& key_system) { |
| - return KeySystems::GetInstance().GetPersistentLicenseSessionConfigRule( |
| - key_system); |
| -} |
| - |
| -EmeConfigRule GetPersistentReleaseMessageSessionConfigRule( |
| - const std::string& key_system) { |
| - return KeySystems::GetInstance().GetPersistentReleaseMessageSessionConfigRule( |
| - key_system); |
| -} |
| - |
| -EmeConfigRule GetPersistentStateConfigRule( |
| - const std::string& key_system, |
| - EmeFeatureRequirement requirement) { |
| - return KeySystems::GetInstance().GetPersistentStateConfigRule( |
| - key_system, requirement); |
| -} |
| - |
| -EmeConfigRule GetDistinctiveIdentifierConfigRule( |
| - const std::string& key_system, |
| - EmeFeatureRequirement requirement) { |
| - return KeySystems::GetInstance().GetDistinctiveIdentifierConfigRule( |
| - key_system, requirement); |
| -} |
| - |
| // These two functions are for testing purpose only. The declaration in the |
| // header file is guarded by "#if defined(UNIT_TEST)" so that they can be used |
| // by tests but not non-test code. However, this .cc file is compiled as part of |
| @@ -972,11 +987,11 @@ EmeConfigRule GetDistinctiveIdentifierConfigRule( |
| // "MEDIA_EXPORT" here again so that they are visible to tests. |
| MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask) { |
| - KeySystems::GetInstance().AddContainerMask(container, mask); |
| + KeySystemsImpl::GetInstance().AddContainerMask(container, mask); |
| } |
| MEDIA_EXPORT void AddCodecMask(const std::string& codec, uint32 mask) { |
| - KeySystems::GetInstance().AddCodecMask(codec, mask); |
| + KeySystemsImpl::GetInstance().AddCodecMask(codec, mask); |
| } |
| } // namespace media |