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/widevine_key_systems.h" | 5 #include "components/cdm/renderer/widevine_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" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 // Here we assume that support for a container imples support for the | 53 // Here we assume that support for a container imples support for the |
54 // associated initialization data type. KeySystems handles validating | 54 // associated initialization data type. KeySystems handles validating |
55 // |init_data_type| x |container| pairings. | 55 // |init_data_type| x |container| pairings. |
56 if (supported_codecs & media::EME_CODEC_WEBM_ALL) | 56 if (supported_codecs & media::EME_CODEC_WEBM_ALL) |
57 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM; | 57 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM; |
58 #if defined(USE_PROPRIETARY_CODECS) | 58 #if defined(USE_PROPRIETARY_CODECS) |
59 if (supported_codecs & media::EME_CODEC_MP4_ALL) | 59 if (supported_codecs & media::EME_CODEC_MP4_ALL) |
60 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; | 60 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; |
61 #endif // defined(USE_PROPRIETARY_CODECS) | 61 #endif // defined(USE_PROPRIETARY_CODECS) |
62 | 62 |
63 #if defined(OS_ANDROID) | |
64 info.persistent_state_requirement = media::EME_REQUIREMENT_NOT_ALLOWED; | |
65 info.distinctive_identifier_requirement = media::EME_REQUIREMENT_REQUIRED; | |
66 info.supported_session_types = media::EME_SESSION_TYPE_TEMPORARY; | |
67 #elif defined(OS_CHROMEOS) | |
68 info.persistent_state_requirement = media::EME_REQUIREMENT_OPTIONAL; | |
69 // A distinctive identifier will be available if remote attestation succeeds. | |
70 // TODO(sandersd): Change to optional once CDM8 adds the ability to block | |
ddorwin
2015/02/17 20:56:47
Add a bug reference.
Also, it may be helpful to e
sandersd (OOO until July 31)
2015/02/18 23:41:17
Done.
| |
71 // access to the distinctive identifier based on the configuration (not just | |
72 // based on the permission). | |
73 info.distinctive_identifier_requirement = media::EME_REQUIREMENT_REQUIRED; | |
74 // Persistent licenses will be available if remote attestation succeeds. | |
75 // TODO(sandersd): Add PERSISTENT_LICENSE once there is logic to predict if | |
ddorwin
2015/02/17 20:56:47
Would it help to have PERSISTENT_LICENSE_WITH_AUTH
sandersd (OOO until July 31)
2015/02/18 23:41:17
Done.
This isn't a perfect definition, since what
| |
76 // remote attestation will succeed. | |
77 info.supported_session_types = media::EME_SESSION_TYPE_TEMPORARY; | |
78 #else | |
ddorwin
2015/02/17 20:56:46
This is Windows, Mac, Linux desktop, Cast, and eve
sandersd (OOO until July 31)
2015/02/18 23:41:17
Done.
| |
79 info.persistent_state_requirement = media::EME_REQUIREMENT_OPTIONAL; | |
80 info.distinctive_identifier_requirement = media::EME_REQUIREMENT_NOT_ALLOWED; | |
81 info.supported_session_types = media::EME_SESSION_TYPE_TEMPORARY; | |
82 #endif | |
83 | |
63 #if defined(ENABLE_PEPPER_CDMS) | 84 #if defined(ENABLE_PEPPER_CDMS) |
64 info.pepper_type = kWidevineCdmPluginMimeType; | 85 info.pepper_type = kWidevineCdmPluginMimeType; |
65 #endif // defined(ENABLE_PEPPER_CDMS) | 86 #endif // defined(ENABLE_PEPPER_CDMS) |
66 | 87 |
67 concrete_key_systems->push_back(info); | 88 concrete_key_systems->push_back(info); |
68 } | 89 } |
69 | 90 |
70 } // namespace cdm | 91 } // namespace cdm |
71 | 92 |
72 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 93 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
OLD | NEW |