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

Side by Side Diff: content/renderer/media/audio_renderer_impl.cc

Issue 6969026: Convert Filter::Seek() to use new callback system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More CR fixes Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/media/audio_renderer_impl.h" 5 #include "content/renderer/media/audio_renderer_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "content/common/audio_messages.h" 9 #include "content/common/audio_messages.h"
10 #include "content/renderer/render_thread.h" 10 #include "content/renderer/render_thread.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 AudioRendererBase::Pause(callback); 125 AudioRendererBase::Pause(callback);
126 base::AutoLock auto_lock(lock_); 126 base::AutoLock auto_lock(lock_);
127 if (stopped_) 127 if (stopped_)
128 return; 128 return;
129 129
130 io_loop_->PostTask(FROM_HERE, 130 io_loop_->PostTask(FROM_HERE,
131 NewRunnableMethod(this, &AudioRendererImpl::PauseTask)); 131 NewRunnableMethod(this, &AudioRendererImpl::PauseTask));
132 } 132 }
133 133
134 void AudioRendererImpl::Seek(base::TimeDelta time, 134 void AudioRendererImpl::Seek(base::TimeDelta time,
135 media::FilterCallback* callback) { 135 const media::FilterStatusCB& cb) {
136 AudioRendererBase::Seek(time, callback); 136 AudioRendererBase::Seek(time, cb);
137 base::AutoLock auto_lock(lock_); 137 base::AutoLock auto_lock(lock_);
138 if (stopped_) 138 if (stopped_)
139 return; 139 return;
140 140
141 io_loop_->PostTask(FROM_HERE, 141 io_loop_->PostTask(FROM_HERE,
142 NewRunnableMethod(this, &AudioRendererImpl::SeekTask)); 142 NewRunnableMethod(this, &AudioRendererImpl::SeekTask));
143 } 143 }
144 144
145 145
146 void AudioRendererImpl::Play(media::FilterCallback* callback) { 146 void AudioRendererImpl::Play(media::FilterCallback* callback) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 DCHECK(MessageLoop::current() == io_loop_); 339 DCHECK(MessageLoop::current() == io_loop_);
340 340
341 // We treat the IO loop going away the same as stopping. 341 // We treat the IO loop going away the same as stopping.
342 base::AutoLock auto_lock(lock_); 342 base::AutoLock auto_lock(lock_);
343 if (stopped_) 343 if (stopped_)
344 return; 344 return;
345 345
346 stopped_ = true; 346 stopped_ = true;
347 DestroyTask(); 347 DestroyTask();
348 } 348 }
OLDNEW
« no previous file with comments | « content/renderer/media/audio_renderer_impl.h ('k') | content/renderer/media/ipc_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698