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

Unified Diff: media/base/decrypt_config.cc

Issue 1422643002: Pass DecryptConfig parameters over IPC and use it in AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: media/base/decrypt_config.cc
diff --git a/media/base/decrypt_config.cc b/media/base/decrypt_config.cc
index 7df9216ed98975b9525282994b6aa9c030689249..2f0535f0158d48252a617f9fcebd518bfefe361f 100644
--- a/media/base/decrypt_config.cc
+++ b/media/base/decrypt_config.cc
@@ -4,6 +4,7 @@
#include "media/base/decrypt_config.h"
+#include <iomanip>
#include "base/logging.h"
namespace media {
@@ -37,4 +38,22 @@ bool DecryptConfig::Matches(const DecryptConfig& config) const {
return true;
}
+std::ostream& DecryptConfig::Print(std::ostream& os) const {
+ os << "key_id:" << std::hex << std::setfill('0');
+ for (char ch : key_id_)
+ os << std::setw(2) << static_cast<int>(ch);
xhwang 2015/10/22 06:13:51 Here and below, will base::HexEncode() make things
Tima Vaisburd 2015/10/22 21:57:26 Done.
+
+ os << " iv:'" << std::hex << std::setfill('0');
+ for (char ch : iv_)
+ os << std::setw(2) << static_cast<int>(ch);
+
+ os << std::dec << std::setfill(' ') << "' subsamples:[";
+ for (SubsampleEntry entry : subsamples_) {
+ os << "(clear:" << entry.clear_bytes << ", cypher:" << entry.cypher_bytes
+ << ")";
+ }
+ os << "]";
+ return os;
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698