Index: media/base/pipeline.h |
diff --git a/media/base/pipeline.h b/media/base/pipeline.h |
index 2887965c999aa192cd2ea1893849738a85e54657..0bfe8b436553fe13c8e38e40e2874179b3edf393 100644 |
--- a/media/base/pipeline.h |
+++ b/media/base/pipeline.h |
@@ -12,7 +12,6 @@ |
#include "base/synchronization/lock.h" |
#include "media/base/audio_renderer.h" |
#include "media/base/demuxer.h" |
-#include "media/base/filter_host.h" |
#include "media/base/media_export.h" |
#include "media/base/pipeline_status.h" |
#include "media/base/ranges.h" |
@@ -29,7 +28,6 @@ namespace media { |
class AudioDecoder; |
class Clock; |
-class Filter; |
class FilterCollection; |
class MediaLog; |
class VideoDecoder; |
@@ -82,7 +80,7 @@ class MEDIA_EXPORT PipelineStatusNotification { |
// V Seek()/Stop() | |
// [ Started ] -------------------------> [ Pausing (for each filter) ] |
// | ^ |
-// | NotifyEnded() Seek()/Stop() | |
+// | OnRendererEnded() Seek()/Stop() | |
// `-------------> [ Ended ] ---------------------' |
// ^ SetError() |
// | |
@@ -101,7 +99,6 @@ class MEDIA_EXPORT PipelineStatusNotification { |
// "Stopped" state. |
class MEDIA_EXPORT Pipeline |
: public base::RefCountedThreadSafe<Pipeline>, |
- public FilterHost, |
public DemuxerHost { |
public: |
// Constructs a media pipeline that will execute on |message_loop|. |
@@ -226,6 +223,9 @@ class MEDIA_EXPORT Pipeline |
private: |
FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); |
FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRenderer); |
+ FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRendererDuringInit); |
+ FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); |
+ FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo); |
friend class MediaLog; |
// Only allow ourselves to be deleted by reference counting. |
@@ -296,12 +296,16 @@ class MEDIA_EXPORT Pipeline |
virtual void SetDuration(base::TimeDelta duration) OVERRIDE; |
virtual void OnDemuxerError(PipelineStatus error) OVERRIDE; |
- // FilterHost implementation. |
- virtual void SetError(PipelineStatus error) OVERRIDE; |
- virtual base::TimeDelta GetTime() const OVERRIDE; |
- virtual base::TimeDelta GetDuration() const OVERRIDE; |
- virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; |
- virtual void NotifyEnded() OVERRIDE; |
+ // Initiates teardown sequence in response to a runtime error. |
+ // |
+ // Safe to call from any thread. |
+ void SetError(PipelineStatus error); |
+ |
+ // 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 by filters upon completing initialization. |
void OnFilterInitialize(PipelineStatus status); |
@@ -358,8 +362,8 @@ 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 filter that it has ended. |
- void NotifyEndedTask(); |
+ // Carries out handling a notification from a renderer that it has ended. |
+ void OnRendererEndedTask(); |
// Carries out disabling the audio renderer. |
void AudioDisabledTask(); |
@@ -536,13 +540,6 @@ class MEDIA_EXPORT Pipeline |
PipelineStatusCB ended_cb_; |
PipelineStatusCB error_cb_; |
- // Reference to the filter(s) that constitute the pipeline. |
- // |
- // TODO(scherkus): At this point in time this is a CompositeFilter that |
- // contains |video_renderer_|. Remove when CompositeFilter is gone, see |
- // http://crbug.com/126069 |
- scoped_refptr<Filter> pipeline_filter_; |
- |
// Decoder reference used for signalling imminent shutdown. |
// This is a HACK necessary because WebMediaPlayerImpl::Destroy() holds the |
// renderer thread loop hostage for until PipelineImpl::Stop() calls its |