| 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 "chrome/renderer/media/chrome_key_systems.h" | 5 #include "chrome/renderer/media/chrome_key_systems.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "chrome/common/render_messages.h" | 14 #include "chrome/common/render_messages.h" |
| 15 #include "components/cdm/renderer/widevine_key_systems.h" | 15 #include "components/cdm/renderer/widevine_key_systems.h" |
| 16 #include "content/public/common/eme_constants.h" |
| 16 #include "content/public/renderer/render_thread.h" | 17 #include "content/public/renderer/render_thread.h" |
| 17 | 18 |
| 18 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) |
| 19 #include "components/cdm/renderer/android_key_systems.h" | 20 #include "components/cdm/renderer/android_key_systems.h" |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 23 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
| 23 | 24 |
| 24 // The following must be after widevine_cdm_version.h. | 25 // The following must be after widevine_cdm_version.h. |
| 25 | 26 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 std::vector<base::string16> additional_param_values; | 68 std::vector<base::string16> additional_param_values; |
| 68 if (!IsPepperCdmAvailable(kExternalClearKeyPepperType, | 69 if (!IsPepperCdmAvailable(kExternalClearKeyPepperType, |
| 69 &additional_param_names, | 70 &additional_param_names, |
| 70 &additional_param_values)) { | 71 &additional_param_values)) { |
| 71 return; | 72 return; |
| 72 } | 73 } |
| 73 | 74 |
| 74 KeySystemInfo info(kExternalClearKeyKeySystem); | 75 KeySystemInfo info(kExternalClearKeyKeySystem); |
| 75 | 76 |
| 76 info.supported_codecs = content::EME_CODEC_WEBM_ALL; | 77 info.supported_codecs = content::EME_CODEC_WEBM_ALL; |
| 78 info.supported_init_data_types = content::EME_INIT_DATA_TYPE_WEBM; |
| 77 #if defined(USE_PROPRIETARY_CODECS) | 79 #if defined(USE_PROPRIETARY_CODECS) |
| 78 info.supported_codecs |= content::EME_CODEC_MP4_ALL; | 80 info.supported_codecs |= content::EME_CODEC_MP4_ALL; |
| 81 info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_CENC; |
| 79 #endif // defined(USE_PROPRIETARY_CODECS) | 82 #endif // defined(USE_PROPRIETARY_CODECS) |
| 80 | 83 |
| 81 info.pepper_type = kExternalClearKeyPepperType; | 84 info.pepper_type = kExternalClearKeyPepperType; |
| 82 | 85 |
| 83 concrete_key_systems->push_back(info); | 86 concrete_key_systems->push_back(info); |
| 84 | 87 |
| 85 // Add support of decrypt-only mode in ClearKeyCdm. | 88 // Add support of decrypt-only mode in ClearKeyCdm. |
| 86 info.key_system = kExternalClearKeyDecryptOnlyKeySystem; | 89 info.key_system = kExternalClearKeyDecryptOnlyKeySystem; |
| 87 concrete_key_systems->push_back(info); | 90 concrete_key_systems->push_back(info); |
| 88 | 91 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 185 |
| 183 #if defined(WIDEVINE_CDM_AVAILABLE) | 186 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 184 AddPepperBasedWidevine(key_systems_info); | 187 AddPepperBasedWidevine(key_systems_info); |
| 185 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 188 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| 186 #endif // defined(ENABLE_PEPPER_CDMS) | 189 #endif // defined(ENABLE_PEPPER_CDMS) |
| 187 | 190 |
| 188 #if defined(OS_ANDROID) | 191 #if defined(OS_ANDROID) |
| 189 cdm::AddAndroidWidevine(key_systems_info); | 192 cdm::AddAndroidWidevine(key_systems_info); |
| 190 #endif // defined(OS_ANDROID) | 193 #endif // defined(OS_ANDROID) |
| 191 } | 194 } |
| OLD | NEW |