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

Side by Side Diff: media/crypto/aes_decryptor.cc

Issue 10964055: Call Decryptor::Stop() in FFmpegVideoDecoder::Reset(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | media/filters/ffmpeg_video_decoder.cc » ('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/crypto/aes_decryptor.h" 5 #include "media/crypto/aes_decryptor.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 decrypt_cb.Run(kError, NULL); 222 decrypt_cb.Run(kError, NULL);
223 return; 223 return;
224 } 224 }
225 } 225 }
226 226
227 decrypted->SetTimestamp(encrypted->GetTimestamp()); 227 decrypted->SetTimestamp(encrypted->GetTimestamp());
228 decrypted->SetDuration(encrypted->GetDuration()); 228 decrypted->SetDuration(encrypted->GetDuration());
229 decrypt_cb.Run(kSuccess, decrypted); 229 decrypt_cb.Run(kSuccess, decrypted);
230 } 230 }
231 231
232 void AesDecryptor::Stop() { 232 void AesDecryptor::CancelDecrypt() {
233 } 233 }
234 234
235 void AesDecryptor::SetKey(const std::string& key_id, 235 void AesDecryptor::SetKey(const std::string& key_id,
236 scoped_ptr<DecryptionKey> decryption_key) { 236 scoped_ptr<DecryptionKey> decryption_key) {
237 base::AutoLock auto_lock(key_map_lock_); 237 base::AutoLock auto_lock(key_map_lock_);
238 KeyMap::iterator found = key_map_.find(key_id); 238 KeyMap::iterator found = key_map_.find(key_id);
239 if (found != key_map_.end()) { 239 if (found != key_map_.end()) {
240 delete found->second; 240 delete found->second;
241 key_map_.erase(found); 241 key_map_.erase(found);
242 } 242 }
(...skipping 19 matching lines...) Expand all
262 bool AesDecryptor::DecryptionKey::Init() { 262 bool AesDecryptor::DecryptionKey::Init() {
263 CHECK(!secret_.empty()); 263 CHECK(!secret_.empty());
264 decryption_key_.reset(crypto::SymmetricKey::Import( 264 decryption_key_.reset(crypto::SymmetricKey::Import(
265 crypto::SymmetricKey::AES, secret_)); 265 crypto::SymmetricKey::AES, secret_));
266 if (!decryption_key_.get()) 266 if (!decryption_key_.get())
267 return false; 267 return false;
268 return true; 268 return true;
269 } 269 }
270 270
271 } // namespace media 271 } // namespace media
OLDNEW
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698