Shaka Packager SDK
Loading...
Searching...
No Matches
playready_pssh_generator.h
1// Copyright 2017 Google LLC. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file or at
5// https://developers.google.com/open-source/licenses/bsd
6
7#ifndef MEDIA_BASE_PLAYREADY_PSSH_GENERATOR_H_
8#define MEDIA_BASE_PLAYREADY_PSSH_GENERATOR_H_
9
10#include <cstdint>
11#include <string>
12
13#include <packager/media/base/fourccs.h>
14#include <packager/media/base/pssh_generator.h>
15
16namespace shaka {
17namespace media {
18
20 public:
21 explicit PlayReadyPsshGenerator(const std::string& extra_header_data,
22 FourCC protection_scheme);
23 ~PlayReadyPsshGenerator() override;
24
27 bool SupportMultipleKeys() override;
29
30 private:
31 PlayReadyPsshGenerator& operator=(const PlayReadyPsshGenerator&) = delete;
33
34 // PsshGenerator implemetation overrides.
35
36 std::optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIds(
37 const std::vector<std::vector<uint8_t>>& key_ids) const override;
38
39 std::optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIdAndKey(
40 const std::vector<uint8_t>& key_id,
41 const std::vector<uint8_t>& key) const override;
42
43 const std::string extra_header_data_;
44 const FourCC protection_scheme_;
45};
46
47} // namespace media
48} // namespace shaka
49
50#endif // MEDIA_BASE_PLAYREADY_PSSH_GENERATOR_H_
All the methods that are virtual are virtual for mocking.