| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ | 5 #ifndef SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ |
| 6 #define SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ | 6 #define SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "services/media/framework/engine.h" | 10 #include "services/media/framework/engine.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // Prepares the graph for operation. | 180 // Prepares the graph for operation. |
| 181 void Prepare(); | 181 void Prepare(); |
| 182 | 182 |
| 183 // Prepares the input and everything upstream of it. This method is used to | 183 // Prepares the input and everything upstream of it. This method is used to |
| 184 // prepare subgraphs added when the rest of the graph is already prepared. | 184 // prepare subgraphs added when the rest of the graph is already prepared. |
| 185 void PrepareInput(const InputRef& input); | 185 void PrepareInput(const InputRef& input); |
| 186 | 186 |
| 187 // Primes all the sinks in the graph. | 187 // Primes all the sinks in the graph. |
| 188 void PrimeSinks(); | 188 void PrimeSinks(); |
| 189 | 189 |
| 190 // Flushes the output and the subgraph downstream of it. |
| 191 void FlushOutput(const OutputRef& output); |
| 192 |
| 193 // Flushes the output and the subgraph downstream of it. |
| 194 void FlushAllOutputs(PartRef part); |
| 195 |
| 190 private: | 196 private: |
| 191 // Adds a stage to the graph. | 197 // Adds a stage to the graph. |
| 192 PartRef Add(Stage* stage); | 198 PartRef Add(Stage* stage); |
| 193 | 199 |
| 194 std::list<Stage*> stages_; | 200 std::list<Stage*> stages_; |
| 195 std::list<Stage*> sources_; | 201 std::list<Stage*> sources_; |
| 196 std::list<Stage*> sinks_; | 202 std::list<Stage*> sinks_; |
| 197 | 203 |
| 198 Engine engine_; | 204 Engine engine_; |
| 199 Stage::UpdateCallback update_function_; | 205 Stage::UpdateCallback update_function_; |
| 200 }; | 206 }; |
| 201 | 207 |
| 202 } // namespace media | 208 } // namespace media |
| 203 } // namespace mojo | 209 } // namespace mojo |
| 204 | 210 |
| 205 #endif // SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ | 211 #endif // SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ |
| OLD | NEW |