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

Side by Side Diff: media/base/decrypt_config.cc

Issue 10807003: Revert 147169 - Add support for encrypted WebM files as defined in the RFC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « media/base/decrypt_config.h ('k') | media/crypto/aes_decryptor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/decrypt_config.h" 5 #include "media/base/decrypt_config.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 DecryptConfig::DecryptConfig(const uint8* key_id, int key_id_size, 11 DecryptConfig::DecryptConfig(const uint8* key_id, int key_id_size)
12 const uint8* iv, int iv_size, 12 : key_id_size_(key_id_size) {
13 const uint8* checksum, int checksum_size,
14 int encrypted_frame_offset)
15 : key_id_(new uint8[key_id_size]),
16 key_id_size_(key_id_size),
17 iv_(new uint8[iv_size]),
18 iv_size_(iv_size),
19 checksum_(checksum_size > 0 ? new uint8[checksum_size] : NULL),
20 checksum_size_(checksum_size),
21 encrypted_frame_offset_(encrypted_frame_offset) {
22 CHECK_GT(key_id_size, 0); 13 CHECK_GT(key_id_size, 0);
23 CHECK_EQ(iv_size, DecryptConfig::kDecryptionKeySize); 14 key_id_.reset(new uint8[key_id_size]);
24 CHECK_GE(checksum_size, 0);
25 CHECK_GE(encrypted_frame_offset, 0);
26 memcpy(key_id_.get(), key_id, key_id_size); 15 memcpy(key_id_.get(), key_id, key_id_size);
27 memcpy(iv_.get(), iv, iv_size);
28 if (checksum_size > 0)
29 memcpy(checksum_.get(), checksum, checksum_size);
30 } 16 }
31 17
32 DecryptConfig::~DecryptConfig() {} 18 DecryptConfig::~DecryptConfig() {}
33 19
34 } // namespace media 20 } // namespace media
OLDNEW
« no previous file with comments | « media/base/decrypt_config.h ('k') | media/crypto/aes_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698