libfreenect_sync.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OpenKinect Project. http://www.openkinect.org
3  *
4  * Copyright (c) 2010 Brandyn White (bwhite@dappervision.com)
5  * Andrew Miller (amiller@dappervision.com)
6  *
7  * This code is licensed to you under the terms of the Apache License, version
8  * 2.0, or, at your option, the terms of the GNU General Public License,
9  * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
10  * or the following URLs:
11  * http://www.apache.org/licenses/LICENSE-2.0
12  * http://www.gnu.org/licenses/gpl-2.0.txt
13  *
14  * If you redistribute this file in source form, modified or unmodified, you
15  * may:
16  * 1) Leave this header intact and distribute it under the same terms,
17  * accompanying it with the APACHE20 and GPL20 files, or
18  * 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
19  * 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
20  * In all cases you must keep the copyright notice intact and include a copy
21  * of the CONTRIB file.
22  *
23  * Binary distributions must follow the binary distribution requirements of
24  * either License.
25  */
26 #pragma once
27 
28 #include "libfreenect.h"
29 #include <stdint.h>
30 
31 
33 #ifndef _WIN32
34  #define FREENECTAPI_SYNC
35 #else
36 
37  #ifdef __cplusplus
38  #define FREENECTAPI_SYNC extern "C" __declspec(dllexport)
39  #else
40  // this is required when building from a Win32 port of gcc without being
41  // forced to compile all of the library files (.c) with g++...
42  #define FREENECTAPI_SYNC __declspec(dllexport)
43  #endif
44 #endif
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 FREENECTAPI_SYNC int freenect_sync_get_video_with_res(void **video, uint32_t *timestamp, int index,
52 /* Synchronous video function, starts the runloop if it isn't running
53 
54  The returned buffer is valid until this function is called again, after which the buffer must not
55  be used again. Make a copy if the data is required.
56 
57  Args:
58  video: Populated with a pointer to a video buffer with a size of the requested type
59  timestamp: Populated with the associated timestamp
60  index: Device index (0 is the first)
61  res: Valid resolution
62  fmt: Valid format
63 
64  Returns:
65  Nonzero on error.
66 */
67 
68 int freenect_sync_get_video(void **video, uint32_t *timestamp, int index, freenect_video_format fmt);
69 /* Does the exact same as above, but with a default resolution,
70  so backwards compatibilty is maintained.
71  The Resolution is kept at the default FREENECT_RESOLUTION_MEDIUM
72 */
73 
74 FREENECTAPI_SYNC int freenect_sync_get_depth_with_res(void **depth, uint32_t *timestamp, int index,
76 /* Synchronous depth function, starts the runloop if it isn't running
77 
78  The returned buffer is valid until this function is called again, after which the buffer must not
79  be used again. Make a copy if the data is required.
80 
81  Args:
82  depth: Populated with a pointer to a depth buffer with a size of the requested type
83  timestamp: Populated with the associated timestamp
84  index: Device index (0 is the first)
85  res: Valid resolution
86  fmt: Valid format
87 
88  Returns:
89  Nonzero on error.
90 */
91 
92 int freenect_sync_get_depth(void **depth, uint32_t *timestamp, int index, freenect_depth_format fmt);
93 /* Again, a wrapper function to keep backward compatibility.
94  The Resolution is kept at the default FREENECT_RESOLUTION_MEDIUM
95 
96 */
97 
98 FREENECTAPI_SYNC int freenect_sync_set_tilt_degs(int angle, int index);
99 /* Tilt function, starts the runloop if it isn't running
100 
101  Args:
102  angle: Set the angle to tilt the device
103  index: Device index (0 is the first)
104 
105  Returns:
106  Nonzero on error.
107 */
108 
110 /* Tilt state function, starts the runloop if it isn't running
111 
112  Args:
113  state: Populated with an updated tilt state pointer
114  index: Device index (0 is the first)
115 
116  Returns:
117  Nonzero on error.
118 */
119 
121 /* Led function, starts the runloop if it isn't running
122 
123  Args:
124  led: The LED state to set the device to
125  index: Device index (0 is the first)
126 
127  Returns:
128  Nonzero on error.
129 */
130 
131 FREENECTAPI_SYNC int freenect_sync_camera_to_world(int cx, int cy, int wz, double* wx, double* wy, int index);
132 /* Camera to world mapping, starts the runloop if it isn't running
133 
134  Wraps libfreenect_registration.h function of same name.
135 */
136 
138 #ifdef __cplusplus
139 }
140 #endif
FREENECTAPI_SYNC int freenect_sync_get_depth_with_res(void **depth, uint32_t *timestamp, int index, freenect_resolution res, freenect_depth_format fmt)
freenect_video_format
Definition: libfreenect.h:86
#define FREENECTAPI_SYNC
If Win32, export all functions for DLL usage.
int freenect_sync_get_depth(void **depth, uint32_t *timestamp, int index, freenect_depth_format fmt)
FREENECTAPI_SYNC int freenect_sync_set_led(freenect_led_options led, int index)
freenect_depth_format
Definition: libfreenect.h:99
FREENECTAPI_SYNC int freenect_sync_get_video_with_res(void **video, uint32_t *timestamp, int index, freenect_resolution res, freenect_video_format fmt)
freenect_led_options
Definition: libfreenect.h:148
FREENECTAPI_SYNC int freenect_sync_get_tilt_state(freenect_raw_tilt_state **state, int index)
freenect_resolution
Definition: libfreenect.h:77
Data from the tilt motor and accelerometer.
Definition: libfreenect.h:167
unsigned int uint32_t
FREENECTAPI_SYNC void freenect_sync_stop(void)
capture state
Definition: micview.c:53
int freenect_sync_get_video(void **video, uint32_t *timestamp, int index, freenect_video_format fmt)
FREENECTAPI_SYNC int freenect_sync_camera_to_world(int cx, int cy, int wz, double *wx, double *wy, int index)
FREENECTAPI_SYNC int freenect_sync_set_tilt_degs(int angle, int index)


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Mon Jun 10 2019 13:46:42