OniCTypes.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 2.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef _ONI_TYPES_H_
22 #define _ONI_TYPES_H_
23 
24 #include "OniPlatform.h"
25 #include "OniCEnums.h"
26 
28 typedef int OniBool;
29 
30 #ifndef TRUE
31 #define TRUE 1
32 #endif //TRUE
33 #ifndef FALSE
34 #define FALSE 0
35 #endif //FALSE
36 
37 #define ONI_MAX_STR 256
38 #define ONI_MAX_SENSORS 10
39 
40 struct OniCallbackHandleImpl;
41 typedef struct OniCallbackHandleImpl* OniCallbackHandle;
42 
44 typedef struct
45 {
47  int major;
49  int minor;
53  int build;
54 } OniVersion;
55 
56 typedef int OniHardwareVersion;
57 
59 typedef struct
60 {
64  int fps;
65 } OniVideoMode;
66 
68 typedef struct
69 {
74 
76 typedef struct
77 {
78  char uri[ONI_MAX_STR];
79  char vendor[ONI_MAX_STR];
84 
85 struct _OniDevice;
86 typedef _OniDevice* OniDeviceHandle;
87 
88 struct _OniStream;
89 typedef _OniStream* OniStreamHandle;
90 
91 struct _OniRecorder;
92 typedef _OniRecorder* OniRecorderHandle;
93 
95 typedef struct
96 {
97  int dataSize;
98  void* data;
99 
103 
104  int width;
105  int height;
106 
111 
112  int stride;
113 } OniFrame;
114 
119 
120 typedef void* (ONI_CALLBACK_TYPE* OniFrameAllocBufferCallback)(int size, void* pCookie);
122 
123 typedef struct
124 {
129 
130 typedef struct
131 {
132  int enabled;
133  int originX;
134  int originY;
135  int width;
136  int height;
137 } OniCropping;
138 
139 // Pixel types
144 
149 
154 
155 #pragma pack (push, 1)
156 
158 typedef struct
159 {
160  /* Red value of this pixel. */
162  /* Green value of this pixel. */
164  /* Blue value of this pixel. */
167 
173 typedef struct
174 {
184 
185 #pragma pack (pop)
186 
187 typedef struct
188 {
191 } OniSeek;
192 
193 #endif // _ONI_TYPES_H_
struct OniCallbackHandleImpl * OniCallbackHandle
Definition: OniCTypes.h:41
_OniDevice * OniDeviceHandle
Definition: OniCTypes.h:85
void(ONI_CALLBACK_TYPE * OniDeviceInfoCallback)(const OniDeviceInfo *pInfo, void *pCookie)
Definition: OniCTypes.h:117
int dataSize
Definition: OniCTypes.h:97
int numSupportedVideoModes
Definition: OniCTypes.h:71
void *(ONI_CALLBACK_TYPE * OniFrameAllocBufferCallback)(int size, void *pCookie)
Definition: OniCTypes.h:120
uint8_t OniGrayscale8Pixel
Definition: OniCTypes.h:153
uint16_t OniGrayscale16Pixel
Definition: OniCTypes.h:148
unsigned short uint16_t
int resolutionY
Definition: OniCTypes.h:63
int stride
Definition: OniCTypes.h:112
uint16_t usbVendorId
Definition: OniCTypes.h:81
int OniBool
Definition: OniCTypes.h:28
unsigned __int64 uint64_t
int height
Definition: OniCTypes.h:105
OniDeviceState
Definition: OniCEnums.h:64
uint64_t timestamp
Definition: OniCTypes.h:101
void(ONI_CALLBACK_TYPE * OniFrameFreeBufferCallback)(void *data, void *pCookie)
Definition: OniCTypes.h:121
_OniRecorder * OniRecorderHandle
Definition: OniCTypes.h:91
OniStreamHandle stream
Definition: OniCTypes.h:190
int cropOriginX
Definition: OniCTypes.h:109
int frameIndex
Definition: OniCTypes.h:189
OniDeviceInfoCallback deviceConnected
Definition: OniCTypes.h:125
unsigned char uint8_t
int frameIndex
Definition: OniCTypes.h:102
uint16_t usbProductId
Definition: OniCTypes.h:82
int minor
Definition: OniCTypes.h:49
OniVideoMode * pSupportedVideoModes
Definition: OniCTypes.h:72
OniSensorType
Definition: OniCEnums.h:38
int maintenance
Definition: OniCTypes.h:51
void(ONI_CALLBACK_TYPE * OniDeviceStateCallback)(const OniDeviceInfo *pInfo, OniDeviceState deviceState, void *pCookie)
Definition: OniCTypes.h:118
OniDeviceStateCallback deviceStateChanged
Definition: OniCTypes.h:127
OniSensorType sensorType
Definition: OniCTypes.h:70
OniBool croppingEnabled
Definition: OniCTypes.h:108
int cropOriginY
Definition: OniCTypes.h:110
OniVideoMode videoMode
Definition: OniCTypes.h:107
OniSensorType sensorType
Definition: OniCTypes.h:100
int build
Definition: OniCTypes.h:53
void * data
Definition: OniCTypes.h:98
int resolutionX
Definition: OniCTypes.h:62
OniPixelFormat pixelFormat
Definition: OniCTypes.h:61
void(ONI_CALLBACK_TYPE * OniNewFrameCallback)(OniStreamHandle stream, void *pCookie)
Definition: OniCTypes.h:115
typedef void(ONI_CALLBACK_TYPE *DeviceConnectedCallback)(const OniDeviceInfo *
#define ONI_MAX_STR
Definition: OniCTypes.h:37
int width
Definition: OniCTypes.h:104
int OniHardwareVersion
Definition: OniCTypes.h:56
#define ONI_CALLBACK_TYPE
OniDeviceInfoCallback deviceDisconnected
Definition: OniCTypes.h:126
void(ONI_CALLBACK_TYPE * OniGeneralCallback)(void *pCookie)
Definition: OniCTypes.h:116
uint16_t OniDepthPixel
Definition: OniCTypes.h:143
OniPixelFormat
Definition: OniCEnums.h:47
int major
Definition: OniCTypes.h:47
_OniStream * OniStreamHandle
Definition: OniCTypes.h:88
void * pCookie
Definition: OniDriverAPI.h:35


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38