OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // playing the media. | 96 // playing the media. |
97 // | 97 // |
98 // If any error ever happens, this object will transition to the "Error" state | 98 // If any error ever happens, this object will transition to the "Error" state |
99 // from any state. If Stop() is ever called, this object will transition to | 99 // from any state. If Stop() is ever called, this object will transition to |
100 // "Stopped" state. | 100 // "Stopped" state. |
101 class MEDIA_EXPORT Pipeline | 101 class MEDIA_EXPORT Pipeline |
102 : public base::RefCountedThreadSafe<Pipeline>, | 102 : public base::RefCountedThreadSafe<Pipeline>, |
103 public DemuxerHost { | 103 public DemuxerHost { |
104 public: | 104 public: |
105 // Constructs a media pipeline that will execute on |message_loop|. | 105 // Constructs a media pipeline that will execute on |message_loop|. |
106 Pipeline(MessageLoop* message_loop, MediaLog* media_log); | 106 Pipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop, |
| 107 MediaLog* media_log); |
107 | 108 |
108 // Build a pipeline to using the given filter collection to construct a filter | 109 // Build a pipeline to using the given filter collection to construct a filter |
109 // chain. | 110 // chain. |
110 // | 111 // |
111 // Pipeline initialization is an inherently asynchronous process. Clients can | 112 // Pipeline initialization is an inherently asynchronous process. Clients can |
112 // either poll the IsInitialized() method (discouraged) or optionally pass in | 113 // either poll the IsInitialized() method (discouraged) or optionally pass in |
113 // |start_cb|, which will be executed when initialization completes. | 114 // |start_cb|, which will be executed when initialization completes. |
114 // | 115 // |
115 // The following permanent callbacks will be executed as follows: | 116 // The following permanent callbacks will be executed as follows: |
116 // |start_cb_| will be executed when Start is done (successfully or not). | 117 // |start_cb_| will be executed when Start is done (successfully or not). |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 base::Time creation_time_; | 560 base::Time creation_time_; |
560 | 561 |
561 scoped_ptr<SerialRunner> pending_callbacks_; | 562 scoped_ptr<SerialRunner> pending_callbacks_; |
562 | 563 |
563 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 564 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
564 }; | 565 }; |
565 | 566 |
566 } // namespace media | 567 } // namespace media |
567 | 568 |
568 #endif // MEDIA_BASE_PIPELINE_H_ | 569 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |