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

Unified Diff: media/crypto/decryptor_helpers.cc

Issue 10829470: Support for parsing encrypted WebM streams by src. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bug with playing latest encrypted WebM. Addressing comments. Created 8 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: media/crypto/decryptor_helpers.cc
diff --git a/media/crypto/decryptor_helpers.cc b/media/crypto/decryptor_helpers.cc
new file mode 100644
index 0000000000000000000000000000000000000000..58154bf3528fe11c47245e6321570f2df9feabba
--- /dev/null
+++ b/media/crypto/decryptor_helpers.cc
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 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 "media/crypto/decryptor_helpers.h"
+
+#include "media/base/decrypt_config.h"
+
+namespace media {
+
+std::string GenerateCounterBlock(uint64 iv) {
+ std::string counter_block(reinterpret_cast<char*>(&iv), sizeof(iv));
ddorwin 2012/09/01 16:46:41 I wonder if we'd be better off reserving the final
+ counter_block.append(DecryptConfig::kDecryptionKeySize - sizeof(iv), 0);
+ return counter_block;
+}
+
+} // media
xhwang 2012/08/29 05:08:14 // namespace media

Powered by Google App Engine
This is Rietveld 408576698