mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sink_node.h
Go to the documentation of this file.
1 #ifndef MF_FLOW_SINK_NODE_H_
2 #define MF_FLOW_SINK_NODE_H_
3 
4 #include "filter_node.h"
5 
6 namespace mf { namespace flow {
7 
8 class graph;
9 
11 
12 class sink_node final : public filter_node {
13 public:
14  explicit sink_node(graph& gr) : filter_node(gr) { }
15 
16  void internal_setup() final override;
17  void launch() final override;
18  void stop() final override;
19  bool process_next_frame() final override;
20 
21  void setup_graph();
22 
23  void pull(time_unit t);
25 
26  void seek(time_unit t);
27 
28  node_input& add_input(time_unit past_window, time_unit future_window) override {
29  return add_input_<node_input>(past_window, future_window);
30  }
31 
32  node_output& add_output(const frame_format& format) override { throw 0; }
33 };
34 
35 
36 }}
37 
38 #endif
Input port of node in flow graph.
Definition: node.h:166
node_output & add_output(const frame_format &format) override
Definition: sink_node.h:32
Output port of node in flow graph.
Definition: node.h:108
bool process_next_frame() finaloverride
Definition: sink_node.cc:78
std::ptrdiff_t time_unit
Discrete time unit type.
Definition: common.h:52
void pull(time_unit t)
Definition: sink_node.cc:22
node_input & add_input(time_unit past_window, time_unit future_window) override
Definition: sink_node.h:28
Node which delegates concrete frame processing to associated filter object.
Definition: filter_node.h:15
void internal_setup() finaloverride
Called by propagate_setup_.
Definition: sink_node.cc:11
Sink node base class.
Definition: sink_node.h:12
sink_node(graph &gr)
Definition: sink_node.h:14
void launch() finaloverride
Called by graph for all nodes, before any frame is pulled from sink.
Definition: sink_node.cc:17
void stop() finaloverride
Called by graph for all node, before destruction of any node.
Definition: sink_node.cc:19
void pull_next_frame()
Definition: sink_node.h:24
void seek(time_unit t)
Definition: sink_node.cc:83
Graph containing interconnected nodes through which media frames flow.
Definition: graph.h:23
void setup_graph()
Definition: sink_node.cc:6
Format information of type-erased frame of ndarray_view_generic.
Definition: frame_format.h:14