gaze  0.1.0
Perform gaze tracking with common webcams.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
pipeline.h
1 #ifndef INCLUDE_GAZE_PIPELINE_H_
2 #define INCLUDE_GAZE_PIPELINE_H_
3 
4 #include <atomic>
5 #include <shared_mutex> // NOLINT
6 #include <thread> // NOLINT
7 #include <vector>
8 
9 #include "gaze/pipeline_step.h"
10 #include "gaze/util/data.h"
11 
12 
13 namespace gaze {
14 
19 class Pipeline {
20  std::atomic<bool> debug = std::atomic<bool>(false);
21  std::atomic<bool> running = std::atomic<bool>(false);
22  std::shared_mutex data_access_mutex;
23  util::Data current_data;
25  std::thread* thread;
26 
33  void operator()();
34 
35  public:
36  //{@
45  explicit Pipeline(std::vector<PipelineStep*> steps,
46  const bool start = true);
47 
51  ~Pipeline();
53 
54  //{@
58  void start();
59 
63  void stop();
65 
67 
71 
77 };
78 
79 } // namespace gaze
80 
81 #endif // INCLUDE_GAZE_PIPELINE_H_
The processing pipeline from input to output.
Definition: pipeline.h:19
void start()
Definition: pipeline.cpp:61
std::vector< PipelineStep * > get_steps()
Definition: pipeline.cpp:74
util::Data get_data()
Definition: pipeline.cpp:69
Pipeline(std::vector< PipelineStep * > steps, const bool start=true)
Definition: pipeline.cpp:47
Wraps the data acquired per frame into a single instance.
Definition: data.h:27