OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chromecast/shell/renderer/key_systems_cast.h" | |
6 | |
7 #include <string> | |
8 | |
9 #include "base/command_line.h" | |
10 #include "base/logging.h" | |
11 #include "chromecast/media/base/key_systems_common.h" | |
12 #include "components/cdm/renderer/widevine_key_systems.h" | |
13 #include "content/public/common/eme_codec.h" | |
14 | |
15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | |
16 | |
17 using content::KeySystemInfo; | |
18 | |
19 namespace { | |
20 | |
21 void AddKeySystemWithCodecs( | |
22 const std::string& key_system_name, | |
23 std::vector<KeySystemInfo>* concrete_key_systems) { | |
24 KeySystemInfo info(key_system_name); | |
25 info.supported_codecs = content::EME_CODEC_MP4_ALL; | |
26 concrete_key_systems->push_back(info); | |
27 } | |
28 | |
29 } // namespace | |
30 | |
31 namespace chromecast { | |
32 namespace shell { | |
33 | |
34 void AddChromecastKeySystems(std::vector<KeySystemInfo>* key_systems_info) { | |
35 // Chromecast supports using "org.w3.clearkey" with webkitGenerateKeyRequest, | |
36 // which key_systems.cc rewrites to "unsupported-org.w3.clearkey". | |
37 // TODO(gunsch): remove this after moving to EMEv2. | |
ddorwin
2014/09/15 22:50:53
ditto on v2
gunsch
2014/09/16 16:58:00
Done.
| |
38 // See: crbug/393397 | |
ddorwin
2014/09/15 22:50:53
I don't think this bug addresses the clear key nam
gunsch
2014/09/16 16:58:00
Done.
| |
39 AddKeySystemWithCodecs(kUnsupportedClearKeySystem, key_systems_info); | |
40 | |
41 #if defined(WIDEVINE_CDM_AVAILABLE) | |
42 AddWidevineWithCodecs(cdm::WIDEVINE, | |
43 content::EME_CODEC_MP4_ALL, | |
44 key_systems_info); | |
45 #endif | |
46 | |
47 #if defined(PLAYREADY_CDM_AVAILABLE) | |
48 for (size_t i = 0; kPlayreadyKeySystems[i] != NULL; i++) { | |
49 AddKeySystemWithCodecs(kPlayreadyKeySystems[i], key_systems_info); | |
50 } | |
51 #endif | |
52 } | |
53 | |
54 } // namespace shell | |
55 } // namespace chromecast | |
OLD | NEW |