Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: media/base/android/media_codec_audio_decoder.cc

Issue 1472943002: Refactor MediaCodecBridge to add support for NDK APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698