| 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/ffmpeg_audio_decoder.h" | 5 #include "media/filters/ffmpeg_audio_decoder.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 if (state_ != kUninitialized) | 143 if (state_ != kUninitialized) |
| 144 ReleaseFFmpegResources(); | 144 ReleaseFFmpegResources(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 std::string FFmpegAudioDecoder::GetDisplayName() const { | 147 std::string FFmpegAudioDecoder::GetDisplayName() const { |
| 148 return "FFmpegAudioDecoder"; | 148 return "FFmpegAudioDecoder"; |
| 149 } | 149 } |
| 150 | 150 |
| 151 void FFmpegAudioDecoder::Initialize(const AudioDecoderConfig& config, | 151 void FFmpegAudioDecoder::Initialize(const AudioDecoderConfig& config, |
| 152 const SetCdmReadyCB& /* set_cdm_ready_cb */, | 152 CdmContext* /* cdm_context */, |
| 153 const InitCB& init_cb, | 153 const InitCB& init_cb, |
| 154 const OutputCB& output_cb) { | 154 const OutputCB& output_cb) { |
| 155 DCHECK(task_runner_->BelongsToCurrentThread()); | 155 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 156 DCHECK(config.IsValidConfig()); | 156 DCHECK(config.IsValidConfig()); |
| 157 | 157 |
| 158 InitCB bound_init_cb = BindToCurrentLoop(init_cb); | 158 InitCB bound_init_cb = BindToCurrentLoop(init_cb); |
| 159 | 159 |
| 160 if (config.is_encrypted()) { | 160 if (config.is_encrypted()) { |
| 161 bound_init_cb.Run(false); | 161 bound_init_cb.Run(false); |
| 162 return; | 162 return; |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return true; | 387 return true; |
| 388 } | 388 } |
| 389 | 389 |
| 390 void FFmpegAudioDecoder::ResetTimestampState() { | 390 void FFmpegAudioDecoder::ResetTimestampState() { |
| 391 discard_helper_.reset(new AudioDiscardHelper(config_.samples_per_second(), | 391 discard_helper_.reset(new AudioDiscardHelper(config_.samples_per_second(), |
| 392 config_.codec_delay())); | 392 config_.codec_delay())); |
| 393 discard_helper_->Reset(config_.codec_delay()); | 393 discard_helper_->Reset(config_.codec_delay()); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace media | 396 } // namespace media |
| OLD | NEW |