Delete unused downloads page asset.
[chromium-blink-merge.git] / chromecast / media / cma / base / cast_decrypt_config_impl.cc
blob51ef53eb87c95195005abd039282f45e1dd43bb1
1 // Copyright 2015 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.
5 #include "chromecast/media/cma/base/cast_decrypt_config_impl.h"
7 #include "media/base/decrypt_config.h"
9 namespace chromecast {
10 namespace media {
12 CastDecryptConfigImpl::CastDecryptConfigImpl(
13 const ::media::DecryptConfig& config)
14 : key_id_(config.key_id()), iv_(config.iv()) {
15 for (const auto& sample : config.subsamples()) {
16 subsamples_.push_back(
17 SubsampleEntry(sample.clear_bytes, sample.cypher_bytes));
21 CastDecryptConfigImpl::CastDecryptConfigImpl(
22 const std::string& key_id,
23 const std::string& iv,
24 const std::vector<SubsampleEntry>& subsamples)
25 : key_id_(key_id), iv_(iv), subsamples_(subsamples) {}
27 CastDecryptConfigImpl::~CastDecryptConfigImpl() {}
29 const std::string& CastDecryptConfigImpl::key_id() const {
30 return key_id_;
33 const std::string& CastDecryptConfigImpl::iv() const {
34 return iv_;
37 const std::vector<SubsampleEntry>& CastDecryptConfigImpl::subsamples() const {
38 return subsamples_;
41 } // namespace media
42 } // namespace chromecast