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

Unified Diff: media/webm/webm_crypto_helpers.h

Issue 10829470: Support for parsing encrypted WebM streams by src. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tool player_x11 Created 7 years, 9 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
« no previous file with comments | « media/webm/webm_cluster_parser_unittest.cc ('k') | media/webm/webm_crypto_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/webm_crypto_helpers.h
diff --git a/media/webm/webm_crypto_helpers.h b/media/webm/webm_crypto_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..c5f1f15ecac8abc21ebf6ced4aea75a52a3eff9a
--- /dev/null
+++ b/media/webm/webm_crypto_helpers.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2013 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.
+
+#ifndef MEDIA_WEBM_WEBM_CRYPTO_HELPERS_H_
+#define MEDIA_WEBM_WEBM_CRYPTO_HELPERS_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "media/base/decoder_buffer.h"
+
+namespace media {
+
+// TODO(xhwang): Figure out the init data type appropriately once it's spec'ed.
+// See https://www.w3.org/Bugs/Public/show_bug.cgi?id=19096 for more
+// information.
+const char kWebMEncryptInitDataType[] = "video/webm";
+
+// Returns an initialized DecryptConfig, which can be sent to the Decryptor if
+// the stream has potentially encrypted frames. Every encrypted Block has a
+// signal byte, and if the frame is encrypted, an initialization vector
+// prepended to the frame. Leaving the IV empty will tell the decryptor that the
+// frame is unencrypted. Returns NULL if |data| is invalid. Current encrypted
+// WebM request for comments specification is here
+// http://wiki.webmproject.org/encryption/webm-encryption-rfc
+scoped_ptr<DecryptConfig> WebMCreateDecryptConfig(
+ const uint8* data, int data_size,
+ const uint8* key_id, int key_id_size);
+
+} // namespace media
+
+#endif // MEDIA_WEBM_WEBM_CRYPT_HELPERS_H_
« no previous file with comments | « media/webm/webm_cluster_parser_unittest.cc ('k') | media/webm/webm_crypto_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698