-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptic.hpp
48 lines (31 loc) · 1.01 KB
/
Optic.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreorder"
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#include "camera.h"
#include "camera_parameters.h"
#pragma GCC diagnostic pop
#include "Debug.hpp"
#ifndef SDFLIGHT_CAMERAS_OPTIC_HPP
#define SDFLIGHT_CAMERAS_OPTIC_HPP
class Optic : private camera::ICameraListener
{
public:
Optic(bool postProc = false, bool print = true);
~Optic();
int activate();
void deactivate();
private:
// Interface functions
virtual void onError();
virtual void onControl(const camera::ControlEvent& control);
virtual void onPreviewFrame(camera::ICameraFrame *frame);
virtual void onVideoFrame(camera::ICameraFrame *frame);
virtual void onPictureFrame(camera::ICameraFrame *frame);
virtual void onMetadataFrame(camera::ICameraFrame *frame);
// Member variables
bool m_print;
camera::ICameraDevice* m_cameraPtr;
camera::CameraParams m_params;
pthread_mutex_t m_cameraFrameLock;
}; // class Optic
#endif // SDFLIGHT_CAMERAS_OPTIC_HPP