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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "media/base/eme_constants.h" | 9 #include "media/base/eme_constants.h" |
10 #include "media/base/key_system_info.h" | 10 #include "media/base/key_system_info.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void TestMediaClient::SetKeySystemsUpdateNeeded() { | 153 void TestMediaClient::SetKeySystemsUpdateNeeded() { |
154 is_update_needed_ = true; | 154 is_update_needed_ = true; |
155 } | 155 } |
156 | 156 |
157 void TestMediaClient::DisableExternalKeySystemSupport() { | 157 void TestMediaClient::DisableExternalKeySystemSupport() { |
158 supports_external_key_system_ = false; | 158 supports_external_key_system_ = false; |
159 } | 159 } |
160 | 160 |
161 void TestMediaClient::AddUsesAesKeySystem( | 161 void TestMediaClient::AddUsesAesKeySystem( |
162 std::vector<KeySystemInfo>* key_systems) { | 162 std::vector<KeySystemInfo>* key_systems) { |
163 KeySystemInfo aes(kUsesAes); | 163 KeySystemInfo aes; |
| 164 aes.key_system = kUsesAes; |
164 aes.supported_codecs = EME_CODEC_WEBM_ALL; | 165 aes.supported_codecs = EME_CODEC_WEBM_ALL; |
165 aes.supported_codecs |= TEST_CODEC_FOO_ALL; | 166 aes.supported_codecs |= TEST_CODEC_FOO_ALL; |
166 aes.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; | 167 aes.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; |
167 aes.use_aes_decryptor = true; | 168 aes.use_aes_decryptor = true; |
168 key_systems->push_back(aes); | 169 key_systems->push_back(aes); |
169 } | 170 } |
170 | 171 |
171 void TestMediaClient::AddExternalKeySystem( | 172 void TestMediaClient::AddExternalKeySystem( |
172 std::vector<KeySystemInfo>* key_systems) { | 173 std::vector<KeySystemInfo>* key_systems) { |
173 KeySystemInfo ext(kExternal); | 174 KeySystemInfo ext; |
| 175 ext.key_system = kExternal; |
174 ext.supported_codecs = EME_CODEC_WEBM_ALL; | 176 ext.supported_codecs = EME_CODEC_WEBM_ALL; |
175 ext.supported_codecs |= TEST_CODEC_FOO_ALL; | 177 ext.supported_codecs |= TEST_CODEC_FOO_ALL; |
176 ext.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; | 178 ext.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; |
177 ext.parent_key_system = kExternalParent; | 179 ext.parent_key_system = kExternalParent; |
178 #if defined(ENABLE_PEPPER_CDMS) | 180 #if defined(ENABLE_PEPPER_CDMS) |
179 ext.pepper_type = "application/x-ppapi-external-cdm"; | 181 ext.pepper_type = "application/x-ppapi-external-cdm"; |
180 #endif // defined(ENABLE_PEPPER_CDMS) | 182 #endif // defined(ENABLE_PEPPER_CDMS) |
181 key_systems->push_back(ext); | 183 key_systems->push_back(ext); |
182 } | 184 } |
183 | 185 |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 | 774 |
773 EXPECT_TRUE(IsSupportedKeySystem(kUsesAes)); | 775 EXPECT_TRUE(IsSupportedKeySystem(kUsesAes)); |
774 EXPECT_TRUE(PrefixedIsSupportedKeySystemWithMediaMimeType( | 776 EXPECT_TRUE(PrefixedIsSupportedKeySystemWithMediaMimeType( |
775 kVideoWebM, no_codecs(), kUsesAes)); | 777 kVideoWebM, no_codecs(), kUsesAes)); |
776 EXPECT_FALSE(IsSupportedKeySystem(kExternal)); | 778 EXPECT_FALSE(IsSupportedKeySystem(kExternal)); |
777 EXPECT_FALSE(PrefixedIsSupportedKeySystemWithMediaMimeType( | 779 EXPECT_FALSE(PrefixedIsSupportedKeySystemWithMediaMimeType( |
778 kVideoWebM, no_codecs(), kExternal)); | 780 kVideoWebM, no_codecs(), kExternal)); |
779 } | 781 } |
780 | 782 |
781 } // namespace media | 783 } // namespace media |
OLD | NEW |