Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: chromecast/renderer/key_systems_cast.cc

Issue 2043763002: [Chromecast] Buildfix in Android PR codepath (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 EmeConfigRule GetRobustnessConfigRule( 49 EmeConfigRule GetRobustnessConfigRule(
50 EmeMediaType media_type, 50 EmeMediaType media_type,
51 const std::string& requested_robustness) const override { 51 const std::string& requested_robustness) const override {
52 return requested_robustness.empty() ? EmeConfigRule::SUPPORTED 52 return requested_robustness.empty() ? EmeConfigRule::SUPPORTED
53 : EmeConfigRule::NOT_SUPPORTED; 53 : EmeConfigRule::NOT_SUPPORTED;
54 } 54 }
55 55
56 EmeSessionTypeSupport GetPersistentLicenseSessionSupport() const override { 56 EmeSessionTypeSupport GetPersistentLicenseSessionSupport() const override {
57 #if defined(OS_ANDROID)
58 return EmeSessionTypeSupport::NOT_SUPPORTED;
59 #else
60 return persistent_license_support_ ? EmeSessionTypeSupport::SUPPORTED 57 return persistent_license_support_ ? EmeSessionTypeSupport::SUPPORTED
61 : EmeSessionTypeSupport::NOT_SUPPORTED; 58 : EmeSessionTypeSupport::NOT_SUPPORTED;
62 #endif
63 } 59 }
64 60
65 EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport() 61 EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport()
66 const override { 62 const override {
67 return EmeSessionTypeSupport::NOT_SUPPORTED; 63 return EmeSessionTypeSupport::NOT_SUPPORTED;
68 } 64 }
69 65
70 EmeFeatureSupport GetPersistentStateSupport() const override { 66 EmeFeatureSupport GetPersistentStateSupport() const override {
71 return EmeFeatureSupport::ALWAYS_ENABLED; 67 return EmeFeatureSupport::ALWAYS_ENABLED;
72 } 68 }
73 EmeFeatureSupport GetDistinctiveIdentifierSupport() const override { 69 EmeFeatureSupport GetDistinctiveIdentifierSupport() const override {
74 return EmeFeatureSupport::ALWAYS_ENABLED; 70 return EmeFeatureSupport::ALWAYS_ENABLED;
75 } 71 }
76 72
77 private: 73 private:
78 const bool persistent_license_support_; 74 const bool persistent_license_support_;
79 }; 75 };
80 #endif // PLAYREADY_CDM_AVAILABLE 76 #endif // PLAYREADY_CDM_AVAILABLE
81 77
82 } // namespace 78 } // namespace
83 79
84 void AddChromecastKeySystems( 80 void AddChromecastKeySystems(
85 std::vector<std::unique_ptr<::media::KeySystemProperties>>* 81 std::vector<std::unique_ptr<::media::KeySystemProperties>>*
86 key_systems_properties, 82 key_systems_properties,
87 bool enable_persistent_license_support) { 83 bool enable_persistent_license_support) {
88 #if defined(PLAYREADY_CDM_AVAILABLE) 84 #if defined(PLAYREADY_CDM_AVAILABLE)
85 #if defined(OS_ANDROID)
86 CHECK(!enable_persistent_license_support);
87 #endif
89 key_systems_properties->emplace_back( 88 key_systems_properties->emplace_back(
90 new PlayReadyKeySystemProperties(enable_persistent_license_support)); 89 new PlayReadyKeySystemProperties(enable_persistent_license_support));
91 #endif // defined(PLAYREADY_CDM_AVAILABLE) 90 #endif // defined(PLAYREADY_CDM_AVAILABLE)
92 91
93 #if defined(WIDEVINE_CDM_AVAILABLE) 92 #if defined(WIDEVINE_CDM_AVAILABLE)
94 using Robustness = cdm::WidevineKeySystemProperties::Robustness; 93 using Robustness = cdm::WidevineKeySystemProperties::Robustness;
95 ::media::SupportedCodecs codecs = 94 ::media::SupportedCodecs codecs =
96 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1 | 95 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1 |
97 ::media::EME_CODEC_WEBM_VP8 | ::media::EME_CODEC_WEBM_VP9; 96 ::media::EME_CODEC_WEBM_VP8 | ::media::EME_CODEC_WEBM_VP9;
98 key_systems_properties->emplace_back(new cdm::WidevineKeySystemProperties( 97 key_systems_properties->emplace_back(new cdm::WidevineKeySystemProperties(
99 codecs, // Regular codecs. 98 codecs, // Regular codecs.
100 #if defined(OS_ANDROID) 99 #if defined(OS_ANDROID)
101 codecs, // Hardware-secure codecs. 100 codecs, // Hardware-secure codecs.
102 #endif 101 #endif
103 Robustness::HW_SECURE_ALL, // Max audio robustness. 102 Robustness::HW_SECURE_ALL, // Max audio robustness.
104 Robustness::HW_SECURE_ALL, // Max video robustness. 103 Robustness::HW_SECURE_ALL, // Max video robustness.
105 EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license. 104 EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
106 EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message. 105 EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-release-message.
107 // Note: On Chromecast, all CDMs may have persistent state. 106 // Note: On Chromecast, all CDMs may have persistent state.
108 EmeFeatureSupport::ALWAYS_ENABLED, // Persistent state. 107 EmeFeatureSupport::ALWAYS_ENABLED, // Persistent state.
109 EmeFeatureSupport::ALWAYS_ENABLED)); // Distinctive identifier. 108 EmeFeatureSupport::ALWAYS_ENABLED)); // Distinctive identifier.
110 #endif // defined(WIDEVINE_CDM_AVAILABLE) 109 #endif // defined(WIDEVINE_CDM_AVAILABLE)
111 } 110 }
112 111
113 } // namespace shell 112 } // namespace shell
114 } // namespace chromecast 113 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698