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