-
Notifications
You must be signed in to change notification settings - Fork 0
/
MMMALAutofocus.h
73 lines (62 loc) · 2.19 KB
/
MMMALAutofocus.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* MMMALAutoFocus.h
*
* Created on: Jul 12, 2013
* Author: Ji-Yu
*/
#ifndef MMMALAUTOFOCUS_H_
#define MMMALAUTOFOCUS_H_
#include "MMDevice.h"
#include "MMDeviceConstants.h"
#include "DeviceBase.h"
#include "MMMALHub.h"
namespace MMMAL
{
class MMMALAutofocus : public CAutoFocusBase<MMMALAutofocus>
{
public:
static const char * const DeviceName_;
static const char * const Description_;
static const char * const Keyword_AFSearchRange_;
static const char * const Keyword_AFOffset_;
static const char * const Keyword_AFStatus_;
static const char * const Keyword_ContinuousFocus_;
static const char * const Keyword_AberlensPostion_;
static const char * const Keyword_AFNearLimit_;
static const char * const Keyword_AFFarLimit_;
static const char * const Keyword_OffsetOrigin_;
static const char * const Keyword_OffsetDistance_;
static const char * const Keyword_AutoMovement_;
MMMALAutofocus();
~MMMALAutofocus();
//API
bool Busy();
void GetName(char *pszName) const;
int Initialize();
int Shutdown();
// AutoFocus API
virtual int SetContinuousFocusing(bool state);
virtual int GetContinuousFocusing(bool& state);
virtual bool IsContinuousFocusLocked();
virtual int FullFocus();
virtual int IncrementalFocus();
virtual int GetLastFocusScore(double& score);
virtual int GetCurrentFocusScore(double& score);
virtual int AutoSetParameters();
virtual int GetOffset(double &offset);
virtual int SetOffset(double offset);
virtual int AFStatusChanged();
virtual int AFOffsetChanged();
protected:
int OnContinuousFocus(MM::PropertyBase* pProp, MM::ActionType eAct);
int OnAutoFocusOffset(MM::PropertyBase* pProp, MM::ActionType eAct);
int OnAutoFocusSearchRange(MM::PropertyBase* pProp, MM::ActionType eAct);
int OnAutoFocusStatus(MM::PropertyBase* pProp, MM::ActionType eAct);
private:
bool initialized_;
MMMALHub* hub_;
bool continuousFocusing_;
void GetStatusString(char * buf);
};
}
#endif /* MMMALAUTOFOCUS_H_ */