| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "chrome/common/render_messages.h" | 17 #include "chrome/common/render_messages.h" |
| 18 #include "components/cdm/renderer/widevine_key_systems.h" | 18 #include "components/cdm/renderer/widevine_key_systems.h" |
| 19 #include "content/public/renderer/render_thread.h" | 19 #include "content/public/renderer/render_thread.h" |
| 20 #include "media/base/eme_constants.h" | 20 #include "media/base/eme_constants.h" |
| 21 #include "media/media_features.h" |
| 21 | 22 |
| 22 #if defined(OS_ANDROID) | 23 #if defined(OS_ANDROID) |
| 23 #include "components/cdm/renderer/android_key_systems.h" | 24 #include "components/cdm/renderer/android_key_systems.h" |
| 24 #endif | 25 #endif |
| 25 | 26 |
| 26 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 27 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
| 27 | 28 |
| 28 // The following must be after widevine_cdm_version.h. | 29 // The following must be after widevine_cdm_version.h. |
| 29 | 30 |
| 30 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) | 31 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 #endif // defined(USE_PROPRIETARY_CODECS) | 184 #endif // defined(USE_PROPRIETARY_CODECS) |
| 184 | 185 |
| 185 for (size_t i = 0; i < codecs.size(); ++i) { | 186 for (size_t i = 0; i < codecs.size(); ++i) { |
| 186 if (codecs[i] == kCdmSupportedCodecVp8) | 187 if (codecs[i] == kCdmSupportedCodecVp8) |
| 187 supported_codecs |= media::EME_CODEC_WEBM_VP8; | 188 supported_codecs |= media::EME_CODEC_WEBM_VP8; |
| 188 if (codecs[i] == kCdmSupportedCodecVp9) | 189 if (codecs[i] == kCdmSupportedCodecVp9) |
| 189 supported_codecs |= media::EME_CODEC_WEBM_VP9; | 190 supported_codecs |= media::EME_CODEC_WEBM_VP9; |
| 190 #if defined(USE_PROPRIETARY_CODECS) | 191 #if defined(USE_PROPRIETARY_CODECS) |
| 191 if (codecs[i] == kCdmSupportedCodecAvc1) | 192 if (codecs[i] == kCdmSupportedCodecAvc1) |
| 192 supported_codecs |= media::EME_CODEC_MP4_AVC1; | 193 supported_codecs |= media::EME_CODEC_MP4_AVC1; |
| 194 #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING) |
| 195 if (codecs[i] == kCdmSupportedCodecVp9) |
| 196 supported_codecs |= media::EME_CODEC_MP4_VP9; |
| 197 #endif |
| 193 #endif // defined(USE_PROPRIETARY_CODECS) | 198 #endif // defined(USE_PROPRIETARY_CODECS) |
| 194 } | 199 } |
| 195 | 200 |
| 196 cdm::AddWidevineWithCodecs( | 201 cdm::AddWidevineWithCodecs( |
| 197 supported_codecs, | 202 supported_codecs, |
| 198 #if defined(OS_CHROMEOS) | 203 #if defined(OS_CHROMEOS) |
| 199 media::EmeRobustness::HW_SECURE_ALL, // Maximum audio robustness. | 204 media::EmeRobustness::HW_SECURE_ALL, // Maximum audio robustness. |
| 200 media::EmeRobustness::HW_SECURE_ALL, // Maximim video robustness. | 205 media::EmeRobustness::HW_SECURE_ALL, // Maximim video robustness. |
| 201 media::EmeSessionTypeSupport:: | 206 media::EmeSessionTypeSupport:: |
| 202 SUPPORTED_WITH_IDENTIFIER, // Persistent-license. | 207 SUPPORTED_WITH_IDENTIFIER, // Persistent-license. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 224 | 229 |
| 225 #if defined(WIDEVINE_CDM_AVAILABLE) | 230 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 226 AddPepperBasedWidevine(key_systems_info); | 231 AddPepperBasedWidevine(key_systems_info); |
| 227 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 232 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| 228 #endif // defined(ENABLE_PEPPER_CDMS) | 233 #endif // defined(ENABLE_PEPPER_CDMS) |
| 229 | 234 |
| 230 #if defined(OS_ANDROID) | 235 #if defined(OS_ANDROID) |
| 231 cdm::AddAndroidWidevine(key_systems_info); | 236 cdm::AddAndroidWidevine(key_systems_info); |
| 232 #endif // defined(OS_ANDROID) | 237 #endif // defined(OS_ANDROID) |
| 233 } | 238 } |
| OLD | NEW |