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

Unified Diff: media/base/pipeline.cc

Issue 10855041: Remove Pipeline::kEnded state as it is redundant with Pipeline::kStarted. (Closed) Base URL: svn://chrome-svn/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
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index fc325eb39f828d0fb4452975039c7c5d8599a1a6..92f0199bd6a675b10b8956ef2aab8f0e7e73ce38 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -151,7 +151,6 @@ bool Pipeline::IsInitialized() const {
case kSeeking:
case kStarting:
case kStarted:
- case kEnded:
return true;
default:
return false;
@@ -795,7 +794,7 @@ void Pipeline::SeekTask(TimeDelta time, const PipelineStatusCB& seek_cb) {
DCHECK(!IsPipelineStopPending());
// Suppress seeking if we're not fully started.
- if (state_ != kStarted && state_ != kEnded) {
+ if (state_ != kStarted) {
// 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 +807,7 @@ void Pipeline::SeekTask(TimeDelta time, const PipelineStatusCB& seek_cb) {
// We'll need to pause every filter before seeking. The state transition
// is as follows:
- // kStarted/kEnded
+ // kStarted
// kPausing (for each filter)
// kSeeking (for each filter)
// kStarting (for each filter)
@@ -853,8 +852,6 @@ void Pipeline::OnRendererEndedTask() {
return;
}
- // Transition to ended, executing the callback if present.
- SetState(kEnded);
{
base::AutoLock auto_lock(lock_);
clock_->EndOfStream();
@@ -988,7 +985,6 @@ void Pipeline::TeardownStateTransitionTask() {
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
@@ -1217,7 +1213,6 @@ void Pipeline::TearDownPipeline() {
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