OLD | NEW |
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/base/composite_filter.h" | 5 #include "media/base/composite_filter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 void CompositeFilter::SetPlaybackRate(float playback_rate) { | 195 void CompositeFilter::SetPlaybackRate(float playback_rate) { |
196 DCHECK_EQ(message_loop_, MessageLoop::current()); | 196 DCHECK_EQ(message_loop_, MessageLoop::current()); |
197 for (FilterVector::iterator iter = filters_.begin(); | 197 for (FilterVector::iterator iter = filters_.begin(); |
198 iter != filters_.end(); | 198 iter != filters_.end(); |
199 ++iter) { | 199 ++iter) { |
200 (*iter)->SetPlaybackRate(playback_rate); | 200 (*iter)->SetPlaybackRate(playback_rate); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 void CompositeFilter::Seek(base::TimeDelta time, | 204 void CompositeFilter::Seek(base::TimeDelta time, |
205 const FilterStatusCB& seek_cb) { | 205 const PipelineStatusCB& seek_cb) { |
206 DCHECK_EQ(message_loop_, MessageLoop::current()); | 206 DCHECK_EQ(message_loop_, MessageLoop::current()); |
207 | 207 |
208 if (IsOperationPending()) { | 208 if (IsOperationPending()) { |
209 seek_cb.Run(PIPELINE_ERROR_OPERATION_PENDING); | 209 seek_cb.Run(PIPELINE_ERROR_OPERATION_PENDING); |
210 return; | 210 return; |
211 } else if (!host() || (state_ != kPaused && state_ != kCreated)) { | 211 } else if (!host() || (state_ != kPaused && state_ != kCreated)) { |
212 seek_cb.Run(PIPELINE_ERROR_INVALID_STATE); | 212 seek_cb.Run(PIPELINE_ERROR_INVALID_STATE); |
213 return; | 213 return; |
214 } | 214 } |
215 | 215 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 492 |
493 void CompositeFilter::FilterHostImpl::NotifyEnded() { | 493 void CompositeFilter::FilterHostImpl::NotifyEnded() { |
494 host_->NotifyEnded(); | 494 host_->NotifyEnded(); |
495 } | 495 } |
496 | 496 |
497 void CompositeFilter::FilterHostImpl::DisableAudioRenderer() { | 497 void CompositeFilter::FilterHostImpl::DisableAudioRenderer() { |
498 host_->DisableAudioRenderer(); | 498 host_->DisableAudioRenderer(); |
499 } | 499 } |
500 | 500 |
501 } // namespace media | 501 } // namespace media |
OLD | NEW |