| 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 | 53 |
| 54 // TODO(xhwang): A container or an initDataType may be supported even though | 54 // TODO(xhwang): A container or an initDataType may be supported even though |
| 55 // there are no codecs supported in that container. Fix this when we support | 55 // there are no codecs supported in that container. Fix this when we support |
| 56 // initDataType. | 56 // initDataType. |
| 57 info.supported_codecs = supported_codecs; | 57 info.supported_codecs = supported_codecs; |
| 58 | 58 |
| 59 // Here we assume that support for a container imples support for the | 59 // Here we assume that support for a container imples support for the |
| 60 // associated initialization data type. KeySystems handles validating | 60 // associated initialization data type. KeySystems handles validating |
| 61 // |init_data_type| x |container| pairings. | 61 // |init_data_type| x |container| pairings. |
| 62 if (supported_codecs & media::EME_CODEC_WEBM_ALL) | 62 if (supported_codecs & media::EME_CODEC_WEBM_ALL) |
| 63 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM; | 63 info.supported_init_data_types |= media::kSupportedInitDataTypeWebM; |
| 64 #if defined(USE_PROPRIETARY_CODECS) | 64 #if defined(USE_PROPRIETARY_CODECS) |
| 65 if (supported_codecs & media::EME_CODEC_MP4_ALL) | 65 if (supported_codecs & media::EME_CODEC_MP4_ALL) |
| 66 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; | 66 info.supported_init_data_types |= media::kSupportedInitDataTypeCenc; |
| 67 #endif // defined(USE_PROPRIETARY_CODECS) | 67 #endif // defined(USE_PROPRIETARY_CODECS) |
| 68 | 68 |
| 69 info.persistent_license_support = persistent_license_support; | 69 info.persistent_license_support = persistent_license_support; |
| 70 info.persistent_release_message_support = persistent_release_message_support; | 70 info.persistent_release_message_support = persistent_release_message_support; |
| 71 info.persistent_state_support = persistent_state_support; | 71 info.persistent_state_support = persistent_state_support; |
| 72 info.distinctive_identifier_support = distinctive_identifier_support; | 72 info.distinctive_identifier_support = distinctive_identifier_support; |
| 73 | 73 |
| 74 #if defined(ENABLE_PEPPER_CDMS) | 74 #if defined(ENABLE_PEPPER_CDMS) |
| 75 info.pepper_type = kWidevineCdmPluginMimeType; | 75 info.pepper_type = kWidevineCdmPluginMimeType; |
| 76 #endif // defined(ENABLE_PEPPER_CDMS) | 76 #endif // defined(ENABLE_PEPPER_CDMS) |
| 77 | 77 |
| 78 concrete_key_systems->push_back(info); | 78 concrete_key_systems->push_back(info); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace cdm | 81 } // namespace cdm |
| 82 | 82 |
| 83 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 83 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| OLD | NEW |