2022-08-26 15:44:59 +00:00
|
|
|
// Copyright 2017 Google LLC. All rights reserved.
|
2017-09-12 19:22:39 +00:00
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
2018-09-17 22:04:38 +00:00
|
|
|
#ifndef PACKAGER_MEDIA_BASE_COMMON_PSSH_GENERATOR_H_
|
|
|
|
#define PACKAGER_MEDIA_BASE_COMMON_PSSH_GENERATOR_H_
|
2017-09-12 19:22:39 +00:00
|
|
|
|
|
|
|
#include "packager/media/base/pssh_generator.h"
|
|
|
|
|
|
|
|
namespace shaka {
|
|
|
|
namespace media {
|
|
|
|
|
2018-09-17 22:04:38 +00:00
|
|
|
class CommonPsshGenerator : public PsshGenerator {
|
2017-09-12 19:22:39 +00:00
|
|
|
public:
|
2018-09-17 22:04:38 +00:00
|
|
|
CommonPsshGenerator();
|
|
|
|
~CommonPsshGenerator() override;
|
2017-09-12 19:22:39 +00:00
|
|
|
|
|
|
|
/// @name PsshGenerator implemetation overrides.
|
|
|
|
/// @{
|
|
|
|
bool SupportMultipleKeys() override;
|
|
|
|
/// @}
|
|
|
|
|
|
|
|
private:
|
2018-09-17 22:04:38 +00:00
|
|
|
CommonPsshGenerator& operator=(const CommonPsshGenerator&) = delete;
|
|
|
|
CommonPsshGenerator(const CommonPsshGenerator&) = delete;
|
2017-09-12 19:22:39 +00:00
|
|
|
|
|
|
|
// PsshGenerator implemetation overrides.
|
|
|
|
|
|
|
|
base::Optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIds(
|
|
|
|
const std::vector<std::vector<uint8_t>>& key_ids) const override;
|
|
|
|
|
|
|
|
base::Optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIdAndKey(
|
|
|
|
const std::vector<uint8_t>& key_id,
|
|
|
|
const std::vector<uint8_t>& key) const override;
|
|
|
|
};
|
|
|
|
} // namespace media
|
|
|
|
} // namespace shaka
|
|
|
|
|
2018-09-17 22:04:38 +00:00
|
|
|
#endif // PACKAGER_MEDIA_BASE_COMMON_PSSH_GENERATOR_H_
|