| 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" |
| 11 #include "services/media/framework/refs.h" | 11 #include "services/media/framework/refs.h" |
| 12 #include "services/media/framework/stages/active_multistream_source_stage.h" |
| 12 #include "services/media/framework/stages/active_sink_stage.h" | 13 #include "services/media/framework/stages/active_sink_stage.h" |
| 13 #include "services/media/framework/stages/active_source_stage.h" | 14 #include "services/media/framework/stages/active_source_stage.h" |
| 14 #include "services/media/framework/stages/multistream_source_stage.h" | 15 #include "services/media/framework/stages/multistream_source_stage.h" |
| 15 #include "services/media/framework/stages/stage.h" | 16 #include "services/media/framework/stages/stage.h" |
| 16 #include "services/media/framework/stages/transform_stage.h" | 17 #include "services/media/framework/stages/transform_stage.h" |
| 17 | 18 |
| 18 namespace mojo { | 19 namespace mojo { |
| 19 namespace media { | 20 namespace media { |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 public: \ | 34 public: \ |
| 34 static inline Stage* Create(std::shared_ptr<T> t_ptr) { \ | 35 static inline Stage* Create(std::shared_ptr<T> t_ptr) { \ |
| 35 return new TStage(std::shared_ptr<TModel>(t_ptr)); \ | 36 return new TStage(std::shared_ptr<TModel>(t_ptr)); \ |
| 36 } \ | 37 } \ |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 DEFINE_STAGE_CREATOR(MultistreamSource, MultistreamSourceStage); | 40 DEFINE_STAGE_CREATOR(MultistreamSource, MultistreamSourceStage); |
| 40 DEFINE_STAGE_CREATOR(Transform, TransformStage); | 41 DEFINE_STAGE_CREATOR(Transform, TransformStage); |
| 41 DEFINE_STAGE_CREATOR(ActiveSource, ActiveSourceStage); | 42 DEFINE_STAGE_CREATOR(ActiveSource, ActiveSourceStage); |
| 42 DEFINE_STAGE_CREATOR(ActiveSink, ActiveSinkStage); | 43 DEFINE_STAGE_CREATOR(ActiveSink, ActiveSinkStage); |
| 44 DEFINE_STAGE_CREATOR(ActiveMultistreamSource, ActiveMultistreamSourceStage); |
| 43 | 45 |
| 44 #undef DEFINE_STAGE_CREATOR | 46 #undef DEFINE_STAGE_CREATOR |
| 45 | 47 |
| 46 } // namespace | 48 } // namespace |
| 47 | 49 |
| 48 // | 50 // |
| 49 // USAGE | 51 // USAGE |
| 50 // | 52 // |
| 51 // Graph is a container for sources, sinks and transforms ('parts') connected | 53 // Graph is a container for sources, sinks and transforms ('parts') connected |
| 52 // in a graph. PartRef, InputRef and OutputRef are all | 54 // in a graph. PartRef, InputRef and OutputRef are all |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 std::list<Stage*> sinks_; | 202 std::list<Stage*> sinks_; |
| 201 | 203 |
| 202 Engine engine_; | 204 Engine engine_; |
| 203 Stage::UpdateCallback update_function_; | 205 Stage::UpdateCallback update_function_; |
| 204 }; | 206 }; |
| 205 | 207 |
| 206 } // namespace media | 208 } // namespace media |
| 207 } // namespace mojo | 209 } // namespace mojo |
| 208 | 210 |
| 209 #endif // SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ | 211 #endif // SERVICES_MEDIA_FRAMEWORK_GRAPH_H_ |
| OLD | NEW |