OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/android_key_systems.h" | 5 #include "components/cdm/renderer/android_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 "components/cdm/common/cdm_messages_android.h" | 11 #include "components/cdm/common/cdm_messages_android.h" |
12 #include "components/cdm/renderer/widevine_key_systems.h" | 12 #include "components/cdm/renderer/widevine_key_systems.h" |
13 #include "content/public/common/eme_codec.h" | |
14 #include "content/public/common/eme_init_data_type.h" | |
13 #include "content/public/renderer/render_thread.h" | 15 #include "content/public/renderer/render_thread.h" |
14 | 16 |
15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 17 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
16 | 18 |
17 using content::KeySystemInfo; | 19 using content::KeySystemInfo; |
18 using content::SupportedCodecs; | 20 using content::SupportedCodecs; |
19 | 21 |
20 namespace cdm { | 22 namespace cdm { |
21 | 23 |
22 static SupportedKeySystemResponse QueryKeySystemSupport( | 24 static SupportedKeySystemResponse QueryKeySystemSupport( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 std::vector<std::string> key_system_names; | 60 std::vector<std::string> key_system_names; |
59 content::RenderThread::Get()->Send( | 61 content::RenderThread::Get()->Send( |
60 new ChromeViewHostMsg_GetPlatformKeySystemNames(&key_system_names)); | 62 new ChromeViewHostMsg_GetPlatformKeySystemNames(&key_system_names)); |
61 | 63 |
62 for (std::vector<std::string>::const_iterator it = key_system_names.begin(); | 64 for (std::vector<std::string>::const_iterator it = key_system_names.begin(); |
63 it != key_system_names.end(); ++it) { | 65 it != key_system_names.end(); ++it) { |
64 SupportedKeySystemResponse response = QueryKeySystemSupport(*it); | 66 SupportedKeySystemResponse response = QueryKeySystemSupport(*it); |
65 if (response.compositing_codecs != content::EME_CODEC_NONE) { | 67 if (response.compositing_codecs != content::EME_CODEC_NONE) { |
66 KeySystemInfo info(*it); | 68 KeySystemInfo info(*it); |
67 info.supported_codecs = response.compositing_codecs; | 69 info.supported_codecs = response.compositing_codecs; |
70 // The MediaDrm API doesn't expose initDataTypes, but platform CDMs are | |
71 // not really trusted to implement them in a spec-compliant way anyway. | |
ddorwin
2014/09/13 01:20:44
It's the key systems we're concerned about in this
sandersd (OOO until July 31)
2014/09/22 23:45:52
Done.
| |
72 info.supported_init_data_types = content::EME_INIT_DATA_TYPE_NONE; | |
68 concrete_key_systems->push_back(info); | 73 concrete_key_systems->push_back(info); |
69 } | 74 } |
70 } | 75 } |
71 } | 76 } |
72 | 77 |
73 } // namespace cdm | 78 } // namespace cdm |
OLD | NEW |