MaxstARSDK
CameraDevice.h
Go to the documentation of this file.
1 /*==============================================================================
2 Copyright 2017 Maxst, Inc. All Rights Reserved.
3 ==============================================================================*/
4 
5 
6 #pragma once
7 
8 #include "Types.h"
9 #include <string>
10 #include <list>
11 
12 namespace maxstAR
13 {
18  {
19  public:
23  enum FocusMode
24  {
25  // Continuous focus mode. This focus mode is proper for AR
26  FOCUS_MODE_CONTINUOUS_AUTO = 1,
27 
28  // Single auto focus mode
29  FOCUS_MODE_AUTO = 2
30  };
31 
36  {
37  // Flip video horizontally
38  HORIZONTAL = 0,
39 
40  // Flip video vertically
41  VERTICAL = 1
42  };
43 
47  static CameraDevice * getInstance();
48 
50  virtual ~CameraDevice() {}
51 
60  virtual ResultCode start(int cameraId, int width, int height) = 0;
61 
65  virtual void stop() = 0;
66 
70  virtual int getWidth() = 0;
71 
75  virtual int getHeight() = 0;
76 
80  virtual bool setFocusMode(FocusMode mode) = 0;
81 
85  virtual bool setFlashLightMode(bool toggle) = 0;
86 
90  virtual bool setAutoWhiteBalanceLock(bool toggle) = 0;
91 
97  virtual void flipVideo(CameraDevice::FlipDirection direction, bool toggle) = 0;
98 
99 
104  virtual std::list<std::string> getParamList() = 0;
105 
112  virtual bool setParam(std::string key, bool toggle) = 0;
113 
120  virtual bool setParam(std::string key, int value) = 0;
121 
129  virtual bool setParam(std::string key, int min, int max) = 0;
130 
137  virtual bool setParam(std::string key, std::string value) = 0;
138 
147  virtual void setNewFrame(Byte * data, int length, int width, int height, ColorFormat format) = 0;
148 
153  virtual float * getProjectionMatrix() = 0;
154 
159  virtual const float * getBackgroundPlaneProjectionMatrix() = 0;
160  };
161 }
virtual ~CameraDevice()
Definition: CameraDevice.h:50
ColorFormat
Image Color format. RGB888 : YUV420sp : YUV420 : YUV420_888 : GRAY8 :
Definition: Types.h:24
CameraDevice()
Definition: CameraDevice.h:49
Definition: BackgroundRenderer.h:11
ResultCode
Definition: Types.h:54
unsigned char Byte
Definition: Types.h:14
FlipDirection
Video data flip direction.
Definition: CameraDevice.h:35
class for camera device handling
Definition: CameraDevice.h:17
FocusMode
Camera focus mode.
Definition: CameraDevice.h:23
#define MAXSTAR_API
Definition: Types.h:11