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:
nRetVal = context.
Init();
nRetVal = depth.
Create(context);
nRetVal = audio.
Create(context);
nRetVal = recorder.
Create(context);
{
}
Definition: XnCppWrapper.h:8066
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates an AudioGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9952
Definition: XnCppWrapper.h:8621
XnStatus WaitAnyUpdateAll()
Updates all generator nodes in the context to their latest available data, first waiting for any of t...
Definition: XnCppWrapper.h:9411
XnStatus Init()
Builds the context's general software environment.
Definition: XnCppWrapper.h:8734
XnStatus StartGeneratingAll()
Ensures all created generator nodes are generating data.
Definition: XnCppWrapper.h:9188
Definition: XnCppWrapper.h:4721
XnStatus Create(Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
Creates a DepthGenerator node from available production node alternatives.
Definition: XnCppWrapper.h:9828
Definition: XnCppWrapper.h:3706
XnStatus Create(Context &context, const XnChar *strFormatName=NULL)
Creates a Recorder node.
Definition: XnCppWrapper.h:9810
XnStatus Record()
Records one frame of data from each node that was added to the recorder with AddNodeToRecording().
Definition: XnCppWrapper.h:3789
XnStatus AddNodeToRecording(ProductionNode &Node, XnCodecID compression=XN_CODEC_NULL)
Adds a node to the recording setup, and starts recording data what the node generates....
Definition: XnCppWrapper.h:3761