Chromium Code Reviews| 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/media/key_systems_cast.h" | 5 #include "chromecast/renderer/media/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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 bool IsSupportedInitDataType(EmeInitDataType init_data_type) const override { | 42 bool IsSupportedInitDataType(EmeInitDataType init_data_type) const override { |
| 43 return init_data_type == EmeInitDataType::CENC; | 43 return init_data_type == EmeInitDataType::CENC; |
| 44 } | 44 } |
| 45 | 45 |
| 46 SupportedCodecs GetSupportedCodecs() const override { | 46 SupportedCodecs GetSupportedCodecs() const override { |
| 47 SupportedCodecs codecs = | 47 SupportedCodecs codecs = |
| 48 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1; | 48 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1; |
| 49 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) | 49 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) |
| 50 codecs |= ::media::EME_CODEC_MP4_HEVC; | 50 codecs |= ::media::EME_CODEC_MP4_HEVC; |
| 51 #endif | 51 #endif |
| 52 #if BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING) | |
| 53 codecs |= ::media::EME_CODEC_MP4_DV_AVC; | |
|
chcunningham
2017/04/17 16:14:24
Its not easy for me to verify playready supports t
yucliu1
2017/04/18 00:13:02
I'll verify this soon. Chromecast Ultra supports D
yucliu1
2017/04/19 04:34:25
I can verify the reqestMediaKeySystemAccess return
| |
| 54 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) | |
| 55 codecs |= ::media::EME_CODEC_MP4_DV_HEVC; | |
| 56 #endif | |
| 57 #endif | |
| 52 return codecs; | 58 return codecs; |
| 53 } | 59 } |
| 54 | 60 |
| 55 EmeConfigRule GetRobustnessConfigRule( | 61 EmeConfigRule GetRobustnessConfigRule( |
| 56 EmeMediaType media_type, | 62 EmeMediaType media_type, |
| 57 const std::string& requested_robustness) const override { | 63 const std::string& requested_robustness) const override { |
| 58 return requested_robustness.empty() ? EmeConfigRule::SUPPORTED | 64 return requested_robustness.empty() ? EmeConfigRule::SUPPORTED |
| 59 : EmeConfigRule::NOT_SUPPORTED; | 65 : EmeConfigRule::NOT_SUPPORTED; |
| 60 } | 66 } |
| 61 | 67 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 cdm::AddAndroidWidevine(key_systems_properties); | 110 cdm::AddAndroidWidevine(key_systems_properties); |
| 105 #else | 111 #else |
| 106 using Robustness = cdm::WidevineKeySystemProperties::Robustness; | 112 using Robustness = cdm::WidevineKeySystemProperties::Robustness; |
| 107 ::media::SupportedCodecs codecs = | 113 ::media::SupportedCodecs codecs = |
| 108 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1 | | 114 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1 | |
| 109 ::media::EME_CODEC_MP4_VP9 | ::media::EME_CODEC_WEBM_VP8 | | 115 ::media::EME_CODEC_MP4_VP9 | ::media::EME_CODEC_WEBM_VP8 | |
| 110 ::media::EME_CODEC_WEBM_VP9; | 116 ::media::EME_CODEC_WEBM_VP9; |
| 111 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) | 117 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) |
| 112 codecs |= ::media::EME_CODEC_MP4_HEVC; | 118 codecs |= ::media::EME_CODEC_MP4_HEVC; |
| 113 #endif | 119 #endif |
| 120 #if BUILDFLAG(ENABLE_DOLBY_VISION_DEMUXING) | |
| 121 codecs |= ::media::EME_CODEC_MP4_DV_AVC; | |
|
chcunningham
2017/04/17 16:14:24
Ditto here. I'm not sure how to verify Widevine ac
yucliu1
2017/04/18 00:13:01
I have tried some DV codecs with Widevine on Chrom
| |
| 122 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) | |
| 123 codecs |= ::media::EME_CODEC_MP4_DV_HEVC; | |
| 124 #endif | |
| 125 #endif | |
| 114 key_systems_properties->emplace_back(new cdm::WidevineKeySystemProperties( | 126 key_systems_properties->emplace_back(new cdm::WidevineKeySystemProperties( |
| 115 codecs, // Regular codecs. | 127 codecs, // Regular codecs. |
| 116 Robustness::HW_SECURE_ALL, // Max audio robustness. | 128 Robustness::HW_SECURE_ALL, // Max audio robustness. |
| 117 Robustness::HW_SECURE_ALL, // Max video robustness. | 129 Robustness::HW_SECURE_ALL, // Max video robustness. |
| 118 enable_persistent_license_support | 130 enable_persistent_license_support |
| 119 ? EmeSessionTypeSupport::SUPPORTED | 131 ? EmeSessionTypeSupport::SUPPORTED |
| 120 : EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license. | 132 : EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license. |
| 121 EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message. | 133 EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message. |
| 122 // Note: On Chromecast, all CDMs may have persistent state. | 134 // Note: On Chromecast, all CDMs may have persistent state. |
| 123 EmeFeatureSupport::ALWAYS_ENABLED, // Persistent state. | 135 EmeFeatureSupport::ALWAYS_ENABLED, // Persistent state. |
| 124 EmeFeatureSupport::ALWAYS_ENABLED)); // Distinctive identifier. | 136 EmeFeatureSupport::ALWAYS_ENABLED)); // Distinctive identifier. |
| 125 #endif // defined(OS_ANDROID) | 137 #endif // defined(OS_ANDROID) |
| 126 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 138 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| 127 } | 139 } |
| 128 | 140 |
| 129 } // namespace media | 141 } // namespace media |
| 130 } // namespace chromecast | 142 } // namespace chromecast |
| OLD | NEW |