36 lines
836 B
C++
Executable File
36 lines
836 B
C++
Executable File
#ifndef CAMERA_HELPER_H
|
|
#define CAMERA_HELPER_H
|
|
|
|
|
|
typedef int (*PFuccamera_init)();
|
|
typedef int (*PFuccamera_start)(int epx_time);
|
|
typedef int (*PFuccamera_stop)();
|
|
typedef int (*PFuccamera_cap)(void** data, int& w, int& h, int time_out);
|
|
|
|
#define CAMERA_BASE 4000
|
|
#define CAMERA_DLL_INIT_ERROR 1 - CAMERA_BASE
|
|
|
|
class CCameraHelper
|
|
{
|
|
public:
|
|
static CCameraHelper* Get();
|
|
static CCameraHelper* m_instance;
|
|
public:
|
|
CCameraHelper();
|
|
~CCameraHelper();
|
|
public:
|
|
PFuccamera_init pfuccamera_init = nullptr;
|
|
PFuccamera_start pfuccamera_start = nullptr;
|
|
PFuccamera_stop pfuccamera_stop = nullptr;
|
|
PFuccamera_cap pfuccamera_cap = nullptr;
|
|
public:
|
|
int Init();
|
|
int Start(int epx_time = 12 * 10000);
|
|
int Stop();
|
|
int Cap(void**, int& w, int& h, int timeout);
|
|
int GetState() { return 0; };
|
|
};
|
|
|
|
|
|
|
|
#endif |