Shaka Packager SDK
Loading...
Searching...
No Matches
webm_content_encodings.cc
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include <packager/media/formats/webm/webm_content_encodings.h>
6
7#include <cstdint>
8
9#include <absl/log/check.h>
10
11namespace shaka {
12namespace media {
13
14ContentEncoding::ContentEncoding()
15 : order_(kOrderInvalid),
16 scope_(kScopeInvalid),
17 type_(kTypeInvalid),
18 encryption_algo_(kEncAlgoInvalid),
19 cipher_mode_(kCipherModeInvalid) {}
20
21ContentEncoding::~ContentEncoding() {}
22
23void ContentEncoding::SetEncryptionKeyId(const uint8_t* encryption_key_id,
24 int size) {
25 DCHECK(encryption_key_id);
26 DCHECK_GT(size, 0);
27 encryption_key_id_.assign(reinterpret_cast<const char*>(encryption_key_id),
28 size);
29}
30
31} // namespace media
32} // namespace shaka
All the methods that are virtual are virtual for mocking.