| OLD | NEW |
| 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/filters/decrypting_audio_decoder.h" | 5 #include "media/filters/decrypting_audio_decoder.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <cstdlib> | 9 #include <cstdlib> |
| 10 | 10 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 DCHECK(!decode_cb_.is_null()); | 151 DCHECK(!decode_cb_.is_null()); |
| 152 pending_buffer_to_decode_ = NULL; | 152 pending_buffer_to_decode_ = NULL; |
| 153 base::ResetAndReturn(&decode_cb_).Run(DecodeStatus::ABORTED); | 153 base::ResetAndReturn(&decode_cb_).Run(DecodeStatus::ABORTED); |
| 154 } | 154 } |
| 155 | 155 |
| 156 DCHECK(decode_cb_.is_null()); | 156 DCHECK(decode_cb_.is_null()); |
| 157 DoReset(); | 157 DoReset(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 DecryptingAudioDecoder::~DecryptingAudioDecoder() { | 160 DecryptingAudioDecoder::~DecryptingAudioDecoder() { |
| 161 DVLOG(2) << __FUNCTION__; | 161 DVLOG(2) << __func__; |
| 162 DCHECK(task_runner_->BelongsToCurrentThread()); | 162 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 163 | 163 |
| 164 if (state_ == kUninitialized) | 164 if (state_ == kUninitialized) |
| 165 return; | 165 return; |
| 166 | 166 |
| 167 if (decryptor_) { | 167 if (decryptor_) { |
| 168 decryptor_->DeinitializeDecoder(Decryptor::kAudio); | 168 decryptor_->DeinitializeDecoder(Decryptor::kAudio); |
| 169 decryptor_ = NULL; | 169 decryptor_ = NULL; |
| 170 } | 170 } |
| 171 pending_buffer_to_decode_ = NULL; | 171 pending_buffer_to_decode_ = NULL; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 347 } |
| 348 | 348 |
| 349 frame->set_timestamp(current_time); | 349 frame->set_timestamp(current_time); |
| 350 timestamp_helper_->AddFrames(frame->frame_count()); | 350 timestamp_helper_->AddFrames(frame->frame_count()); |
| 351 | 351 |
| 352 output_cb_.Run(frame); | 352 output_cb_.Run(frame); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace media | 356 } // namespace media |
| OLD | NEW |