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

Side by Side 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: Rebase code. Add support for audio. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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.
4
5 #ifndef MEDIA_WEBM_WEBM_CRYPTO_HELPERS_H_
6 #define MEDIA_WEBM_WEBM_CRYPTO_HELPERS_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/decoder_buffer.h"
11
12 namespace media {
13
14 // TODO(xhwang): Figure out the init data type appropriately once it's spec'ed.
ddorwin 2013/03/10 21:29:39 You could link to https://www.w3.org/Bugs/Public/s
fgalligan1 2013/03/12 00:42:42 Done.
15 const char kWebMEncryptInitDataType[] = "video/webm";
16
ddorwin 2013/03/10 21:29:39 Should some of the existing Chunk Demuxer code be
fgalligan1 2013/03/12 00:42:42 Done.
17 // Generates a 16 byte CTR counter block. The CTR counter block format is a
18 // CTR IV appended with a CTR block counter. |iv| is an 8 byte CTR IV.
19 // |iv_size| is the size of |iv| in btyes. Returns a string of
20 // kDecryptionKeySize bytes.
21 std::string GenerateWebMCounterBlock(const uint8* iv, int iv_size);
ddorwin 2013/03/10 21:29:39 This is not currently used outside the .cc file.
fgalligan1 2013/03/12 00:42:42 Done.
22
23 // Returns an initialized DecryptConfig, which can be sent to the Decryptor if
24 // the stream has potentially encrypted frames. Every encrypted Block has a
25 // signal byte, and if the frame is encrypted an IV, prepended to the frame.
26 // Leaving the initialization vector empty will tell the decryptor that the
27 // frame is unencrypted. Current encrypted WebM request for comments
28 // specification is here
29 // http://wiki.webmproject.org/encryption/webm-encryption-rfc
30 scoped_ptr<DecryptConfig> WebMCreateDecryptConfig(
31 const uint8* data, int data_size,
32 const uint8* key_id, int key_id_size);
33
34 } // namespace media
35
36 #endif // MEDIA_WEBM_WEBM_CRYPT_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698