OniCAPI.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_C_API_H_
22 #define _ONI_C_API_H_
23 
24 #include "OniPlatform.h"
25 #include "OniCTypes.h"
26 #include "OniCProperties.h"
27 #include "OniVersion.h"
28 
29 /******************************************** General APIs */
30 
32 ONI_C_API OniStatus oniInitialize(int apiVersion);
34 ONI_C_API void oniShutdown();
35 
41 ONI_C_API OniStatus oniGetDeviceList(OniDeviceInfo** pDevices, int* pNumDevices);
44 
47 
49 ONI_C_API OniStatus oniWaitForAnyStream(OniStreamHandle* pStreams, int numStreams, int* pStreamIndex, int timeout);
50 
53 
56 
58 ONI_C_API const char* oniGetExtendedError();
59 
60 /******************************************** Device APIs */
61 
63 ONI_C_API OniStatus oniDeviceOpen(const char* uri, OniDeviceHandle* pDevice);
66 
69 
72 
75 
79 
81 ONI_C_API OniStatus oniDeviceSetProperty(OniDeviceHandle device, int propertyId, const void* data, int dataSize);
83 ONI_C_API OniStatus oniDeviceGetProperty(OniDeviceHandle device, int propertyId, void* data, int* pDataSize);
87 ONI_C_API OniStatus oniDeviceInvoke(OniDeviceHandle device, int commandId, void* data, int dataSize);
90 
92 
94 ONI_C_API OniStatus oniDeviceOpenEx(const char* uri, const char* mode, OniDeviceHandle* pDevice);
95 
96 /******************************************** Stream APIs */
97 
100 
103 
108 
111 
116 
118 ONI_C_API OniStatus oniStreamSetProperty(OniStreamHandle stream, int propertyId, const void* data, int dataSize);
120 ONI_C_API OniStatus oniStreamGetProperty(OniStreamHandle stream, int propertyId, void* data, int* pDataSize);
124 ONI_C_API OniStatus oniStreamInvoke(OniStreamHandle stream, int commandId, void* data, int dataSize);
129 
131 
132 ONI_C_API void oniFrameAddRef(OniFrame* pFrame);
134 ONI_C_API void oniFrameRelease(OniFrame* pFrame);
135 
136 // ONI_C_API OniStatus oniConvertRealWorldToProjective(OniStreamHandle stream, OniFloatPoint3D* pRealWorldPoint, OniFloatPoint3D* pProjectivePoint);
137 // ONI_C_API OniStatus oniConvertProjectiveToRealWorld(OniStreamHandle stream, OniFloatPoint3D* pProjectivePoint, OniFloatPoint3D* pRealWorldPoint);
138 
146 ONI_C_API OniStatus oniCreateRecorder(const char* fileName, OniRecorderHandle* pRecorder);
147 
159  OniRecorderHandle recorder,
160  OniStreamHandle stream,
161  OniBool allowLossyCompression);
162 
171 
179 
188 
189 ONI_C_API OniStatus oniCoordinateConverterDepthToWorld(OniStreamHandle depthStream, float depthX, float depthY, float depthZ, float* pWorldX, float* pWorldY, float* pWorldZ);
190 
191 ONI_C_API OniStatus oniCoordinateConverterWorldToDepth(OniStreamHandle depthStream, float worldX, float worldY, float worldZ, float* pDepthX, float* pDepthY, float* pDepthZ);
192 
193 ONI_C_API OniStatus oniCoordinateConverterDepthToColor(OniStreamHandle depthStream, OniStreamHandle colorStream, int depthX, int depthY, OniDepthPixel depthZ, int* pColorX, int* pColorY);
194 
195 /******************************************** Log APIs */
196 
205 ONI_C_API OniStatus oniSetLogOutputFolder(const char* strOutputFolder);
206 
216 ONI_C_API OniStatus oniGetLogFileName(char* strFileName, int nBufferSize);
217 
226 ONI_C_API OniStatus oniSetLogMinSeverity(int nMinSeverity);
227 
237 
247 
248 #if ONI_PLATFORM == ONI_PLATFORM_ANDROID_ARM
249 
257 ONI_C_API OniStatus oniSetLogAndroidOutput(OniBool bAndroidOutput);
258 #endif
259 #endif // _ONI_C_API_H_
ONI_C_API const char * oniGetExtendedError()
ONI_C_API OniStatus oniCoordinateConverterWorldToDepth(OniStreamHandle depthStream, float worldX, float worldY, float worldZ, float *pDepthX, float *pDepthY, float *pDepthZ)
ONI_C_API OniStatus oniDeviceGetInfo(OniDeviceHandle device, OniDeviceInfo *pInfo)
struct OniCallbackHandleImpl * OniCallbackHandle
Definition: OniCTypes.h:41
OniImageRegistrationMode
Definition: OniCEnums.h:72
ONI_C_API void oniStreamStop(OniStreamHandle stream)
ONI_C_API OniStatus oniRecorderStart(OniRecorderHandle recorder)
_OniDevice * OniDeviceHandle
Definition: OniCTypes.h:85
ONI_C_API OniStatus oniStreamReadFrame(OniStreamHandle stream, OniFrame **pFrame)
ONI_C_API const OniSensorInfo * oniStreamGetSensorInfo(OniStreamHandle stream)
ONI_C_API OniStatus oniDeviceOpen(const char *uri, OniDeviceHandle *pDevice)
ONI_C_API OniStatus oniDeviceOpenEx(const char *uri, const char *mode, OniDeviceHandle *pDevice)
void *(ONI_CALLBACK_TYPE * OniFrameAllocBufferCallback)(int size, void *pCookie)
Definition: OniCTypes.h:120
ONI_C_API OniStatus oniStreamGetProperty(OniStreamHandle stream, int propertyId, void *data, int *pDataSize)
ONI_C_API OniStatus oniDeviceCreateStream(OniDeviceHandle device, OniSensorType sensorType, OniStreamHandle *pStream)
ONI_C_API OniStatus oniDeviceInvoke(OniDeviceHandle device, int commandId, void *data, int dataSize)
ONI_C_API OniStatus oniStreamInvoke(OniStreamHandle stream, int commandId, void *data, int dataSize)
ONI_C_API OniStatus oniStreamRegisterNewFrameCallback(OniStreamHandle stream, OniNewFrameCallback handler, void *pCookie, OniCallbackHandle *pHandle)
ONI_C_API OniBool oniDeviceIsCommandSupported(OniDeviceHandle device, int commandId)
ONI_C_API OniBool oniDeviceGetDepthColorSyncEnabled(OniDeviceHandle device)
int OniBool
Definition: OniCTypes.h:28
ONI_C_API OniStatus oniDeviceEnableDepthColorSync(OniDeviceHandle device)
ONI_C_API OniStatus oniSetLogConsoleOutput(OniBool bConsoleOutput)
void(ONI_CALLBACK_TYPE * OniFrameFreeBufferCallback)(void *data, void *pCookie)
Definition: OniCTypes.h:121
ONI_C_API OniStatus oniDeviceGetProperty(OniDeviceHandle device, int propertyId, void *data, int *pDataSize)
_OniRecorder * OniRecorderHandle
Definition: OniCTypes.h:91
ONI_C_API OniStatus oniGetLogFileName(char *strFileName, int nBufferSize)
ONI_C_API OniStatus oniStreamStart(OniStreamHandle stream)
ONI_C_API void oniShutdown()
ONI_C_API OniStatus oniCreateRecorder(const char *fileName, OniRecorderHandle *pRecorder)
ONI_C_API OniStatus oniDeviceClose(OniDeviceHandle device)
ONI_C_API void oniUnregisterDeviceCallbacks(OniCallbackHandle handle)
ONI_C_API OniStatus oniStreamSetProperty(OniStreamHandle stream, int propertyId, const void *data, int dataSize)
ONI_C_API void oniStreamDestroy(OniStreamHandle stream)
#define ONI_C_API
Definition: OniPlatform.h:67
ONI_C_API OniBool oniStreamIsPropertySupported(OniStreamHandle stream, int propertyId)
ONI_C_API OniBool oniDeviceIsPropertySupported(OniDeviceHandle device, int propertyId)
ONI_C_API OniVersion oniGetVersion()
OniSensorType
Definition: OniCEnums.h:38
ONI_C_API OniStatus oniDeviceSetProperty(OniDeviceHandle device, int propertyId, const void *data, int dataSize)
ONI_C_API void oniStreamUnregisterNewFrameCallback(OniStreamHandle stream, OniCallbackHandle handle)
ONI_C_API OniStatus oniReleaseDeviceList(OniDeviceInfo *pDevices)
ONI_C_API OniStatus oniRecorderAttachStream(OniRecorderHandle recorder, OniStreamHandle stream, OniBool allowLossyCompression)
ONI_C_API OniStatus oniCoordinateConverterDepthToWorld(OniStreamHandle depthStream, float depthX, float depthY, float depthZ, float *pWorldX, float *pWorldY, float *pWorldZ)
MyFreenectDevice * device
ONI_C_API OniBool oniStreamIsCommandSupported(OniStreamHandle stream, int commandId)
ONI_C_API const OniSensorInfo * oniDeviceGetSensorInfo(OniDeviceHandle device, OniSensorType sensorType)
ONI_C_API OniBool oniDeviceIsImageRegistrationModeSupported(OniDeviceHandle device, OniImageRegistrationMode mode)
ONI_C_API OniStatus oniRegisterDeviceCallbacks(OniDeviceCallbacks *pCallbacks, void *pCookie, OniCallbackHandle *pHandle)
ONI_C_API OniStatus oniInitialize(int apiVersion)
ONI_C_API void oniRecorderStop(OniRecorderHandle recorder)
void(ONI_CALLBACK_TYPE * OniNewFrameCallback)(OniStreamHandle stream, void *pCookie)
Definition: OniCTypes.h:115
ONI_C_API OniStatus oniGetDeviceList(OniDeviceInfo **pDevices, int *pNumDevices)
ONI_C_API OniStatus oniRecorderDestroy(OniRecorderHandle *pRecorder)
ONI_C_API OniStatus oniSetLogOutputFolder(const char *strOutputFolder)
uint16_t OniDepthPixel
Definition: OniCTypes.h:143
ONI_C_API void oniFrameAddRef(OniFrame *pFrame)
ONI_C_API OniStatus oniWaitForAnyStream(OniStreamHandle *pStreams, int numStreams, int *pStreamIndex, int timeout)
OniPixelFormat
Definition: OniCEnums.h:47
ONI_C_API OniStatus oniStreamSetFrameBuffersAllocator(OniStreamHandle stream, OniFrameAllocBufferCallback alloc, OniFrameFreeBufferCallback free, void *pCookie)
_OniStream * OniStreamHandle
Definition: OniCTypes.h:88
ONI_C_API OniStatus oniCoordinateConverterDepthToColor(OniStreamHandle depthStream, OniStreamHandle colorStream, int depthX, int depthY, OniDepthPixel depthZ, int *pColorX, int *pColorY)
OniStatus
Definition: OniCEnums.h:25
def handler(signum, frame)
ONI_C_API int oniFormatBytesPerPixel(OniPixelFormat format)
void * pCookie
Definition: OniDriverAPI.h:35
ONI_C_API OniStatus oniSetLogFileOutput(OniBool bFileOutput)
ONI_C_API OniStatus oniSetLogMinSeverity(int nMinSeverity)
ONI_C_API void oniDeviceDisableDepthColorSync(OniDeviceHandle device)
ONI_C_API void oniFrameRelease(OniFrame *pFrame)


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