| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/base/android/media_codec_audio_decoder.h" | 5 #include "media/base/android/media_codec_audio_decoder.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "media/base/android/media_codec_bridge.h" | |
| 10 #include "media/base/android/media_statistics.h" | 9 #include "media/base/android/media_statistics.h" |
| 10 #include "media/base/android/sdk_media_codec_bridge.h" |
| 11 #include "media/base/audio_timestamp_helper.h" | 11 #include "media/base/audio_timestamp_helper.h" |
| 12 #include "media/base/demuxer_stream.h" | 12 #include "media/base/demuxer_stream.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // Use 16bit PCM for audio output. Keep this value in sync with the output | 16 // Use 16bit PCM for audio output. Keep this value in sync with the output |
| 17 // format we passed to AudioTrack in MediaCodecBridge. | 17 // format we passed to AudioTrack in MediaCodecBridge. |
| 18 const int kBytesPerAudioOutputSample = 2; | 18 const int kBytesPerAudioOutputSample = 2; |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 if (audio_timestamp_helper_) | 285 if (audio_timestamp_helper_) |
| 286 base_timestamp_ = audio_timestamp_helper_->GetTimestamp(); | 286 base_timestamp_ = audio_timestamp_helper_->GetTimestamp(); |
| 287 | 287 |
| 288 audio_timestamp_helper_.reset( | 288 audio_timestamp_helper_.reset( |
| 289 new AudioTimestampHelper(configs_.audio_sampling_rate)); | 289 new AudioTimestampHelper(configs_.audio_sampling_rate)); |
| 290 | 290 |
| 291 audio_timestamp_helper_->SetBaseTimestamp(base_timestamp_); | 291 audio_timestamp_helper_->SetBaseTimestamp(base_timestamp_); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace media | 294 } // namespace media |
| OLD | NEW |