Chromium Code Reviews| 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: |