| | |
| | | }; |
| | | |
| | | typedef PipeLineElem* (*elem_create_func_t)(); |
| | | typedef void (*elem_destory_func_t)(PipeLineElem* elem); |
| | | |
| | | // 0 (there is no elem). do nothing |
| | | // 1 (there is one elem). gain --> pm.deleter |
| | |
| | | |
| | | bool register_elem_creator(const std::string& type, elem_create_func_t func); |
| | | static bool register_global_elem_creator(const std::string& type, elem_create_func_t func); |
| | | |
| | | |
| | | void push_elem(PipeLineElem* elem); |
| | | PipeLineElem* push_elem(const std::string& type); |
| | | void push_front_elem(PipeLineElem* elem); |
| | | bool remove_elem(PipeLineElem* elem); |
| | | |
| | | PipeLineElem* at(int idx); |
| | | |
| | | void finit(elem_destory_func_t elem_destory_func); |
| | | |
| | | bool check_pipe_complete(PipeLineElem* lastRetElem) const; |
| | | |
| | | // do pipe sync. returns the element who returns false, or the last one. |
| | | // if false return, the element should deal with pm, clean up. |
| | | PipeLineElem* pipe(PipeMaterial* pm = nullptr); |
| | | |
| | | // do pipe async |
| | | void pipe_start(); |
| | | void pipe_notify(PipeLineElem*); |
| | | void pipe_stop(); |
| | | |
| | | void set_param(const std::string& name, const std::string& value); |
| | | std::string get_param(const std::string& name) const; |