Revision 130
| trunk/tbeta/Windows/addons/ofxPS3/src/IPS3EyeLib.h (revision 130) | ||
|---|---|---|
| 59 | 59 |
#define PS3EYELIB_EXPORT __declspec(dllimport) |
| 60 | 60 |
#endif |
| 61 | 61 |
|
| 62 |
#ifndef PURE |
|
| 63 |
#define PURE = 0 |
|
| 64 |
#endif |
|
| 65 |
|
|
| 62 | 66 |
typedef enum |
| 63 | 67 |
{
|
| 64 | 68 |
R320x240, |
| ... | ... | |
| 87 | 91 |
static GUID PS3EyeLibGUID(); |
| 88 | 92 |
|
| 89 | 93 |
// camera format |
| 90 |
virtual void SetFormat(int formatIdx); |
|
| 91 |
virtual UINT GetWidth(); |
|
| 92 |
virtual UINT GetHeight(); |
|
| 93 |
virtual PS3EYE_RESOLUTION GetRes(); |
|
| 94 |
virtual DWORD GetRate(); |
|
| 95 |
|
|
| 94 |
virtual void SetFormat(int formatIdx) PURE; |
|
| 95 |
virtual UINT GetWidth() PURE; |
|
| 96 |
virtual UINT GetHeight() PURE; |
|
| 97 |
virtual PS3EYE_RESOLUTION GetRes() PURE; |
|
| 98 |
virtual DWORD GetRate() PURE; |
|
| 99 |
|
|
| 96 | 100 |
// supported formats |
| 97 | 101 |
static PS3EYE_FORMAT *GetFormats(); |
| 98 | 102 |
static int GetNumFormats(); |
| ... | ... | |
| 100 | 104 |
static int GetFormatIndex(int width, int height, int rate); |
| 101 | 105 |
|
| 102 | 106 |
// capture control |
| 103 |
virtual void StartCapture(); |
|
| 107 |
virtual void StartCapture() PURE; |
|
| 108 |
bool GetFrameRAW(PBYTE *pBuf, bool wait); |
|
| 104 | 109 |
bool GetFrame(PBYTE buf, int bitsPerPixel, bool flip, bool wait=true); |
| 105 |
virtual void StopCapture(); |
|
| 106 |
virtual bool IsCapturing(); |
|
| 110 |
virtual void StopCapture() PURE; |
|
| 111 |
virtual bool IsCapturing() PURE; |
|
| 107 | 112 |
|
| 108 | 113 |
// camera hardware |
| 109 |
virtual void DumpEEPROM(LPCTSTR filename); |
|
| 110 |
virtual void DumpRAM(LPCTSTR filename); |
|
| 111 |
virtual void LED(bool on); |
|
| 114 |
virtual void DumpEEPROM(LPCTSTR filename) PURE; |
|
| 115 |
virtual void DumpRAM(LPCTSTR filename) PURE; |
|
| 116 |
virtual void LED(bool on) PURE; |
|
| 112 | 117 |
|
| 113 | 118 |
// camera version |
| 114 |
virtual LPCTSTR GetCameraVersion(); |
|
| 119 |
virtual LPCTSTR GetCameraVersion() PURE; |
|
| 115 | 120 |
|
| 116 | 121 |
// camera video control |
| 117 | 122 |
// these settings are effective while camera |
| 118 | 123 |
// is capturing video frames |
| 119 | 124 |
// the settings persist even between capture sessions |
| 120 |
virtual bool IsAutoAGC(); |
|
| 121 |
virtual void AutoAGC(bool enable); |
|
| 125 |
virtual bool IsAutoAGC() PURE; |
|
| 126 |
virtual void AutoAGC(bool enable) PURE; |
|
| 122 | 127 |
// Gain value [0..79] |
| 123 |
virtual int GetGain(); |
|
| 124 |
virtual void SetGain(int value); |
|
| 128 |
virtual int GetGain() PURE; |
|
| 129 |
virtual void SetGain(int value) PURE; |
|
| 125 | 130 |
|
| 126 |
virtual bool IsAutoAEC(); |
|
| 127 |
virtual void AutoAEC(bool enable); |
|
| 128 |
// Exposure value [0..255] |
|
| 129 |
virtual int GetExposure(); |
|
| 130 |
virtual void SetExposure(int value); |
|
| 131 |
virtual bool IsAutoAEC() PURE; |
|
| 132 |
virtual void AutoAEC(bool enable) PURE; |
|
| 133 |
// Exposure value [0..511] |
|
| 134 |
virtual int GetExposure() PURE; |
|
| 135 |
virtual void SetExposure(int value) PURE; |
|
| 131 | 136 |
|
| 132 |
virtual bool IsAutoAWB(); |
|
| 133 |
virtual void AutoAWB(bool enable); |
|
| 134 |
virtual void GetWhiteBalance(BYTE *r, BYTE *g, BYTE *b); |
|
| 135 |
virtual void SetWhiteBalance(BYTE r, BYTE g, BYTE b); |
|
| 137 |
virtual bool IsAutoAWB() PURE; |
|
| 138 |
virtual void AutoAWB(bool enable) PURE; |
|
| 139 |
virtual void GetWhiteBalance(BYTE *r, BYTE *g, BYTE *b) PURE; |
|
| 140 |
virtual void SetWhiteBalance(BYTE r, BYTE g, BYTE b) PURE; |
|
| 136 | 141 |
|
| 137 |
virtual bool IsColorBar(); |
|
| 138 |
virtual void ColorBar(bool enable); |
|
| 142 |
virtual bool IsColorBar() PURE; |
|
| 143 |
virtual void ColorBar(bool enable) PURE; |
|
| 139 | 144 |
}; |
Also available in: Unified diff
