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

Unified Diff: media/base/pipeline.h

Issue 10834236: Replace Pipeline::kEnded state and HasEnded() methods with renderer-specific bools. (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/mock_filters.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.h
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index 1d50f04e6495d49fb64c2f9742d04970905eadba..6efa6f3c44172bf64e625b4be247e4e4bed0d5bf 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -80,9 +80,6 @@ class MEDIA_EXPORT PipelineStatusNotification {
// | |
// V Seek()/Stop() |
// [ Started ] -------------------------> [ Pausing (for each filter) ]
-// | ^
-// | OnRendererEnded() Seek()/Stop() |
-// `-------------> [ Ended ] ---------------------'
// ^ SetError()
// |
// [ Any State Other Than InitXXX ]
@@ -246,7 +243,6 @@ class MEDIA_EXPORT Pipeline
kFlushing,
kStarting,
kStarted,
- kEnded,
kStopping,
kStopped,
kError,
@@ -301,8 +297,9 @@ class MEDIA_EXPORT Pipeline
// Callback executed when the natural size of the video has changed.
void OnNaturalVideoSizeChanged(const gfx::Size& size);
- // Callback executed when either of the renderers have ended.
- void OnRendererEnded();
+ // Callbacks executed when a renderer has ended.
+ void OnAudioRendererEnded();
+ void OnVideoRendererEnded();
// Callbacks executed by filters upon completing initialization.
void OnFilterInitialize(PipelineStatus status);
@@ -357,8 +354,10 @@ class MEDIA_EXPORT Pipeline
// Carries out notifying filters that we are seeking to a new timestamp.
void SeekTask(base::TimeDelta time, const PipelineStatusCB& seek_cb);
- // Carries out handling a notification from a renderer that it has ended.
- void OnRendererEndedTask();
+ // Handles audio/video ended logic and running |ended_cb_|.
+ void DoAudioRendererEnded();
+ void DoVideoRendererEnded();
+ void RunEndedCallbackIfNeeded();
// Carries out disabling the audio renderer.
void AudioDisabledTask();
@@ -519,6 +518,10 @@ class MEDIA_EXPORT Pipeline
// replies.
base::TimeDelta seek_timestamp_;
+ // Whether we've received the audio/video ended events.
+ bool audio_ended_;
+ bool video_ended_;
+
// Set to true in DisableAudioRendererTask().
bool audio_disabled_;
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698