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

Side by Side Diff: media/base/pipeline.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/mock_filters.cc ('k') | media/base/pipeline_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/pipeline.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 &Pipeline::InitializeTask, this, status)); 566 &Pipeline::InitializeTask, this, status));
567 } 567 }
568 568
569 // Called from any thread. 569 // Called from any thread.
570 void Pipeline::OnFilterStateTransition() { 570 void Pipeline::OnFilterStateTransition() {
571 message_loop_->PostTask(FROM_HERE, base::Bind( 571 message_loop_->PostTask(FROM_HERE, base::Bind(
572 &Pipeline::FilterStateTransitionTask, this)); 572 &Pipeline::FilterStateTransitionTask, this));
573 } 573 }
574 574
575 // Called from any thread. 575 // Called from any thread.
576 // This method makes the FilterStatusCB behave like a Closure. It 576 // This method makes the PipelineStatusCB behave like a Closure. It
577 // makes it look like a host()->SetError() call followed by a call to 577 // makes it look like a host()->SetError() call followed by a call to
578 // OnFilterStateTransition() when errors occur. 578 // OnFilterStateTransition() when errors occur.
579 // 579 //
580 // TODO: Revisit this code when SetError() is removed from FilterHost and 580 // TODO: Revisit this code when SetError() is removed from FilterHost and
581 // all the Closures are converted to FilterStatusCB. 581 // all the Closures are converted to PipelineStatusCB.
582 void Pipeline::OnFilterStateTransitionWithStatus(PipelineStatus status) { 582 void Pipeline::OnFilterStateTransitionWithStatus(PipelineStatus status) {
583 if (status != PIPELINE_OK) 583 if (status != PIPELINE_OK)
584 SetError(status); 584 SetError(status);
585 OnFilterStateTransition(); 585 OnFilterStateTransition();
586 } 586 }
587 587
588 void Pipeline::OnTeardownStateTransition() { 588 void Pipeline::OnTeardownStateTransition() {
589 message_loop_->PostTask(FROM_HERE, base::Bind( 589 message_loop_->PostTask(FROM_HERE, base::Bind(
590 &Pipeline::TeardownStateTransitionTask, this)); 590 &Pipeline::TeardownStateTransitionTask, this));
591 } 591 }
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 1417 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
1418 lock_.AssertAcquired(); 1418 lock_.AssertAcquired();
1419 if (!waiting_for_clock_update_) 1419 if (!waiting_for_clock_update_)
1420 return; 1420 return;
1421 1421
1422 waiting_for_clock_update_ = false; 1422 waiting_for_clock_update_ = false;
1423 clock_->Play(); 1423 clock_->Play();
1424 } 1424 }
1425 1425
1426 } // namespace media 1426 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mock_filters.cc ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698