File: Tutorial.Recording.txt

package info (click to toggle)
openni 1.5.4.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,580 kB
  • sloc: cpp: 116,706; ansic: 58,807; sh: 10,287; cs: 7,698; java: 7,402; python: 1,547; makefile: 492; xml: 167
file content (51 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download | duplicates (7)
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
/**
@page tut_recording Recording data

When an application wants to record data, it needs to create a recorder node, add the nodes that it wishes to
record to it, and then continuously read data and record it.

The following code creates a depth node and an audio node, and then records their data to a file:
@code
// Initialize context
xn::Context context;
nRetVal = context.Init();
// TODO: check error code

// Create depth generator
xn::DepthGenerator depth;
nRetVal = depth.Create(context);
// TODO: check error code

// Create audio generator
xn::AudioGenerator audio;
nRetVal = audio.Create(context);
// TODO: check error code

// Create recorder
xn::Recorder recorder;
nRetVal = recorder.Create(context);
// TODO: check error code

// Add depth node to recording
nRetVal = recorder.AddNodeToRecording(depth);
// TODO: check error code

// Add audio node to recording
nRetVal = recorder.AddNodeToRecording(audio);
// TODO: check error code

// Start generating
nRetVal = context.StartGeneratingAll();
// TODO: check error code

// Now read data and record it
while (TRUE)
{
	nRetVal = context.WaitAnyUpdateAll();
	// TODO: check error code
	
	nRetVal = recorder.Record();
	// TODO: check error code
}
@endcode
*/