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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // playing the media. | 91 // playing the media. |
92 // | 92 // |
93 // If any error ever happens, this object will transition to the "Error" state | 93 // If any error ever happens, this object will transition to the "Error" state |
94 // from any state. If Stop() is ever called, this object will transition to | 94 // from any state. If Stop() is ever called, this object will transition to |
95 // "Stopped" state. | 95 // "Stopped" state. |
96 class MEDIA_EXPORT Pipeline | 96 class MEDIA_EXPORT Pipeline |
97 : public base::RefCountedThreadSafe<Pipeline>, | 97 : public base::RefCountedThreadSafe<Pipeline>, |
98 public DemuxerHost { | 98 public DemuxerHost { |
99 public: | 99 public: |
100 // Constructs a media pipeline that will execute on |message_loop|. | 100 // Constructs a media pipeline that will execute on |message_loop|. |
101 Pipeline(MessageLoop* message_loop, MediaLog* media_log); | 101 Pipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop, |
| 102 MediaLog* media_log); |
102 | 103 |
103 // Build a pipeline to using the given filter collection to construct a filter | 104 // Build a pipeline to using the given filter collection to construct a filter |
104 // chain, executing |start_cb| when initialization has completed. | 105 // chain, executing |start_cb| when initialization has completed. |
105 // | 106 // |
106 // The following permanent callbacks will be executed as follows up until | 107 // The following permanent callbacks will be executed as follows up until |
107 // Stop() has completed: | 108 // Stop() has completed: |
108 // |ended_cb| will be executed whenever the media reaches the end. | 109 // |ended_cb| will be executed whenever the media reaches the end. |
109 // |error_cb| will be executed whenever an error occurs but hasn't | 110 // |error_cb| will be executed whenever an error occurs but hasn't |
110 // been reported already through another callback. | 111 // been reported already through another callback. |
111 // | 112 // |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 base::Time creation_time_; | 522 base::Time creation_time_; |
522 | 523 |
523 scoped_ptr<SerialRunner> pending_callbacks_; | 524 scoped_ptr<SerialRunner> pending_callbacks_; |
524 | 525 |
525 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 526 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
526 }; | 527 }; |
527 | 528 |
528 } // namespace media | 529 } // namespace media |
529 | 530 |
530 #endif // MEDIA_BASE_PIPELINE_H_ | 531 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |