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

Side by Side Diff: media/base/composite_filter.cc

Issue 9718013: Merge FilterStatusCB into PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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
« no previous file with comments | « media/base/composite_filter.h ('k') | media/base/composite_filter_unittest.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « media/base/composite_filter.h ('k') | media/base/composite_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698