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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // [ InitXXX (for each filter) ] -------->[ Stopping (for each filter) ] | 73 // [ InitXXX (for each filter) ] -------->[ Stopping (for each filter) ] |
74 // | ^ | 74 // | ^ |
75 // V | if Stop | 75 // V | if Stop |
76 // [ Seeking (for each filter) ] <--------[ Flushing (for each filter) ] | 76 // [ Seeking (for each filter) ] <--------[ Flushing (for each filter) ] |
77 // | if Seek ^ | 77 // | if Seek ^ |
78 // V | | 78 // V | |
79 // [ Starting (for each filter) ] | | 79 // [ Starting (for each filter) ] | |
80 // | | | 80 // | | |
81 // V Seek()/Stop() | | 81 // V Seek()/Stop() | |
82 // [ Started ] -------------------------> [ Pausing (for each filter) ] | 82 // [ Started ] -------------------------> [ Pausing (for each filter) ] |
| 83 // | ^ |
| 84 // | OnRendererEnded() Seek()/Stop() | |
| 85 // `-------------> [ Ended ] ---------------------' |
83 // ^ SetError() | 86 // ^ SetError() |
84 // | | 87 // | |
85 // [ Any State Other Than InitXXX ] | 88 // [ Any State Other Than InitXXX ] |
86 | 89 |
87 // | 90 // |
88 // Initialization is a series of state transitions from "Created" through each | 91 // Initialization is a series of state transitions from "Created" through each |
89 // filter initialization state. When all filter initialization states have | 92 // filter initialization state. When all filter initialization states have |
90 // completed, we are implicitly in a "Paused" state. At that point we simulate | 93 // completed, we are implicitly in a "Paused" state. At that point we simulate |
91 // a Seek() to the beginning of the media to give filters a chance to preroll. | 94 // a Seek() to the beginning of the media to give filters a chance to preroll. |
92 // From then on the normal Seek() transitions are carried out and we start | 95 // From then on the normal Seek() transitions are carried out and we start |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 kInitDemuxer, | 239 kInitDemuxer, |
237 kInitAudioDecoder, | 240 kInitAudioDecoder, |
238 kInitAudioRenderer, | 241 kInitAudioRenderer, |
239 kInitVideoDecoder, | 242 kInitVideoDecoder, |
240 kInitVideoRenderer, | 243 kInitVideoRenderer, |
241 kPausing, | 244 kPausing, |
242 kSeeking, | 245 kSeeking, |
243 kFlushing, | 246 kFlushing, |
244 kStarting, | 247 kStarting, |
245 kStarted, | 248 kStarted, |
| 249 kEnded, |
246 kStopping, | 250 kStopping, |
247 kStopped, | 251 kStopped, |
248 kError, | 252 kError, |
249 }; | 253 }; |
250 | 254 |
251 // Updates |state_|. All state transitions should use this call. | 255 // Updates |state_|. All state transitions should use this call. |
252 void SetState(State next_state); | 256 void SetState(State next_state); |
253 | 257 |
254 // Simple method used to make sure the pipeline is running normally. | 258 // Simple method used to make sure the pipeline is running normally. |
255 bool IsPipelineOk(); | 259 bool IsPipelineOk(); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 base::Time creation_time_; | 559 base::Time creation_time_; |
556 | 560 |
557 scoped_ptr<SerialRunner> pending_callbacks_; | 561 scoped_ptr<SerialRunner> pending_callbacks_; |
558 | 562 |
559 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 563 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
560 }; | 564 }; |
561 | 565 |
562 } // namespace media | 566 } // namespace media |
563 | 567 |
564 #endif // MEDIA_BASE_PIPELINE_H_ | 568 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |