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