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

Side by Side Diff: components/cdm/renderer/external_clear_key_key_system_properties.cc

Issue 2580093002: Revert of Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/external_clear_key_key_system_properties.h" 5 #include "components/cdm/renderer/external_clear_key_key_system_properties.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/eme_constants.h" 8 #include "media/base/eme_constants.h"
9 #include "media/media_features.h"
10 #include "ppapi/features/features.h" 9 #include "ppapi/features/features.h"
11 10
12 namespace cdm { 11 namespace cdm {
13 12
14 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 13 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
15 const char kExternalClearKeyPepperType[] = "application/x-ppapi-clearkey-cdm"; 14 const char kExternalClearKeyPepperType[] = "application/x-ppapi-clearkey-cdm";
16 #endif 15 #endif
17 16
18 ExternalClearKeyProperties::ExternalClearKeyProperties( 17 ExternalClearKeyProperties::ExternalClearKeyProperties(
19 const std::string& key_system_name) 18 const std::string& key_system_name)
20 : key_system_name_(key_system_name) {} 19 : key_system_name_(key_system_name) {}
21 20
22 ExternalClearKeyProperties::~ExternalClearKeyProperties() {} 21 ExternalClearKeyProperties::~ExternalClearKeyProperties() {}
23 22
24 std::string ExternalClearKeyProperties::GetKeySystemName() const { 23 std::string ExternalClearKeyProperties::GetKeySystemName() const {
25 return key_system_name_; 24 return key_system_name_;
26 } 25 }
27 26
28 bool ExternalClearKeyProperties::IsSupportedInitDataType( 27 bool ExternalClearKeyProperties::IsSupportedInitDataType(
29 media::EmeInitDataType init_data_type) const { 28 media::EmeInitDataType init_data_type) const {
30 switch (init_data_type) { 29 switch (init_data_type) {
31 case media::EmeInitDataType::WEBM: 30 case media::EmeInitDataType::WEBM:
32 case media::EmeInitDataType::KEYIDS: 31 case media::EmeInitDataType::KEYIDS:
33 return true; 32 return true;
34 33
35 case media::EmeInitDataType::CENC: 34 case media::EmeInitDataType::CENC:
36 #if BUILDFLAG(USE_PROPRIETARY_CODECS) 35 #if defined(USE_PROPRIETARY_CODECS)
37 return true; 36 return true;
38 #else 37 #else
39 return false; 38 return false;
40 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) 39 #endif // defined(USE_PROPRIETARY_CODECS)
41 40
42 case media::EmeInitDataType::UNKNOWN: 41 case media::EmeInitDataType::UNKNOWN:
43 return false; 42 return false;
44 } 43 }
45 NOTREACHED(); 44 NOTREACHED();
46 return false; 45 return false;
47 } 46 }
48 47
49 media::SupportedCodecs ExternalClearKeyProperties::GetSupportedCodecs() const { 48 media::SupportedCodecs ExternalClearKeyProperties::GetSupportedCodecs() const {
50 #if BUILDFLAG(USE_PROPRIETARY_CODECS) 49 #if defined(USE_PROPRIETARY_CODECS)
51 return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL; 50 return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL;
52 #else 51 #else
53 return media::EME_CODEC_WEBM_ALL; 52 return media::EME_CODEC_WEBM_ALL;
54 #endif 53 #endif
55 } 54 }
56 55
57 media::EmeConfigRule ExternalClearKeyProperties::GetRobustnessConfigRule( 56 media::EmeConfigRule ExternalClearKeyProperties::GetRobustnessConfigRule(
58 media::EmeMediaType media_type, 57 media::EmeMediaType media_type,
59 const std::string& requested_robustness) const { 58 const std::string& requested_robustness) const {
60 return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED 59 return requested_robustness.empty() ? media::EmeConfigRule::SUPPORTED
(...skipping 21 matching lines...) Expand all
82 return media::EmeFeatureSupport::NOT_SUPPORTED; 81 return media::EmeFeatureSupport::NOT_SUPPORTED;
83 } 82 }
84 83
85 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 84 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
86 std::string ExternalClearKeyProperties::GetPepperType() const { 85 std::string ExternalClearKeyProperties::GetPepperType() const {
87 return kExternalClearKeyPepperType; 86 return kExternalClearKeyPepperType;
88 } 87 }
89 #endif 88 #endif
90 89
91 } // namespace cdm 90 } // namespace cdm
OLDNEW
« no previous file with comments | « components/cdm/renderer/android_key_systems.cc ('k') | components/cdm/renderer/widevine_key_system_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698