external_clear_key_key_system_properties.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_CDM_RENDERER_EXTERNAL_CLEAR_KEY_KEY_SYSTEM_PROPERTIES_H_
  5. #define COMPONENTS_CDM_RENDERER_EXTERNAL_CLEAR_KEY_KEY_SYSTEM_PROPERTIES_H_
  6. #include <string>
  7. #include "build/build_config.h"
  8. #include "media/base/key_system_properties.h"
  9. #include "media/media_buildflags.h"
  10. #include "third_party/abseil-cpp/absl/types/optional.h"
  11. namespace cdm {
  12. // KeySystemProperties implementation for external Clear Key key systems.
  13. class ExternalClearKeyProperties : public media::KeySystemProperties {
  14. public:
  15. ExternalClearKeyProperties();
  16. ~ExternalClearKeyProperties() override;
  17. std::string GetBaseKeySystemName() const override;
  18. bool IsSupportedKeySystem(const std::string& key_system) const override;
  19. bool IsSupportedInitDataType(
  20. media::EmeInitDataType init_data_type) const override;
  21. media::EmeConfig::Rule GetEncryptionSchemeConfigRule(
  22. media::EncryptionScheme encryption_scheme) const override;
  23. media::SupportedCodecs GetSupportedCodecs() const override;
  24. media::EmeConfig::Rule GetRobustnessConfigRule(
  25. const std::string& key_system,
  26. media::EmeMediaType media_type,
  27. const std::string& requested_robustness,
  28. const bool* hw_secure_requirement) const override;
  29. media::EmeConfig::Rule GetPersistentLicenseSessionSupport() const override;
  30. media::EmeFeatureSupport GetPersistentStateSupport() const override;
  31. media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override;
  32. };
  33. } // namespace cdm
  34. #endif // COMPONENTS_CDM_RENDERER_EXTERNAL_CLEAR_KEY_KEY_SYSTEM_PROPERTIES_H_