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.
|
|
|
|
|
2015-10-14 22:46:23 +00:00
|
|
|
#include "packager/media/formats/webm/webm_content_encodings.h"
|
2015-10-08 21:48:07 +00:00
|
|
|
|
2022-12-17 05:40:00 +00:00
|
|
|
#include "glog/logging.h"
|
|
|
|
|
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
|