Shaka Packager SDK
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 <absl/log/check.h>
8 #include <absl/log/log.h>
9 
10 namespace shaka {
11 namespace media {
12 
13 ContentEncoding::ContentEncoding()
14  : order_(kOrderInvalid),
15  scope_(kScopeInvalid),
16  type_(kTypeInvalid),
17  encryption_algo_(kEncAlgoInvalid),
18  cipher_mode_(kCipherModeInvalid) {
19 }
20 
21 ContentEncoding::~ContentEncoding() {}
22 
23 void 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.
Definition: crypto_flags.cc:66