OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_BASE_KEY_SYSTEM_PROPERTIES_H_ | 5 #ifndef MEDIA_BASE_KEY_SYSTEM_PROPERTIES_H_ |
6 #define MEDIA_BASE_KEY_SYSTEM_PROPERTIES_H_ | 6 #define MEDIA_BASE_KEY_SYSTEM_PROPERTIES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" | |
11 #include "media/base/eme_constants.h" | 10 #include "media/base/eme_constants.h" |
12 #include "media/base/key_system_info.h" | |
13 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
14 | 12 |
15 namespace media { | 13 namespace media { |
16 | 14 |
17 // Provides an interface for querying the properties of a registered key system. | 15 // Provides an interface for querying the properties of a registered key system. |
18 class MEDIA_EXPORT KeySystemProperties { | 16 class MEDIA_EXPORT KeySystemProperties { |
19 public: | 17 public: |
20 virtual ~KeySystemProperties() {} | 18 virtual ~KeySystemProperties() {} |
21 | 19 |
22 // Gets the name of this key system. | 20 // Gets the name of this key system. |
(...skipping 28 matching lines...) Expand all Loading... |
51 | 49 |
52 // Returns the support this key system provides for distinctive identifiers. | 50 // Returns the support this key system provides for distinctive identifiers. |
53 virtual EmeFeatureSupport GetDistinctiveIdentifierSupport() const = 0; | 51 virtual EmeFeatureSupport GetDistinctiveIdentifierSupport() const = 0; |
54 | 52 |
55 // Returns whether AesDecryptor can be used for this key system. | 53 // Returns whether AesDecryptor can be used for this key system. |
56 virtual bool UseAesDecryptor() const; | 54 virtual bool UseAesDecryptor() const; |
57 | 55 |
58 virtual std::string GetPepperType() const; | 56 virtual std::string GetPepperType() const; |
59 }; | 57 }; |
60 | 58 |
61 // TODO(halliwell): remove this before M52. Replace with subclasses that | |
62 // directly implement the different cases (e.g. ClearKey, Widevine, Cast). | |
63 class MEDIA_EXPORT InfoBasedKeySystemProperties : public KeySystemProperties { | |
64 public: | |
65 InfoBasedKeySystemProperties(const KeySystemInfo& info); | |
66 | |
67 std::string GetKeySystemName() const override; | |
68 bool IsSupportedInitDataType(EmeInitDataType init_data_type) const override; | |
69 | |
70 SupportedCodecs GetSupportedCodecs() const override; | |
71 #if defined(OS_ANDROID) | |
72 SupportedCodecs GetSupportedSecureCodecs() const override; | |
73 #endif | |
74 | |
75 EmeConfigRule GetRobustnessConfigRule( | |
76 EmeMediaType media_type, | |
77 const std::string& requested_robustness) const override; | |
78 EmeSessionTypeSupport GetPersistentLicenseSessionSupport() const override; | |
79 EmeSessionTypeSupport GetPersistentReleaseMessageSessionSupport() | |
80 const override; | |
81 EmeFeatureSupport GetPersistentStateSupport() const override; | |
82 EmeFeatureSupport GetDistinctiveIdentifierSupport() const override; | |
83 bool UseAesDecryptor() const override; | |
84 | |
85 #if defined(ENABLE_PEPPER_CDMS) | |
86 std::string GetPepperType() const override; | |
87 #endif | |
88 | |
89 private: | |
90 const KeySystemInfo info_; | |
91 }; | |
92 | |
93 } // namespace media | 59 } // namespace media |
94 | 60 |
95 #endif // MEDIA_BASE_KEY_SYSTEM_PROPERTIES_H_ | 61 #endif // MEDIA_BASE_KEY_SYSTEM_PROPERTIES_H_ |
OLD | NEW |