roviz  0.7
Code Documentation of roviz
frame_delayer_item.h
1 #ifndef FRAMEDELAYER_ITEM_H
2 #define FRAMEDELAYER_ITEM_H
3 
4 #include "core/roviz_item.h"
5 #include "streams/image_m.h"
6 #include <queue>
7 #include <thread>
8 
15 {
16 #if ROVIZ_BACKEND == ROVIZ_BACKEND_Dev
17  Q_OBJECT
18 #endif
19 
20 public:
21  ROVIZ_INVOKABLE FrameDelayerItem();
22  ~FrameDelayerItem();
23 
24 protected:
25  void thread(void) override;
26  void trimChanged(void *trim, int value);
27 
28 private:
29  Input<Image> input;
30  Output<Image> output;
31  Trim trim_delay;
32  std::queue<Image> queue;
33  std::mutex mtx;
34 };
35 
36 #endif // FRAMEDELAYER_ITEM_H
A value that can be trimmed at runtime.
Definition: trim.h:21
Base class for all items that use the roviz framework.
Definition: roviz_item.h:43
void thread(void) override
Main thread of the item.
Definition: frame_delayer_item.cpp:19
Delays incoming frames for some time before outputting them again.
Definition: frame_delayer_item.h:14