Shaka Packager SDK
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 <string>
11 
12 #include <packager/media/base/fourccs.h>
13 #include <packager/media/base/pssh_generator.h>
14 
15 namespace shaka {
16 namespace media {
17 
19  public:
20  explicit PlayReadyPsshGenerator(const std::string& extra_header_data,
21  FourCC protection_scheme);
22  ~PlayReadyPsshGenerator() override;
23 
26  bool SupportMultipleKeys() override;
28 
29  private:
30  PlayReadyPsshGenerator& operator=(const PlayReadyPsshGenerator&) = delete;
32 
33  // PsshGenerator implemetation overrides.
34 
35  std::optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIds(
36  const std::vector<std::vector<uint8_t>>& key_ids) const override;
37 
38  std::optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIdAndKey(
39  const std::vector<uint8_t>& key_id,
40  const std::vector<uint8_t>& key) const override;
41 
42  const std::string extra_header_data_;
43  const FourCC protection_scheme_;
44 };
45 
46 } // namespace media
47 } // namespace shaka
48 
49 #endif // MEDIA_BASE_PLAYREADY_PSSH_GENERATOR_H_
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66