DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
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/base/logging.h"
6 #include "packager/media/formats/webm/webm_content_encodings.h"
7 
8 namespace edash_packager {
9 namespace media {
10 
11 ContentEncoding::ContentEncoding()
12  : order_(kOrderInvalid),
13  scope_(kScopeInvalid),
14  type_(kTypeInvalid),
15  encryption_algo_(kEncAlgoInvalid),
16  cipher_mode_(kCipherModeInvalid) {
17 }
18 
19 ContentEncoding::~ContentEncoding() {}
20 
21 void ContentEncoding::SetEncryptionKeyId(const uint8_t* encryption_key_id,
22  int size) {
23  DCHECK(encryption_key_id);
24  DCHECK_GT(size, 0);
25  encryption_key_id_.assign(reinterpret_cast<const char*>(encryption_key_id),
26  size);
27 }
28 
29 } // namespace media
30 } // namespace edash_packager