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

Unified Diff: media/base/pipeline.cc

Issue 10832209: Revert 150591 - Remove Pipeline::kEnded state as it is redundant with Pipeline::kStarted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/pipeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
===================================================================
--- media/base/pipeline.cc (revision 150598)
+++ media/base/pipeline.cc (working copy)
@@ -151,6 +151,7 @@
case kSeeking:
case kStarting:
case kStarted:
+ case kEnded:
return true;
default:
return false;
@@ -795,7 +796,7 @@
DCHECK(!IsPipelineStopPending());
// Suppress seeking if we're not fully started.
- if (state_ != kStarted) {
+ if (state_ != kStarted && state_ != kEnded) {
// TODO(scherkus): should we run the callback? I'm tempted to say the API
// will only execute the first Seek() request.
DVLOG(1) << "Media pipeline has not started, ignoring seek to "
@@ -808,7 +809,7 @@
// We'll need to pause every filter before seeking. The state transition
// is as follows:
- // kStarted
+ // kStarted/kEnded
// kPausing (for each filter)
// kSeeking (for each filter)
// kStarting (for each filter)
@@ -853,6 +854,8 @@
return;
}
+ // Transition to ended, executing the callback if present.
+ SetState(kEnded);
{
base::AutoLock auto_lock(lock_);
clock_->EndOfStream();
@@ -987,6 +990,7 @@
case kStarting:
case kStopped:
case kStarted:
+ case kEnded:
NOTREACHED() << "Unexpected state for teardown: " << state_;
break;
// default: intentionally left out to force new states to cause compiler
@@ -1215,6 +1219,7 @@
break;
case kStarted:
+ case kEnded:
SetState(kPausing);
DoPause(base::Bind(&Pipeline::OnTeardownStateTransition, this));
break;
« no previous file with comments | « media/base/pipeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698