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