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

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

Issue 16136005: Update remaining files to use WeakPtr<T>::get() instead of "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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 | Annotate | Revision Log
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 // We're all good! Continue initializing the rest of the audio renderer based 268 // We're all good! Continue initializing the rest of the audio renderer based
269 // on the decoder format. 269 // on the decoder format.
270 algorithm_.reset(new AudioRendererAlgorithm()); 270 algorithm_.reset(new AudioRendererAlgorithm());
271 algorithm_->Initialize(0, audio_parameters_); 271 algorithm_->Initialize(0, audio_parameters_);
272 272
273 state_ = kPaused; 273 state_ = kPaused;
274 274
275 HistogramRendererEvent(INITIALIZED); 275 HistogramRendererEvent(INITIALIZED);
276 276
277 sink_->Initialize(audio_parameters_, weak_this_); 277 sink_->Initialize(audio_parameters_, weak_this_.get());
278 sink_->Start(); 278 sink_->Start();
279 279
280 // Some sinks play on start... 280 // Some sinks play on start...
281 sink_->Pause(); 281 sink_->Pause();
282 DCHECK(!sink_playing_); 282 DCHECK(!sink_playing_);
283 283
284 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK); 284 base::ResetAndReturn(&init_cb_).Run(PIPELINE_OK);
285 } 285 }
286 286
287 void AudioRendererImpl::ResumeAfterUnderflow(bool buffer_more_audio) { 287 void AudioRendererImpl::ResumeAfterUnderflow(bool buffer_more_audio) {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 case kUnderflow: 639 case kUnderflow:
640 case kRebuffering: 640 case kRebuffering:
641 case kStopped: 641 case kStopped:
642 if (status != PIPELINE_OK) 642 if (status != PIPELINE_OK)
643 error_cb_.Run(status); 643 error_cb_.Run(status);
644 return; 644 return;
645 } 645 }
646 } 646 }
647 647
648 } // namespace media 648 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698