1 #ifndef MF_FLOW_ASYNC_NODE_H_
2 #define MF_FLOW_ASYNC_NODE_H_
5 #include "../queue/shared_ring.h"
8 namespace mf {
namespace flow {
16 std::unique_ptr<shared_ring> ring_;
23 void setup()
override;
49 bool running_ =
false;
59 void launch()
final override;
60 void stop()
final override;
64 return add_input_<node_input>(past_window, future_window);
68 return add_output_<async_node_output>(format);
void setup() override
Definition: async_node.cc:124
Generic ndarray_view where lower dimension(s) are type-erased.
Definition: ndarray_view_generic.h:25
Output port of node in flow graph.
Definition: node.h:108
Asynchronous node base class.
Definition: async_node.h:47
timed_frame_array_view begin_read(time_unit duration) override
Definition: async_node.cc:146
void pull(time_span span) override
Definition: async_node.cc:135
std::ptrdiff_t time_unit
Discrete time unit type.
Definition: common.h:52
node_output(const node_output &)=delete
void stop() finaloverride
Called by graph for all node, before destruction of any node.
Definition: async_node.cc:116
void launch() finaloverride
Called by graph for all nodes, before any frame is pulled from sink.
Definition: async_node.cc:107
void cancel_write_frame() override
Definition: async_node.cc:199
Node which delegates concrete frame processing to associated filter object.
Definition: filter_node.h:15
node_input & add_input(time_unit past_window, time_unit future_window) override
Definition: async_node.h:63
frame_view begin_write_frame(time_unit &t) override
Definition: async_node.cc:173
bool process_next_frame() override
Definition: async_node.cc:7
async_node_output & add_output(const frame_format &format) override
Definition: async_node.h:67
void end_write_frame(bool was_last_frame) override
Definition: async_node.cc:193
void end_read(time_unit duration) override
Definition: async_node.cc:163
time_unit end_time() const override
Definition: async_node.cc:168
One-dimensional time span.
Definition: common.h:61
void internal_setup() finaloverride
Called by propagate_setup_.
Definition: async_node.cc:101
~async_node()
Definition: async_node.cc:96
async_node(graph &)
Definition: async_node.cc:91
Definition: async_node.h:14
Generic ndarray_timed_view where lower dimension(s) are type-erased.
Definition: ndarray_timed_view_generic.h:12
Graph containing interconnected nodes through which media frames flow.
Definition: graph.h:23