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

Side by Side Diff: media/filters/audio_renderer_impl.cc

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mojo Created 6 years, 1 month 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
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/audio_renderer_impl.h" 5 #include "media/filters/audio_renderer_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 stream->audio_decoder_config().channel_layout()), 309 stream->audio_decoder_config().channel_layout()),
310 hw_params.sample_rate(), 310 hw_params.sample_rate(),
311 hw_params.bits_per_sample(), 311 hw_params.bits_per_sample(),
312 hardware_config_.GetHighLatencyBufferSize()); 312 hardware_config_.GetHighLatencyBufferSize());
313 } 313 }
314 314
315 audio_clock_.reset( 315 audio_clock_.reset(
316 new AudioClock(base::TimeDelta(), audio_parameters_.sample_rate())); 316 new AudioClock(base::TimeDelta(), audio_parameters_.sample_rate()));
317 317
318 audio_buffer_stream_->Initialize( 318 audio_buffer_stream_->Initialize(
319 stream, 319 stream, statistics_cb,
320 false,
321 statistics_cb,
322 base::Bind(&AudioRendererImpl::OnAudioBufferStreamInitialized, 320 base::Bind(&AudioRendererImpl::OnAudioBufferStreamInitialized,
323 weak_factory_.GetWeakPtr())); 321 weak_factory_.GetWeakPtr()));
324 } 322 }
325 323
326 void AudioRendererImpl::OnAudioBufferStreamInitialized(bool success) { 324 void AudioRendererImpl::OnAudioBufferStreamInitialized(bool success) {
327 DVLOG(1) << __FUNCTION__ << ": " << success; 325 DVLOG(1) << __FUNCTION__ << ": " << success;
328 DCHECK(task_runner_->BelongsToCurrentThread()); 326 DCHECK(task_runner_->BelongsToCurrentThread());
329 327
330 base::AutoLock auto_lock(lock_); 328 base::AutoLock auto_lock(lock_);
331 329
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 << buffering_state; 714 << buffering_state;
717 DCHECK_NE(buffering_state_, buffering_state); 715 DCHECK_NE(buffering_state_, buffering_state);
718 lock_.AssertAcquired(); 716 lock_.AssertAcquired();
719 buffering_state_ = buffering_state; 717 buffering_state_ = buffering_state;
720 718
721 task_runner_->PostTask(FROM_HERE, 719 task_runner_->PostTask(FROM_HERE,
722 base::Bind(buffering_state_cb_, buffering_state_)); 720 base::Bind(buffering_state_cb_, buffering_state_));
723 } 721 }
724 722
725 } // namespace media 723 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698