Shaka Packager SDK
Loading...
Searching...
No Matches
widevine_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_WIDEVINE_PSSH_GENERATOR_H_
8#define MEDIA_BASE_WIDEVINE_PSSH_GENERATOR_H_
9
10#include <cstdint>
11
12#include <packager/media/base/fourccs.h>
13#include <packager/media/base/pssh_generator.h>
14
15namespace shaka {
16namespace media {
17
19 public:
20 explicit WidevinePsshGenerator(FourCC protection_scheme);
21 ~WidevinePsshGenerator() override;
22
25 bool SupportMultipleKeys() override;
27
28 private:
29 WidevinePsshGenerator& operator=(const WidevinePsshGenerator&) = delete;
31
32 // PsshGenerator implemetation overrides.
33
34 std::optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIds(
35 const std::vector<std::vector<uint8_t>>& key_ids) const override;
36
37 std::optional<std::vector<uint8_t>> GeneratePsshDataFromKeyIdAndKey(
38 const std::vector<uint8_t>& key_id,
39 const std::vector<uint8_t>& key) const override;
40
41 FourCC protection_scheme_ = FOURCC_NULL;
42};
43
44} // namespace media
45} // namespace shaka
46
47#endif // MEDIA_BASE_WIDEVINE_PSSH_GENERATOR_H_
All the methods that are virtual are virtual for mocking.