|Recorder (XnNodeHandle hNode=NULL)|
|Recorder (const NodeWrapper &other)|
|XnStatus||Create (Context &context, const XnChar *strFormatName=NULL)|
|XnStatus||SetDestination (XnRecordMedium destType, const XnChar *strDest)|
|XnStatus||GetDestination (XnRecordMedium &destType, XnChar *strDest, XnUInt32 nBufSize)|
|XnStatus||AddNodeToRecording (ProductionNode &Node, XnCodecID compression=XN_CODEC_NULL)|
|XnStatus||RemoveNodeFromRecording (ProductionNode &Node)|
Purpose: To create and manage a Recorder node.
Usage: Instatiate and create a Recorder node.
Data output: Records to a specified destination medium the frames of data from each node that was added to the Recorder node.
Recordings are a powerful debug tool. A recording enables a full capture of data generation and the ability to later play it back by 'regeneration' so that applications can simulate an exact replica of the situation to be debugged.
OpenNI supports recordings of the production nodes in the production graph, both the entire configuration of each node, and all data streamed from a node.
OpenNI has a framework for recording data and for playing it back (using mock nodes). It also comes with the nimRecorder module, which defines a new file format (".ONI")
If a recorder exists while generating, the 'WaitXUpdateAll' functions automatically record the data from all nodes added to this recorder.
To record, an application creates a Recorder node, and set its destination - the file name to which it should write. The application must add to the Recorder node every production node that it wants to record. When adding a node to the recorder, the Recorder stores its configuration. It also registers to every possible event of the node, so that when any configuration change takes place, it is also recorded.
Once all required nodes are added, the application can read data from the nodes and record it. Recording of data can be achieved either by explicitly calling the xn::Recorder::Record() function, or by using one of the 'Update All'" functions.
Applications that initialize OpenNI using an XML file can easily record their session without any change to the code. All that is required is that they create an additional node in the XML file for the recorder, add nodes to it, and when the application calls one of the 'WaitXUpdateAll' functions, recording will occur. see Xml Scripts for explanation on how to do that.
Recordings are played back by using the services of the Player class.
Constructor & Destructor Documentation
|xn::Recorder::Recorder||(||XnNodeHandle||hNode = ||)||
[in] hNode A node handle
|xn::Recorder::Recorder||(||const NodeWrapper &||other||)||
Member Function Documentation
|XnStatus xn::Recorder::AddNodeToRecording||(||ProductionNode &||Node,|
Adds a node to the recording setup, and starts recording data what the node generates. This method must be called for each node to be recorded with this recorder.
|XnStatus xn::Recorder::GetDestination||(||XnRecordMedium &||destType,|
Gets the destination medium for the Recorder node to record to.
[out] destType The type of medium to record to. Currently only XN_RECORD_MEDIUM_FILE is supported. [out] strDest Recording destination. If destType is XN_RECORD_MEDIUM_FILE, this specifies a file name. [in] nBufSize Destination buffer size.
Records one frame of data from each node that was added to the recorder with AddNodeToRecording().
To record continually, the recorder node must be called repeatedly for each frame.
It is highly recommended that an application use the 'WaitXUpdateAll' methods, and not call Generator::WaitAndUpdateData() for each generator. When working with the 'WaitXUpdateAll' methods, OpenNI will automatically call Record(), and there is no need for the application to call this method.
Specifies to where the recorder must send its recording. Typically this is a disk file of a particular file type.
[in] destType The type of medium to record to. Currently only XN_RECORD_MEDIUM_FILE is supported. [in] strDest Recording destination. If destType is XN_RECORD_MEDIUM_FILE, this specifies a file name.
The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:07 for OpenNI 1.5.4 by 188.8.131.52