• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "base/logging.h"
6 #include "media/formats/webm/webm_content_encodings.h"
7 
8 namespace media {
9 
ContentEncoding()10 ContentEncoding::ContentEncoding()
11     : order_(kOrderInvalid),
12       scope_(kScopeInvalid),
13       type_(kTypeInvalid),
14       encryption_algo_(kEncAlgoInvalid),
15       cipher_mode_(kCipherModeInvalid) {
16 }
17 
~ContentEncoding()18 ContentEncoding::~ContentEncoding() {}
19 
SetEncryptionKeyId(const uint8 * encryption_key_id,int size)20 void ContentEncoding::SetEncryptionKeyId(const uint8* encryption_key_id,
21                                          int size) {
22   DCHECK(encryption_key_id);
23   DCHECK_GT(size, 0);
24   encryption_key_id_.assign(reinterpret_cast<const char*>(encryption_key_id),
25                             size);
26 }
27 
28 }  // namespace media
29