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