summaryrefslogtreecommitdiffstats
path: root/media/webm/webm_content_encodings.cc
blob: 9789c0f3028f0f7cf2f5420f4f2f74420526a458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/logging.h"
#include "media/webm/webm_content_encodings.h"

namespace media {

ContentEncoding::ContentEncoding()
    : order_(kOrderInvalid),
      scope_(kScopeInvalid),
      type_(kTypeInvalid),
      encryption_algo_(kEncAlgoInvalid),
      cipher_mode_(kCipherModeInvalid) {
}

ContentEncoding::~ContentEncoding() {}

void ContentEncoding::SetEncryptionKeyId(const uint8* encryption_key_id,
                                         int size) {
  DCHECK(encryption_key_id);
  DCHECK_GT(size, 0);
  encryption_key_id_.assign(reinterpret_cast<const char*>(encryption_key_id),
                            size);
}

}  // namespace media