OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |