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 "chromecast/renderer/key_systems_cast.h" | 5 #include "chromecast/renderer/key_systems_cast.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "chromecast/media/base/key_systems_common.h" | 11 #include "chromecast/media/base/key_systems_common.h" |
12 #include "components/cdm/renderer/widevine_key_systems.h" | 12 #include "components/cdm/renderer/widevine_key_systems.h" |
13 #include "media/base/eme_constants.h" | 13 #include "media/base/eme_constants.h" |
14 | 14 |
15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
16 | 16 |
17 namespace chromecast { | 17 namespace chromecast { |
18 namespace shell { | 18 namespace shell { |
19 | 19 |
20 void AddKeySystemWithCodecs( | 20 void AddKeySystemWithCodecs( |
ddorwin
2015/02/19 01:41:33
This function is insufficient. I wonder if it is e
sandersd (OOO until July 31)
2015/02/19 21:08:34
Done.
| |
21 const std::string& key_system_name, | 21 const std::string& key_system_name, |
22 std::vector< ::media::KeySystemInfo>* concrete_key_systems) { | 22 std::vector< ::media::KeySystemInfo>* concrete_key_systems) { |
ddorwin
2015/02/19 01:41:33
can we remove the space before ::?
sandersd (OOO until July 31)
2015/02/19 21:08:33
Done.
| |
23 ::media::KeySystemInfo info(key_system_name); | 23 ::media::KeySystemInfo info; |
24 info.key_system = key_system_name; | |
24 info.supported_codecs = ::media::EME_CODEC_MP4_ALL; | 25 info.supported_codecs = ::media::EME_CODEC_MP4_ALL; |
ddorwin
2015/02/19 01:41:33
same as below
sandersd (OOO until July 31)
2015/02/19 21:08:34
Done.
| |
25 concrete_key_systems->push_back(info); | 26 concrete_key_systems->push_back(info); |
26 } | 27 } |
27 | 28 |
28 void AddChromecastKeySystems( | 29 void AddChromecastKeySystems( |
29 std::vector< ::media::KeySystemInfo>* key_systems_info) { | 30 std::vector< ::media::KeySystemInfo>* key_systems_info) { |
30 #if defined(WIDEVINE_CDM_AVAILABLE) | 31 #if defined(WIDEVINE_CDM_AVAILABLE) |
31 AddWidevineWithCodecs(cdm::WIDEVINE, | 32 AddWidevineWithCodecs( |
32 ::media::EME_CODEC_MP4_ALL, | 33 cdm::WIDEVINE, |
33 key_systems_info); | 34 ::media::EME_CODEC_MP4_ALL, |
ddorwin
2015/02/19 01:41:33
Let's not use *_ALL (I know it was there before bu
sandersd (OOO until July 31)
2015/02/19 21:08:34
Done.
sandersd (OOO until July 31)
2015/02/19 21:08:34
Done.
| |
35 ::media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license. | |
36 ::media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message. | |
37 ::media::EME_FEATURE_NOT_SUPPORTED, // Persistent state. | |
38 ::media::EME_FEATURE_ALWAYS_AVAILABLE, // Distinctive identifier. | |
39 key_systems_info); | |
34 #endif | 40 #endif |
35 | 41 |
36 #if defined(PLAYREADY_CDM_AVAILABLE) | 42 #if defined(PLAYREADY_CDM_AVAILABLE) |
37 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem, | 43 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem, |
38 key_systems_info); | 44 key_systems_info); |
39 #endif | 45 #endif |
40 } | 46 } |
41 | 47 |
42 } // namespace shell | 48 } // namespace shell |
43 } // namespace chromecast | 49 } // namespace chromecast |
OLD | NEW |