diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-03-14 15:52:30 -0700 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-03-14 15:52:30 -0700 |
commit | 9a607474bdd66dd716635cfed7f2c832c39b4523 (patch) | |
tree | c5f65b4cecd6376a3b99646679f9714d5f9213a2 /include/qhy/Context.h | |
parent | ac7604616ab2e44ad12a9d8d5dd90dec15feb5cc (diff) |
add qhy headers.........
Diffstat (limited to 'include/qhy/Context.h')
-rw-r--r-- | include/qhy/Context.h | 57 |
1 files changed, 57 insertions, 0 deletions
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);
|