Chromium Code Reviews| 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() | |
|
Ami GONE FROM CHROMIUM
2012/08/08 21:48:26
why no mention of the On*Ended() callbacks?
scherkus (not reviewing)
2012/08/08 22:28:34
Not sure if they'd be helpful / how I could fit th
|
| // [ 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_; |