-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAsync_wrapper.h
More file actions
107 lines (93 loc) · 3.17 KB
/
Async_wrapper.h
File metadata and controls
107 lines (93 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#include "libfreenect.h"
#include <stdint.h>
typedef void * kinectDeviceHandle_t;
typedef void * kinectContextHandle_t;
/* Initialise the kinect
Returns:
handle to context.
*/
kinectContextHandle_t kinect_init(void);
/* Closes kinect
*/
int kinect_shutdown(kinectContextHandle_t context_handle);
/**
* Answer which subdevices this library supports. This is most useful for
* wrappers trying to determine whether the underlying library was built with
* audio support or not, so the wrapper can avoid calling functions that do not
* exist.
*
* @return Flags representing the subdevices that the library supports opening (see freenect_device_flags)
*/
int kinect_supported_subdevices(void);
/*Set the log level for the specified freenect context
@param context_handle context to set log level for
log level set to debug.
*/
void kinect_set_log_level(kinectContextHandle_t context_handle, freenect_loglevel log_lev);
/*opens a kinect device via a context. Index specifies the index of
* the device on the current state of the bus. Bus resets may cause
* indexes to shift.
*
* @param context_handle Context to open device through
* @param index Index of the device on the bus
*
* @return handle to the device
*/
kinectDeviceHandle_t kinect_open_device(kinectContextHandle_t context_handle, int index, freenect_resolution res, freenect_video_format video_format, freenect_depth_format depth_format);
/**
* Set the tilt state of the device, in degrees with respect to the
* horizon.
* @param handle Device to set tilt state
* @param freenect_angle Angle the device should tilt to
*
* @return 0 on success, < 0 on error.
*/
int kinect_set_tilt_degs(kinectDeviceHandle_t handle,double freenect_angle);
/**
* Set the state of the LED. Uses blocking control message call to
* update device.
* @return 0 on success, < 0 on error
*/
int kinect_set_led(kinectDeviceHandle_t handle,uint32_t option);
/**
* Closes a device that is currently open
* @return 0 on success
*/
int kinect_close_device(kinectDeviceHandle_t handle);
/**
* Start the video information stream for a device.
* @return 0 on success, < 0 on error
*/
int kinect_start_video(kinectDeviceHandle_t handle);
/* Reads video data and puts it in the video buffer
*/
void kinect_read_video(void *video);
/** Reads video data at low resolution and puts it in the
* video buffer
*/
void kinect_read_video_low_res(void *video);
/**
* Stop the video information stream for a device
* @return 0 on success, < 0 on error
*/
int kinect_stop_video(kinectDeviceHandle_t handle);
/**
* Start the video information stream for a device.
* @return 0 on success, < 0 on error
*/
int kinect_start_depth(kinectDeviceHandle_t handle);
/* Reads depth data and puts it in the depth buffer
* in (160 x 120) resolution.
/* Reads depth data and puts it in the depth buffer
* in low resolution (320 x 240) if factor=2
* or (160 x 120) if factor=4;
*/
void kinect_read_depth_low_res(void *depth, int factor);
/* Reads depth data and puts it in the video buffer
*/
void kinect_read_depth(void *depth);
/**
* Stop the depth information stream for a device
* @return 0 on success, < 0 on error
*/
int kinect_stop_depth(kinectDeviceHandle_t handle);