| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Implementation of Pipeline. | 5 // Implementation of Pipeline. |
| 6 | 6 |
| 7 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ | 7 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ |
| 8 #define MEDIA_BASE_PIPELINE_IMPL_H_ | 8 #define MEDIA_BASE_PIPELINE_IMPL_H_ |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/gtest_prod_util.h" |
| 14 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 15 #include "base/ref_counted.h" | 16 #include "base/ref_counted.h" |
| 16 #include "base/scoped_ptr.h" | 17 #include "base/scoped_ptr.h" |
| 17 #include "base/thread.h" | 18 #include "base/thread.h" |
| 18 #include "base/time.h" | 19 #include "base/time.h" |
| 19 #include "media/base/clock_impl.h" | 20 #include "media/base/clock_impl.h" |
| 20 #include "media/base/filter_host.h" | 21 #include "media/base/filter_host.h" |
| 21 #include "media/base/pipeline.h" | 22 #include "media/base/pipeline.h" |
| 22 #include "testing/gtest/include/gtest/gtest_prod.h" | |
| 23 | 23 |
| 24 namespace media { | 24 namespace media { |
| 25 | 25 |
| 26 | 26 |
| 27 // PipelineImpl runs the media pipeline. Filters are created and called on the | 27 // PipelineImpl runs the media pipeline. Filters are created and called on the |
| 28 // message loop injected into this object. PipelineImpl works like a state | 28 // message loop injected into this object. PipelineImpl works like a state |
| 29 // machine to perform asynchronous initialization, pausing, seeking and playing. | 29 // machine to perform asynchronous initialization, pausing, seeking and playing. |
| 30 // | 30 // |
| 31 // Here's a state diagram that describes the lifetime of this object. | 31 // Here's a state diagram that describes the lifetime of this object. |
| 32 // | 32 // |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 typedef std::vector<scoped_refptr<MediaFilter> > FilterVector; | 407 typedef std::vector<scoped_refptr<MediaFilter> > FilterVector; |
| 408 FilterVector filters_; | 408 FilterVector filters_; |
| 409 | 409 |
| 410 typedef std::map<FilterType, scoped_refptr<MediaFilter> > FilterTypeMap; | 410 typedef std::map<FilterType, scoped_refptr<MediaFilter> > FilterTypeMap; |
| 411 FilterTypeMap filter_types_; | 411 FilterTypeMap filter_types_; |
| 412 | 412 |
| 413 // Vector of threads owned by the pipeline and being used by filters. | 413 // Vector of threads owned by the pipeline and being used by filters. |
| 414 typedef std::vector<base::Thread*> FilterThreadVector; | 414 typedef std::vector<base::Thread*> FilterThreadVector; |
| 415 FilterThreadVector filter_threads_; | 415 FilterThreadVector filter_threads_; |
| 416 | 416 |
| 417 FRIEND_TEST(PipelineImplTest, GetBufferedTime); | 417 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); |
| 418 |
| 418 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 419 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
| 419 }; | 420 }; |
| 420 | 421 |
| 421 } // namespace media | 422 } // namespace media |
| 422 | 423 |
| 423 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 424 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
| OLD | NEW |