| 319 | } |
| 320 | |
| 321 | int Graph::init_input_streams() { |
| 322 | // init all graph input streams |
| 323 | for (auto &stream : graph_config_.get_input_streams()) { |
| 324 | // create graph input stream |
| 325 | std::shared_ptr<GraphInputStream> graph_input_stream = |
| 326 | std::make_shared<GraphInputStream>(); |
| 327 | // create output stream manager and set it into input stream |
| 328 | std::vector<StreamConfig> ss = {stream}; |
| 329 | std::shared_ptr<OutputStreamManager> manager = |
| 330 | std::make_shared<OutputStreamManager>(ss); |
| 331 | graph_input_stream->set_manager(manager); |
| 332 | |
| 333 | input_streams_[stream.get_identifier()] = graph_input_stream; |
| 334 | |
| 335 | std::shared_ptr<OutputStream> output_stream; |
| 336 | manager->get_stream(0, output_stream); |
| 337 | // link downstream nodes |
| 338 | add_all_mirrors_for_output_stream(output_stream); |
| 339 | } |
| 340 | return 0; |
| 341 | } |
| 342 | |
| 343 | int Graph::add_all_mirrors_for_output_stream( |
| 344 | std::shared_ptr<OutputStream> &output_stream) { |
nothing calls this directly
no test coverage detected