diff options
author | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-29 20:57:00 +0000 |
---|---|---|
committer | acolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-29 20:57:00 +0000 |
commit | da827048d636a9c8cc5b0217077c2fe97cd6b8fe (patch) | |
tree | 7c73b6cc6418bbf1fef7bebec44e416bfceea644 /media/base/pipeline_impl.h | |
parent | 7c8c869c9cd34e78dc40d7c9840aa7b4b778ba0a (diff) | |
download | chromium_src-da827048d636a9c8cc5b0217077c2fe97cd6b8fe.zip chromium_src-da827048d636a9c8cc5b0217077c2fe97cd6b8fe.tar.gz chromium_src-da827048d636a9c8cc5b0217077c2fe97cd6b8fe.tar.bz2 |
Revert 70267 - Refactor PipelineImpl to use CompositeFilter to manage Filter state transitions.
BUG=54110
TEST=media_unittests CompositeFilterTest.*
Review URL: http://codereview.chromium.org/5744002
TBR=acolwell@chromium.org
Review URL: http://codereview.chromium.org/6026013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline_impl.h')
-rw-r--r-- | media/base/pipeline_impl.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h index fbc2b3d..aa99f73 100644 --- a/media/base/pipeline_impl.h +++ b/media/base/pipeline_impl.h @@ -18,7 +18,6 @@ #include "base/thread.h" #include "base/time.h" #include "media/base/clock.h" -#include "media/base/composite_filter.h" #include "media/base/filter_host.h" #include "media/base/pipeline.h" @@ -120,9 +119,6 @@ class PipelineImpl : public Pipeline, public FilterHost { // is used by the constructor, and the Stop() method. void ResetState(); - // Updates |state_|. All state transitions should use this call. - void set_state(State next_state); - // Simple method used to make sure the pipeline is running normally. bool IsPipelineOk(); @@ -357,6 +353,12 @@ class PipelineImpl : public Pipeline, public FilterHost { // Member that tracks the current state. State state_; + // For kPausing, kSeeking and kStarting, we need to track how many filters + // have completed transitioning to the destination state. When + // |remaining_transitions_| reaches 0 the pipeline can transition out + // of the current state. + size_t remaining_transitions_; + // For kSeeking we need to remember where we're seeking between filter // replies. base::TimeDelta seek_timestamp_; @@ -386,14 +388,20 @@ class PipelineImpl : public Pipeline, public FilterHost { scoped_ptr<PipelineCallback> error_callback_; scoped_ptr<PipelineCallback> network_callback_; - // Reference to the filter(s) that constitute the pipeline. - scoped_refptr<Filter> pipeline_filter_; + // Vector of our filters and map maintaining the relationship between the + // FilterType and the filter itself. + typedef std::vector<scoped_refptr<Filter> > FilterVector; + FilterVector filters_; // Renderer references used for setting the volume and determining // when playback has finished. scoped_refptr<AudioRenderer> audio_renderer_; scoped_refptr<VideoRenderer> video_renderer_; + // Vector of threads owned by the pipeline and being used by filters. + typedef std::vector<base::Thread*> FilterThreadVector; + FilterThreadVector filter_threads_; + // Helper class that stores filter references during pipeline // initialization. class PipelineInitState; |