| Index: media/filters/decrypting_audio_decoder.cc
|
| diff --git a/media/filters/decrypting_audio_decoder.cc b/media/filters/decrypting_audio_decoder.cc
|
| index 7b3d279616170f4eecada9596b181ce32bac9e7f..7c8f4b20ec6e72b07e6ecc17d28d22ed8f461991 100644
|
| --- a/media/filters/decrypting_audio_decoder.cc
|
| +++ b/media/filters/decrypting_audio_decoder.cc
|
| @@ -48,7 +48,7 @@
|
| }
|
|
|
| void DecryptingAudioDecoder::Initialize(const AudioDecoderConfig& config,
|
| - const InitCB& init_cb,
|
| + const PipelineStatusCB& status_cb,
|
| const OutputCB& output_cb) {
|
| DVLOG(2) << "Initialize()";
|
| DCHECK(task_runner_->BelongsToCurrentThread());
|
| @@ -56,18 +56,18 @@
|
| DCHECK(reset_cb_.is_null());
|
|
|
| weak_this_ = weak_factory_.GetWeakPtr();
|
| - init_cb_ = BindToCurrentLoop(init_cb);
|
| + init_cb_ = BindToCurrentLoop(status_cb);
|
| output_cb_ = BindToCurrentLoop(output_cb);
|
|
|
| if (!config.IsValidConfig()) {
|
| DLOG(ERROR) << "Invalid audio stream config.";
|
| - base::ResetAndReturn(&init_cb_).Run(false);
|
| + base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_DECODE);
|
| return;
|
| }
|
|
|
| // DecryptingAudioDecoder only accepts potentially encrypted stream.
|
| if (!config.is_encrypted()) {
|
| - base::ResetAndReturn(&init_cb_).Run(false);
|
| + base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED);
|
| return;
|
| }
|
|
|
| @@ -162,7 +162,7 @@
|
| base::ResetAndReturn(&set_decryptor_ready_cb_).Run(DecryptorReadyCB());
|
| pending_buffer_to_decode_ = NULL;
|
| if (!init_cb_.is_null())
|
| - base::ResetAndReturn(&init_cb_).Run(false);
|
| + base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED);
|
| if (!decode_cb_.is_null())
|
| base::ResetAndReturn(&decode_cb_).Run(kAborted);
|
| if (!reset_cb_.is_null())
|
| @@ -181,7 +181,7 @@
|
| set_decryptor_ready_cb_.Reset();
|
|
|
| if (!decryptor) {
|
| - base::ResetAndReturn(&init_cb_).Run(false);
|
| + base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED);
|
| state_ = kError;
|
| decryptor_attached_cb.Run(false);
|
| return;
|
| @@ -210,7 +210,7 @@
|
| DCHECK(decode_cb_.is_null()); // No Decode() before initialization finished.
|
|
|
| if (!success) {
|
| - base::ResetAndReturn(&init_cb_).Run(false);
|
| + base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED);
|
| decryptor_ = NULL;
|
| state_ = kError;
|
| return;
|
| @@ -226,7 +226,7 @@
|
| base::Bind(&DecryptingAudioDecoder::OnKeyAdded, weak_this_)));
|
|
|
| state_ = kIdle;
|
| - base::ResetAndReturn(&init_cb_).Run(true);
|
| + base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK);
|
| }
|
|
|
| void DecryptingAudioDecoder::DecodePendingBuffer() {
|
|
|