Functions
OniCAPI.h File Reference
#include "OniPlatform.h"
#include "OniCTypes.h"
#include "OniCProperties.h"
#include "OniVersion.h"
Include dependency graph for OniCAPI.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ONI_C_API OniStatus oniCoordinateConverterDepthToColor (OniStreamHandle depthStream, OniStreamHandle colorStream, int depthX, int depthY, OniDepthPixel depthZ, int *pColorX, int *pColorY)
 
ONI_C_API OniStatus oniCoordinateConverterDepthToWorld (OniStreamHandle depthStream, float depthX, float depthY, float depthZ, float *pWorldX, float *pWorldY, float *pWorldZ)
 
ONI_C_API OniStatus oniCoordinateConverterWorldToDepth (OniStreamHandle depthStream, float worldX, float worldY, float worldZ, float *pDepthX, float *pDepthY, float *pDepthZ)
 
ONI_C_API OniStatus oniCreateRecorder (const char *fileName, OniRecorderHandle *pRecorder)
 
ONI_C_API OniStatus oniDeviceClose (OniDeviceHandle device)
 
ONI_C_API OniStatus oniDeviceCreateStream (OniDeviceHandle device, OniSensorType sensorType, OniStreamHandle *pStream)
 
ONI_C_API void oniDeviceDisableDepthColorSync (OniDeviceHandle device)
 
ONI_C_API OniStatus oniDeviceEnableDepthColorSync (OniDeviceHandle device)
 
ONI_C_API OniBool oniDeviceGetDepthColorSyncEnabled (OniDeviceHandle device)
 
ONI_C_API OniStatus oniDeviceGetInfo (OniDeviceHandle device, OniDeviceInfo *pInfo)
 
ONI_C_API OniStatus oniDeviceGetProperty (OniDeviceHandle device, int propertyId, void *data, int *pDataSize)
 
ONI_C_API const OniSensorInfooniDeviceGetSensorInfo (OniDeviceHandle device, OniSensorType sensorType)
 
ONI_C_API OniStatus oniDeviceInvoke (OniDeviceHandle device, int commandId, void *data, int dataSize)
 
ONI_C_API OniBool oniDeviceIsCommandSupported (OniDeviceHandle device, int commandId)
 
ONI_C_API OniBool oniDeviceIsImageRegistrationModeSupported (OniDeviceHandle device, OniImageRegistrationMode mode)
 
ONI_C_API OniBool oniDeviceIsPropertySupported (OniDeviceHandle device, int propertyId)
 
ONI_C_API OniStatus oniDeviceOpen (const char *uri, OniDeviceHandle *pDevice)
 
ONI_C_API OniStatus oniDeviceOpenEx (const char *uri, const char *mode, OniDeviceHandle *pDevice)
 
ONI_C_API OniStatus oniDeviceSetProperty (OniDeviceHandle device, int propertyId, const void *data, int dataSize)
 
ONI_C_API int oniFormatBytesPerPixel (OniPixelFormat format)
 
ONI_C_API void oniFrameAddRef (OniFrame *pFrame)
 
ONI_C_API void oniFrameRelease (OniFrame *pFrame)
 
ONI_C_API OniStatus oniGetDeviceList (OniDeviceInfo **pDevices, int *pNumDevices)
 
ONI_C_API const char * oniGetExtendedError ()
 
ONI_C_API OniStatus oniGetLogFileName (char *strFileName, int nBufferSize)
 
ONI_C_API OniVersion oniGetVersion ()
 
ONI_C_API OniStatus oniInitialize (int apiVersion)
 
ONI_C_API OniStatus oniRecorderAttachStream (OniRecorderHandle recorder, OniStreamHandle stream, OniBool allowLossyCompression)
 
ONI_C_API OniStatus oniRecorderDestroy (OniRecorderHandle *pRecorder)
 
ONI_C_API OniStatus oniRecorderStart (OniRecorderHandle recorder)
 
ONI_C_API void oniRecorderStop (OniRecorderHandle recorder)
 
ONI_C_API OniStatus oniRegisterDeviceCallbacks (OniDeviceCallbacks *pCallbacks, void *pCookie, OniCallbackHandle *pHandle)
 
ONI_C_API OniStatus oniReleaseDeviceList (OniDeviceInfo *pDevices)
 
ONI_C_API OniStatus oniSetLogConsoleOutput (OniBool bConsoleOutput)
 
ONI_C_API OniStatus oniSetLogFileOutput (OniBool bFileOutput)
 
ONI_C_API OniStatus oniSetLogMinSeverity (int nMinSeverity)
 
ONI_C_API OniStatus oniSetLogOutputFolder (const char *strOutputFolder)
 
ONI_C_API void oniShutdown ()
 
ONI_C_API void oniStreamDestroy (OniStreamHandle stream)
 
ONI_C_API OniStatus oniStreamGetProperty (OniStreamHandle stream, int propertyId, void *data, int *pDataSize)
 
ONI_C_API const OniSensorInfooniStreamGetSensorInfo (OniStreamHandle stream)
 
ONI_C_API OniStatus oniStreamInvoke (OniStreamHandle stream, int commandId, void *data, int dataSize)
 
ONI_C_API OniBool oniStreamIsCommandSupported (OniStreamHandle stream, int commandId)
 
ONI_C_API OniBool oniStreamIsPropertySupported (OniStreamHandle stream, int propertyId)
 
ONI_C_API OniStatus oniStreamReadFrame (OniStreamHandle stream, OniFrame **pFrame)
 
ONI_C_API OniStatus oniStreamRegisterNewFrameCallback (OniStreamHandle stream, OniNewFrameCallback handler, void *pCookie, OniCallbackHandle *pHandle)
 
ONI_C_API OniStatus oniStreamSetFrameBuffersAllocator (OniStreamHandle stream, OniFrameAllocBufferCallback alloc, OniFrameFreeBufferCallback free, void *pCookie)
 
ONI_C_API OniStatus oniStreamSetProperty (OniStreamHandle stream, int propertyId, const void *data, int dataSize)
 
ONI_C_API OniStatus oniStreamStart (OniStreamHandle stream)
 
ONI_C_API void oniStreamStop (OniStreamHandle stream)
 
ONI_C_API void oniStreamUnregisterNewFrameCallback (OniStreamHandle stream, OniCallbackHandle handle)
 
ONI_C_API void oniUnregisterDeviceCallbacks (OniCallbackHandle handle)
 
ONI_C_API OniStatus oniWaitForAnyStream (OniStreamHandle *pStreams, int numStreams, int *pStreamIndex, int timeout)
 

Function Documentation

ONI_C_API OniStatus oniCoordinateConverterDepthToColor ( OniStreamHandle  depthStream,
OniStreamHandle  colorStream,
int  depthX,
int  depthY,
OniDepthPixel  depthZ,
int *  pColorX,
int *  pColorY 
)
ONI_C_API OniStatus oniCoordinateConverterDepthToWorld ( OniStreamHandle  depthStream,
float  depthX,
float  depthY,
float  depthZ,
float *  pWorldX,
float *  pWorldY,
float *  pWorldZ 
)
ONI_C_API OniStatus oniCoordinateConverterWorldToDepth ( OniStreamHandle  depthStream,
float  worldX,
float  worldY,
float  worldZ,
float *  pDepthX,
float *  pDepthY,
float *  pDepthZ 
)
ONI_C_API OniStatus oniCreateRecorder ( const char *  fileName,
OniRecorderHandle pRecorder 
)

Creates a recorder that records to a file.

Parameters
[in]fileNameThe name of the file that will contain the recording.
[out]pRecorderPoints to the handle to the newly created recorder.
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniDeviceClose ( OniDeviceHandle  device)

Close a device

ONI_C_API OniStatus oniDeviceCreateStream ( OniDeviceHandle  device,
OniSensorType  sensorType,
OniStreamHandle pStream 
)

Create a new stream in the device. The stream will originate from the source.

ONI_C_API void oniDeviceDisableDepthColorSync ( OniDeviceHandle  device)
ONI_C_API OniStatus oniDeviceEnableDepthColorSync ( OniDeviceHandle  device)
ONI_C_API OniBool oniDeviceGetDepthColorSyncEnabled ( OniDeviceHandle  device)
ONI_C_API OniStatus oniDeviceGetInfo ( OniDeviceHandle  device,
OniDeviceInfo pInfo 
)

Get the OniDeviceInfo of a certain device.

ONI_C_API OniStatus oniDeviceGetProperty ( OniDeviceHandle  device,
int  propertyId,
void *  data,
int *  pDataSize 
)

Get property in the device. Use the properties listed in OniTypes.h: ONI_DEVICE_PROPERTY_..., or specific ones supplied by the device.

ONI_C_API const OniSensorInfo* oniDeviceGetSensorInfo ( OniDeviceHandle  device,
OniSensorType  sensorType 
)

Get the possible configurations available for a specific source, or NULL if the source does not exist.

ONI_C_API OniStatus oniDeviceInvoke ( OniDeviceHandle  device,
int  commandId,
void *  data,
int  dataSize 
)

Invoke an internal functionality of the device.

ONI_C_API OniBool oniDeviceIsCommandSupported ( OniDeviceHandle  device,
int  commandId 
)

Check if a command is supported, for invoke

ONI_C_API OniBool oniDeviceIsImageRegistrationModeSupported ( OniDeviceHandle  device,
OniImageRegistrationMode  mode 
)
ONI_C_API OniBool oniDeviceIsPropertySupported ( OniDeviceHandle  device,
int  propertyId 
)

Check if the property is supported by the device. Use the properties listed in OniTypes.h: ONI_DEVICE_PROPERTY_..., or specific ones supplied by the device.

ONI_C_API OniStatus oniDeviceOpen ( const char *  uri,
OniDeviceHandle pDevice 
)

Open a device. Uri can be taken from the matching OniDeviceInfo.

ONI_C_API OniStatus oniDeviceOpenEx ( const char *  uri,
const char *  mode,
OniDeviceHandle pDevice 
)
ONI_C_API OniStatus oniDeviceSetProperty ( OniDeviceHandle  device,
int  propertyId,
const void *  data,
int  dataSize 
)

Set property in the device. Use the properties listed in OniTypes.h: ONI_DEVICE_PROPERTY_..., or specific ones supplied by the device.

ONI_C_API int oniFormatBytesPerPixel ( OniPixelFormat  format)

Translate from format to number of bytes per pixel. Will return 0 for formats in which the number of bytes per pixel isn't fixed.

ONI_C_API void oniFrameAddRef ( OniFrame pFrame)

Mark another user of the frame.

ONI_C_API void oniFrameRelease ( OniFrame pFrame)

Mark that the frame is no longer needed.

ONI_C_API OniStatus oniGetDeviceList ( OniDeviceInfo **  pDevices,
int *  pNumDevices 
)

Get the list of currently connected device. Each device is represented by its OniDeviceInfo. pDevices will be allocated inside.

ONI_C_API const char* oniGetExtendedError ( )

Get internal error

ONI_C_API OniStatus oniGetLogFileName ( char *  strFileName,
int  nBufferSize 
)

Get the current log file name

Parameters
char* strFileName [out] hold the returned file name
intnBufferSize [in] size of strFileName
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniVersion oniGetVersion ( )

Get the current version of OpenNI2

ONI_C_API OniStatus oniInitialize ( int  apiVersion)

Initialize OpenNI2. Use ONI_API_VERSION as the version.

ONI_C_API OniStatus oniRecorderAttachStream ( OniRecorderHandle  recorder,
OniStreamHandle  stream,
OniBool  allowLossyCompression 
)

Attaches a stream to a recorder. The amount of attached streams is virtually infinite. You cannot attach a stream after you have started a recording, if you do: an error will be returned by oniRecorderAttachStream.

Parameters
[in]recorderThe handle to the recorder.
[in]streamThe handle to the stream.
[in]allowLossyCompressionAllows/denies lossy compression
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniRecorderDestroy ( OniRecorderHandle pRecorder)

Stops recording if needed, and destroys a recorder.

Parameters
[in,out]recorderThe handle to the recorder, the handle will be invalidated (nullified) when the function returns.
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniRecorderStart ( OniRecorderHandle  recorder)

Starts recording. There must be at least one stream attached to the recorder, if not: oniRecorderStart will return an error.

Parameters
[in]recorderThe handle to the recorder.
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API void oniRecorderStop ( OniRecorderHandle  recorder)

Stops recording. You can resume recording via oniRecorderStart.

Parameters
[in]recorderThe handle to the recorder.
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniRegisterDeviceCallbacks ( OniDeviceCallbacks pCallbacks,
void *  pCookie,
OniCallbackHandle pHandle 
)
ONI_C_API OniStatus oniReleaseDeviceList ( OniDeviceInfo pDevices)

Release previously allocated device list

ONI_C_API OniStatus oniSetLogConsoleOutput ( OniBool  bConsoleOutput)

Configures if log entries will be printed to console.

Parameters
OniBoolbConsoleOutput [in] TRUE to print log entries to console, FALSE otherwise.
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniSetLogFileOutput ( OniBool  bFileOutput)

Configures if log entries will be printed to a log file.

Parameters
OniBoolbFileOutput [in] TRUE to print log entries to the file, FALSE otherwise.
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniSetLogMinSeverity ( int  nMinSeverity)

Set the Minimum severity for log produce

Parameters
constchar * strMask [in] Name of the logger
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API OniStatus oniSetLogOutputFolder ( const char *  strOutputFolder)

Change the log output folder

Parameters
constchar * strOutputFolder [in] path to the desirebale folder
Return values
ONI_STATUS_OKUpon successful completion.
ONI_STATUS_ERRORUpon any kind of failure.
ONI_C_API void oniShutdown ( )

Shutdown OpenNI2

ONI_C_API void oniStreamDestroy ( OniStreamHandle  stream)

Destroy an existing stream

ONI_C_API OniStatus oniStreamGetProperty ( OniStreamHandle  stream,
int  propertyId,
void *  data,
int *  pDataSize 
)

Get property in the stream. Use the properties listed in OniTypes.h: ONI_STREAM_PROPERTY_..., or specific ones supplied by the device for its streams.

ONI_C_API const OniSensorInfo* oniStreamGetSensorInfo ( OniStreamHandle  stream)

Get the OniSensorInfo of the certain stream.

ONI_C_API OniStatus oniStreamInvoke ( OniStreamHandle  stream,
int  commandId,
void *  data,
int  dataSize 
)

Invoke an internal functionality of the stream.

ONI_C_API OniBool oniStreamIsCommandSupported ( OniStreamHandle  stream,
int  commandId 
)

Check if a command is supported, for invoke

ONI_C_API OniBool oniStreamIsPropertySupported ( OniStreamHandle  stream,
int  propertyId 
)

Check if the property is supported the stream. Use the properties listed in OniTypes.h: ONI_STREAM_PROPERTY_..., or specific ones supplied by the device for its streams.

ONI_C_API OniStatus oniStreamReadFrame ( OniStreamHandle  stream,
OniFrame **  pFrame 
)

Get the next frame from the stream. This function is blocking until there is a new frame from the stream. For timeout, use oniWaitForStreams() first

ONI_C_API OniStatus oniStreamRegisterNewFrameCallback ( OniStreamHandle  stream,
OniNewFrameCallback  handler,
void *  pCookie,
OniCallbackHandle pHandle 
)

Register a callback to when the stream has a new frame.

ONI_C_API OniStatus oniStreamSetFrameBuffersAllocator ( OniStreamHandle  stream,
OniFrameAllocBufferCallback  alloc,
OniFrameFreeBufferCallback  free,
void *  pCookie 
)

Sets the stream buffer allocation functions. Note that this function may only be called while stream is not started.

ONI_C_API OniStatus oniStreamSetProperty ( OniStreamHandle  stream,
int  propertyId,
const void *  data,
int  dataSize 
)

Set property in the stream. Use the properties listed in OniTypes.h: ONI_STREAM_PROPERTY_..., or specific ones supplied by the device for its streams.

ONI_C_API OniStatus oniStreamStart ( OniStreamHandle  stream)

Start generating data from the stream.

ONI_C_API void oniStreamStop ( OniStreamHandle  stream)

Stop generating data from the stream.

ONI_C_API void oniStreamUnregisterNewFrameCallback ( OniStreamHandle  stream,
OniCallbackHandle  handle 
)

Unregister a previously registered callback to when the stream has a new frame.

ONI_C_API void oniUnregisterDeviceCallbacks ( OniCallbackHandle  handle)
ONI_C_API OniStatus oniWaitForAnyStream ( OniStreamHandle pStreams,
int  numStreams,
int *  pStreamIndex,
int  timeout 
)

Wait for any of the streams to have a new frame



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