| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 it != key_system_names.end(); ++it) { | 100 it != key_system_names.end(); ++it) { |
| 101 SupportedKeySystemResponse response = QueryKeySystemSupport(*it); | 101 SupportedKeySystemResponse response = QueryKeySystemSupport(*it); |
| 102 if (response.compositing_codecs != media::EME_CODEC_NONE) { | 102 if (response.compositing_codecs != media::EME_CODEC_NONE) { |
| 103 KeySystemInfo info; | 103 KeySystemInfo info; |
| 104 info.key_system = *it; | 104 info.key_system = *it; |
| 105 info.supported_codecs = response.compositing_codecs; | 105 info.supported_codecs = response.compositing_codecs; |
| 106 // Here we assume that support for a container implies support for the | 106 // Here we assume that support for a container implies support for the |
| 107 // associated initialization data type. KeySystems handles validating | 107 // associated initialization data type. KeySystems handles validating |
| 108 // |init_data_type| x |container| pairings. | 108 // |init_data_type| x |container| pairings. |
| 109 if (response.compositing_codecs & media::EME_CODEC_WEBM_ALL) | 109 if (response.compositing_codecs & media::EME_CODEC_WEBM_ALL) |
| 110 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM; | 110 info.supported_init_data_types |= media::kInitDataTypeMaskWebM; |
| 111 #if defined(USE_PROPRIETARY_CODECS) | 111 #if defined(USE_PROPRIETARY_CODECS) |
| 112 if (response.compositing_codecs & media::EME_CODEC_MP4_ALL) | 112 if (response.compositing_codecs & media::EME_CODEC_MP4_ALL) |
| 113 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; | 113 info.supported_init_data_types |= media::kInitDataTypeMaskCenc; |
| 114 #endif // defined(USE_PROPRIETARY_CODECS) | 114 #endif // defined(USE_PROPRIETARY_CODECS) |
| 115 info.max_audio_robustness = EmeRobustness::EMPTY; | 115 info.max_audio_robustness = EmeRobustness::EMPTY; |
| 116 info.max_video_robustness = EmeRobustness::EMPTY; | 116 info.max_video_robustness = EmeRobustness::EMPTY; |
| 117 // Assume the worst case (from a user point of view). | 117 // Assume the worst case (from a user point of view). |
| 118 info.persistent_license_support = media::EME_SESSION_TYPE_NOT_SUPPORTED; | 118 info.persistent_license_support = media::EME_SESSION_TYPE_NOT_SUPPORTED; |
| 119 info.persistent_release_message_support = | 119 info.persistent_release_message_support = |
| 120 media::EME_SESSION_TYPE_NOT_SUPPORTED; | 120 media::EME_SESSION_TYPE_NOT_SUPPORTED; |
| 121 info.persistent_state_support = media::EME_FEATURE_ALWAYS_ENABLED; | 121 info.persistent_state_support = media::EME_FEATURE_ALWAYS_ENABLED; |
| 122 info.distinctive_identifier_support = media::EME_FEATURE_ALWAYS_ENABLED; | 122 info.distinctive_identifier_support = media::EME_FEATURE_ALWAYS_ENABLED; |
| 123 concrete_key_systems->push_back(info); | 123 concrete_key_systems->push_back(info); |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace cdm | 128 } // namespace cdm |
| OLD | NEW |