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

Unified Diff: media/filters/decrypting_video_decoder.cc

Issue 11144036: Update Decryptor interface to support audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify AudioBuffers 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/decrypting_video_decoder.cc
diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc
index ad66930745cc6f64687b047c7a1e6e297488dacf..91b12ff0374c7f5947378845f7ce3a9763370f0d 100644
--- a/media/filters/decrypting_video_decoder.cc
+++ b/media/filters/decrypting_video_decoder.cc
@@ -68,7 +68,7 @@ void DecryptingVideoDecoder::Reset(const base::Closure& closure) {
reset_cb_ = closure;
- decryptor_->CancelDecryptAndDecodeVideo();
+ decryptor_->ResetDecoder(Decryptor::kVideo);
// Reset() cannot complete if the read callback is still pending.
// Defer the resetting process in this case. The |reset_cb_| will be fired
@@ -100,15 +100,15 @@ void DecryptingVideoDecoder::Stop(const base::Closure& closure) {
DCHECK(stop_cb_.is_null());
stop_cb_ = closure;
- // We need to call Decryptor::StopVideoDecoder() if we ever called
- // Decryptor::InitializeVideoDecoder() to cancel the pending initialization if
- // the initialization is still pending, or to stop the video decoder if
- // the initialization has completed.
+ // We need to call Decryptor::DeinitializeDecoder(Decryptor::kVideo) if we
+ // ever called Decryptor::InitializeVideoDecoder() to cancel the pending
+ // initialization if the initialization is still pending, or to stop the video
+ // decoder if the initialization has completed.
// When the state is kUninitialized and kDecryptorRequested,
// InitializeVideoDecoder() has not been called, so we are okay.
// When the state is kStopped, the video decoder should have already been
- // stopped, so no need to call StopVideoDecoder() either.
- // In all other cases, we need to call StopVideoDecoder()!
+ // stopped, so no need to call DeinitializeDecoder(Decryptor::kVideo) either.
+ // In all other cases, we need to call DeinitializeDecoder(Decryptor::kVideo)!
switch (state_) {
case kUninitialized:
case kStopped:
@@ -122,11 +122,11 @@ void DecryptingVideoDecoder::Stop(const base::Closure& closure) {
break;
case kIdle:
case kDecodeFinished:
- decryptor_->StopVideoDecoder();
+ decryptor_->DeinitializeDecoder(Decryptor::kVideo);
ddorwin 2012/10/17 02:52:33 nit: Might be less bug-prone to have a private hel
xhwang 2012/10/17 22:29:06 I'll hold here as fischman is trying to remove thi
DoStop();
break;
case kWaitingForKey:
- decryptor_->StopVideoDecoder();
+ decryptor_->DeinitializeDecoder(Decryptor::kVideo);
DCHECK(!read_cb_.is_null());
pending_buffer_to_decode_ = NULL;
base::ResetAndReturn(&read_cb_).Run(kOk, NULL);
@@ -140,7 +140,7 @@ void DecryptingVideoDecoder::Stop(const base::Closure& closure) {
// fired after the init or read callback is fired - see
// FinishInitialization(), DoDecryptAndDecodeBuffer() and
// DoDeliverFrame(), respectively.
- decryptor_->StopVideoDecoder();
+ decryptor_->DeinitializeDecoder(Decryptor::kVideo);
DCHECK(!init_cb_.is_null() || !read_cb_.is_null());
break;
default:

Powered by Google App Engine
This is Rietveld 408576698