2015-10-08 21:48:07 +00:00
|
|
|
// Copyright 2014 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.
|
|
|
|
|
2023-12-01 17:32:19 +00:00
|
|
|
#include <packager/media/formats/webm/webm_content_encodings.h>
|
|
|
|
|
|
|
|
#include <absl/log/check.h>
|
|
|
|
#include <absl/log/log.h>
|
2015-10-08 21:48:07 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2015-10-08 21:48:07 +00:00
|
|
|
namespace media {
|
|
|
|
|
|
|
|
ContentEncoding::ContentEncoding()
|
|
|
|
: order_(kOrderInvalid),
|
|
|
|
scope_(kScopeInvalid),
|
|
|
|
type_(kTypeInvalid),
|
|
|
|
encryption_algo_(kEncAlgoInvalid),
|
|
|
|
cipher_mode_(kCipherModeInvalid) {
|
|
|
|
}
|
|
|
|
|
|
|
|
ContentEncoding::~ContentEncoding() {}
|
|
|
|
|
2015-10-14 22:46:23 +00:00
|
|
|
void ContentEncoding::SetEncryptionKeyId(const uint8_t* encryption_key_id,
|
2015-10-08 21:48:07 +00:00
|
|
|
int size) {
|
|
|
|
DCHECK(encryption_key_id);
|
|
|
|
DCHECK_GT(size, 0);
|
|
|
|
encryption_key_id_.assign(reinterpret_cast<const char*>(encryption_key_id),
|
|
|
|
size);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|