Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: chromecast/media/cma/base/cast_decrypt_config_impl.cc

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromecast/media/cma/base/cast_decrypt_config_impl.cc
diff --git a/chromecast/media/cma/base/cast_decrypt_config_impl.cc b/chromecast/media/cma/base/cast_decrypt_config_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..51ef53eb87c95195005abd039282f45e1dd43bb1
--- /dev/null
+++ b/chromecast/media/cma/base/cast_decrypt_config_impl.cc
@@ -0,0 +1,42 @@
+// Copyright 2015 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 "chromecast/media/cma/base/cast_decrypt_config_impl.h"
+
+#include "media/base/decrypt_config.h"
+
+namespace chromecast {
+namespace media {
+
+CastDecryptConfigImpl::CastDecryptConfigImpl(
+ const ::media::DecryptConfig& config)
+ : key_id_(config.key_id()), iv_(config.iv()) {
+ for (const auto& sample : config.subsamples()) {
+ subsamples_.push_back(
+ SubsampleEntry(sample.clear_bytes, sample.cypher_bytes));
+ }
+}
+
+CastDecryptConfigImpl::CastDecryptConfigImpl(
+ const std::string& key_id,
+ const std::string& iv,
+ const std::vector<SubsampleEntry>& subsamples)
+ : key_id_(key_id), iv_(iv), subsamples_(subsamples) {}
+
+CastDecryptConfigImpl::~CastDecryptConfigImpl() {}
+
+const std::string& CastDecryptConfigImpl::key_id() const {
+ return key_id_;
+}
+
+const std::string& CastDecryptConfigImpl::iv() const {
+ return iv_;
+}
+
+const std::vector<SubsampleEntry>& CastDecryptConfigImpl::subsamples() const {
+ return subsamples_;
+}
+
+} // namespace media
+} // namespace chromecast

Powered by Google App Engine
This is Rietveld 408576698