Shaka Player Embedded
configuration.cc
Go to the documentation of this file.
1 // Copyright 2020 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
16 
17 namespace shaka {
18 namespace eme {
19 
20 EncryptionPattern::EncryptionPattern() : encrypted_blocks(0), clear_blocks(0) {}
21 
23  uint32_t clear_blocks)
24  : encrypted_blocks(encrypted_blocks), clear_blocks(clear_blocks) {}
25 
26 
27 SubsampleInfo::SubsampleInfo(uint32_t clear_bytes, uint32_t protected_bytes)
28  : clear_bytes(clear_bytes), protected_bytes(protected_bytes) {}
29 
30 
32  const std::vector<uint8_t>& key_id,
33  const std::vector<uint8_t>& iv)
34  : scheme(scheme), key_id(key_id), iv(iv) {}
35 
38  const std::vector<uint8_t>& key_id,
39  const std::vector<uint8_t>& iv)
40  : scheme(scheme), pattern(pattern), key_id(key_id), iv(iv) {}
41 
44  const std::vector<uint8_t>& key_id, const std::vector<uint8_t>& iv,
45  const std::vector<SubsampleInfo>& subsamples)
46  : scheme(scheme),
47  pattern(pattern),
48  key_id(key_id),
49  iv(iv),
50  subsamples(subsamples) {}
51 
53 
54 } // namespace eme
55 } // namespace shaka
const EncryptionPattern pattern
FrameEncryptionInfo(EncryptionScheme scheme, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &iv)
SubsampleInfo(uint32_t clear_bytes, uint32_t protected_bytes)
const std::vector< uint8_t > iv
const EncryptionScheme scheme
const std::vector< SubsampleInfo > subsamples
const std::vector< uint8_t > key_id