From fa1bb24f1f8aaf8e598a3bc53d90922e445fe59a Mon Sep 17 00:00:00 2001 From: iximeow Date: Thu, 14 Mar 2019 15:52:30 -0700 Subject: add qhy headers......... --- include/qhy/Context.h | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 include/qhy/Context.h (limited to 'include/qhy/Context.h') diff --git a/include/qhy/Context.h b/include/qhy/Context.h new file mode 100644 index 0000000..ab2c490 --- /dev/null +++ b/include/qhy/Context.h @@ -0,0 +1,57 @@ +#pragma once + +#define QCAM_RAWDATACACHESIZE (75000000) +#define QCAM_FRAMECACHESIZE 1 +#define QCAM_MAXCORECOUNT 16 + +class Mutex +{ +private: + CRITICAL_SECTION cs; + +public: + Mutex() + { + ::InitializeCriticalSection(&this->cs); + } + + ~Mutex() + { + ::DeleteCriticalSection(&this->cs); + } + + void Lock() + { + ::EnterCriticalSection(&this->cs); + } + + void Unlock() + { + ::LeaveCriticalSection(&this->cs); + } +}; + +class CamContext +{ +public: + unsigned char ioType; + HANDLE hCam; + int camType; + int resX, resY; + int frameLen; + unsigned char depth; + + BOOL live; + unsigned char *rawDataCache; + HANDLE hIoThread; + BOOL raw; + + CamContext() + { + this->hCam = INVALID_HANDLE_VALUE; + } + +}; + +void InitContext(int framesize,CCyUSBDevice* pDev); +CamContext* GetContext(HANDLE hCam); -- cgit v1.1