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 "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 9 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 #endif // defined(USE_PROPRIETARY_CODECS) | 102 #endif // defined(USE_PROPRIETARY_CODECS) |
103 | 103 |
104 AddWidevineWithCodecs(supported_codecs, concrete_key_systems); | 104 AddWidevineWithCodecs(supported_codecs, concrete_key_systems); |
105 } | 105 } |
106 #elif defined(OS_ANDROID) | 106 #elif defined(OS_ANDROID) |
107 static void AddAndroidWidevine( | 107 static void AddAndroidWidevine( |
108 std::vector<KeySystemInfo>* concrete_key_systems) { | 108 std::vector<KeySystemInfo>* concrete_key_systems) { |
109 #if defined(USE_PROPRIETARY_CODECS) | 109 #if defined(USE_PROPRIETARY_CODECS) |
110 SupportedCodecs supported_codecs = | 110 SupportedCodecs supported_codecs = |
111 static_cast<SupportedCodecs>(MP4_AAC | MP4_AVC1); | 111 static_cast<SupportedCodecs>(MP4_AAC | MP4_AVC1); |
112 AddWidevineForTypes(supported_codecs, concrete_key_systems); | 112 AddWidevineWithCodecs(supported_codecs, concrete_key_systems); |
113 #endif // defined(USE_PROPRIETARY_CODECS) | 113 #endif // defined(USE_PROPRIETARY_CODECS) |
114 } | 114 } |
115 #endif // defined(ENABLE_PEPPER_CDMS) | 115 #endif // defined(ENABLE_PEPPER_CDMS) |
116 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 116 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
117 | 117 |
118 static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) { | 118 static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) { |
119 KeySystemInfo info(kClearKeyKeySystem); | 119 KeySystemInfo info(kClearKeyKeySystem); |
120 | 120 |
121 info.supported_types.push_back(std::make_pair(kAudioWebM, kVorbis)); | 121 info.supported_types.push_back(std::make_pair(kAudioWebM, kVorbis)); |
122 info.supported_types.push_back(std::make_pair(kVideoWebM, kVorbisVP8)); | 122 info.supported_types.push_back(std::make_pair(kVideoWebM, kVorbisVP8)); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 #endif | 162 #endif |
163 | 163 |
164 #if defined(WIDEVINE_CDM_AVAILABLE) | 164 #if defined(WIDEVINE_CDM_AVAILABLE) |
165 #if defined(ENABLE_PEPPER_CDMS) | 165 #if defined(ENABLE_PEPPER_CDMS) |
166 AddPepperBasedWidevine(key_systems_info); | 166 AddPepperBasedWidevine(key_systems_info); |
167 #elif defined(OS_ANDROID) | 167 #elif defined(OS_ANDROID) |
168 AddAndroidWidevine(key_systems_info); | 168 AddAndroidWidevine(key_systems_info); |
169 #endif | 169 #endif |
170 #endif | 170 #endif |
171 } | 171 } |
OLD | NEW |