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> |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Reset the state of the pipeline object to the initial state. This method | 119 // Reset the state of the pipeline object to the initial state. This method |
120 // is used by the constructor, and the Stop() method. | 120 // is used by the constructor, and the Stop() method. |
121 void ResetState(); | 121 void ResetState(); |
122 | 122 |
123 // Updates |state_|. All state transitions should use this call. | 123 // Updates |state_|. All state transitions should use this call. |
124 void set_state(State next_state); | 124 void set_state(State next_state); |
125 | 125 |
126 // Simple method used to make sure the pipeline is running normally. | 126 // Simple method used to make sure the pipeline is running normally. |
127 bool IsPipelineOk(); | 127 bool IsPipelineOk(); |
128 | 128 |
129 // Helper method to tell whether we are in the state of initializing. | |
130 bool IsPipelineInitializing(); | |
131 | |
132 // Helper method to tell whether we are stopped or in error. | 129 // Helper method to tell whether we are stopped or in error. |
133 bool IsPipelineStopped(); | 130 bool IsPipelineStopped(); |
134 | 131 |
135 // Helper method to tell whether we are in transition to stop state. | 132 // Helper method to tell whether we are in transition to stop state. |
136 bool IsPipelineTearingDown(); | 133 bool IsPipelineTearingDown(); |
137 | 134 |
138 // We could also be delayed by a transition during seek is performed. | 135 // We could also be delayed by a transition during seek is performed. |
139 bool IsPipelineStopPending(); | 136 bool IsPipelineStopPending(); |
140 | 137 |
141 // Helper method to tell whether we are in transition to seek state. | 138 // Helper method to tell whether we are in transition to seek state. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 284 |
288 // Whether or not the pipeline is in transition for a seek operation. | 285 // Whether or not the pipeline is in transition for a seek operation. |
289 bool seek_pending_; | 286 bool seek_pending_; |
290 | 287 |
291 // Whether or not the pipeline is pending a stop operation. | 288 // Whether or not the pipeline is pending a stop operation. |
292 bool stop_pending_; | 289 bool stop_pending_; |
293 | 290 |
294 // Whether or not the pipeline is perform a stop operation. | 291 // Whether or not the pipeline is perform a stop operation. |
295 bool tearing_down_; | 292 bool tearing_down_; |
296 | 293 |
| 294 // Whether or not an error triggered the teardown. |
| 295 bool error_caused_teardown_; |
| 296 |
297 // Duration of the media in microseconds. Set by filters. | 297 // Duration of the media in microseconds. Set by filters. |
298 base::TimeDelta duration_; | 298 base::TimeDelta duration_; |
299 | 299 |
300 // Amount of available buffered data in microseconds. Set by filters. | 300 // Amount of available buffered data in microseconds. Set by filters. |
301 base::TimeDelta buffered_time_; | 301 base::TimeDelta buffered_time_; |
302 | 302 |
303 // Amount of available buffered data. Set by filters. | 303 // Amount of available buffered data. Set by filters. |
304 int64 buffered_bytes_; | 304 int64 buffered_bytes_; |
305 | 305 |
306 // Total size of the media. Set by filters. | 306 // Total size of the media. Set by filters. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 401 |
402 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); | 402 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); |
403 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, AudioStreamShorterThanVideo); | 403 FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, AudioStreamShorterThanVideo); |
404 | 404 |
405 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 405 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
406 }; | 406 }; |
407 | 407 |
408 } // namespace media | 408 } // namespace media |
409 | 409 |
410 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 410 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
OLD | NEW |