| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/cdm/renderer/widevine_key_system_properties.h" | 5 #include "components/cdm/renderer/widevine_key_system_properties.h" |
| 6 | 6 |
| 7 #include "media/media_features.h" | |
| 8 #include "ppapi/features/features.h" | 7 #include "ppapi/features/features.h" |
| 9 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 8 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
| 10 | 9 |
| 11 #if defined(WIDEVINE_CDM_AVAILABLE) | 10 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 12 | 11 |
| 13 using media::EmeConfigRule; | 12 using media::EmeConfigRule; |
| 14 using media::EmeFeatureSupport; | 13 using media::EmeFeatureSupport; |
| 15 using media::EmeInitDataType; | 14 using media::EmeInitDataType; |
| 16 using media::EmeMediaType; | 15 using media::EmeMediaType; |
| 17 using media::EmeSessionTypeSupport; | 16 using media::EmeSessionTypeSupport; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 return kWidevineKeySystem; | 65 return kWidevineKeySystem; |
| 67 } | 66 } |
| 68 | 67 |
| 69 bool WidevineKeySystemProperties::IsSupportedInitDataType( | 68 bool WidevineKeySystemProperties::IsSupportedInitDataType( |
| 70 EmeInitDataType init_data_type) const { | 69 EmeInitDataType init_data_type) const { |
| 71 // Here we assume that support for a container imples support for the | 70 // Here we assume that support for a container imples support for the |
| 72 // associated initialization data type. KeySystems handles validating | 71 // associated initialization data type. KeySystems handles validating |
| 73 // |init_data_type| x |container| pairings. | 72 // |init_data_type| x |container| pairings. |
| 74 if (init_data_type == EmeInitDataType::WEBM) | 73 if (init_data_type == EmeInitDataType::WEBM) |
| 75 return (supported_codecs_ & media::EME_CODEC_WEBM_ALL) != 0; | 74 return (supported_codecs_ & media::EME_CODEC_WEBM_ALL) != 0; |
| 76 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 75 #if defined(USE_PROPRIETARY_CODECS) |
| 77 if (init_data_type == EmeInitDataType::CENC) | 76 if (init_data_type == EmeInitDataType::CENC) |
| 78 return (supported_codecs_ & media::EME_CODEC_MP4_ALL) != 0; | 77 return (supported_codecs_ & media::EME_CODEC_MP4_ALL) != 0; |
| 79 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) | 78 #endif // defined(USE_PROPRIETARY_CODECS) |
| 80 | 79 |
| 81 return false; | 80 return false; |
| 82 } | 81 } |
| 83 | 82 |
| 84 SupportedCodecs WidevineKeySystemProperties::GetSupportedCodecs() const { | 83 SupportedCodecs WidevineKeySystemProperties::GetSupportedCodecs() const { |
| 85 return supported_codecs_; | 84 return supported_codecs_; |
| 86 } | 85 } |
| 87 | 86 |
| 88 #if defined(OS_ANDROID) | 87 #if defined(OS_ANDROID) |
| 89 SupportedCodecs WidevineKeySystemProperties::GetSupportedSecureCodecs() const { | 88 SupportedCodecs WidevineKeySystemProperties::GetSupportedSecureCodecs() const { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 164 |
| 166 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 165 #if BUILDFLAG(ENABLE_PEPPER_CDMS) |
| 167 std::string WidevineKeySystemProperties::GetPepperType() const { | 166 std::string WidevineKeySystemProperties::GetPepperType() const { |
| 168 return kWidevineCdmPluginMimeType; | 167 return kWidevineCdmPluginMimeType; |
| 169 } | 168 } |
| 170 #endif | 169 #endif |
| 171 | 170 |
| 172 } // namespace cdm | 171 } // namespace cdm |
| 173 | 172 |
| 174 #endif // WIDEVINE_CDM_AVAILABLE | 173 #endif // WIDEVINE_CDM_AVAILABLE |
| OLD | NEW |