Public Member Functions | Private Member Functions | Private Attributes | List of all members
openni::Recorder Class Reference

#include <OpenNI.h>

Public Member Functions

Status attach (VideoStream &stream, bool allowLossyCompression=false)
 
Status create (const char *fileName)
 
void destroy ()
 
bool isValid () const
 
 Recorder ()
 
Status start ()
 
void stop ()
 
 ~Recorder ()
 

Private Member Functions

OniRecorderHandle getHandle () const
 
Recorderoperator= (const Recorder &)
 
 Recorder (const Recorder &)
 

Private Attributes

OniRecorderHandle m_recorder
 

Detailed Description

The Recorder class is used to record streams to an ONI file.

After a recorder is instantiated, it must be initialized with a specific filename where the recording will be stored. The recorder is then attached to one or more streams. Once this is complete, the recorder can be told to start recording. The recorder will store every frame from every stream to the specified file. Later, this file can be used to initialize a file Device, and used to play back the same data that was recorded.

Opening a file device is done by passing its path as the uri to the Device::open() method.

See also
PlaybackControl for options available to play a reorded file.

Definition at line 2546 of file OpenNI.h.

Constructor & Destructor Documentation

openni::Recorder::Recorder ( )
inline

Creates a recorder. The recorder is not valid, i.e. isValid() returns false. You must initialize the recorder before use with create().

Definition at line 2553 of file OpenNI.h.

openni::Recorder::~Recorder ( )
inline

Destroys a recorder. This will also stop recording.

Definition at line 2560 of file OpenNI.h.

openni::Recorder::Recorder ( const Recorder )
private

Member Function Documentation

Status openni::Recorder::attach ( VideoStream stream,
bool  allowLossyCompression = false 
)
inline

Attaches a stream to the recorder. Note, this won't start recording, you should explicitly start it using start() method. As soon as the recording process has been started, no more streams can be attached to the recorder.

@param [in] stream  The stream to be recorded.
@param [in] allowLossyCompression [Optional] If this value is true, the recorder might use
    a lossy compression, which means that when the recording will be played-back, there might
 be small differences from the original frame. Default value is false.

Definition at line 2606 of file OpenNI.h.

Status openni::Recorder::create ( const char *  fileName)
inline

Initializes a recorder. You can initialize the recorder only once. Attempts to intialize more than once will result in an error code being returned.

Initialization assigns the recorder to an output file that will be used for recording. Before use, the attach() function must also be used to assign input data to the Recorder.

Parameters
[in]fileNameThe name of a file which will contain the recording.
Returns
Status code which indicates success or failure of the operation.

Definition at line 2576 of file OpenNI.h.

void openni::Recorder::destroy ( )
inline

Destroys the recorder object.

Definition at line 2647 of file OpenNI.h.

OniRecorderHandle openni::Recorder::getHandle ( ) const
inlineprivate

Returns a handle of this recorder.

Definition at line 2662 of file OpenNI.h.

bool openni::Recorder::isValid ( ) const
inline

Verifies if the recorder is valid, i.e. if one can record with this recorder. A recorder object is not valid until the create() method is called.

Returns
true if the recorder has been intialized, false otherwise.

Definition at line 2591 of file OpenNI.h.

Recorder& openni::Recorder::operator= ( const Recorder )
private
Status openni::Recorder::start ( )
inline

Starts recording. Once this method is called, the recorder will take all subsequent frames from the attached streams and store them in the file. You may not attach additional streams once recording was started.

Definition at line 2624 of file OpenNI.h.

void openni::Recorder::stop ( )
inline

Stops recording. You may use start() to resume the recording.

Definition at line 2636 of file OpenNI.h.

Member Data Documentation

OniRecorderHandle openni::Recorder::m_recorder
private

Definition at line 2668 of file OpenNI.h.


The documentation for this class was generated from the following file:


astra_camera
Author(s): Tim Liu
autogenerated on Wed Dec 16 2020 03:54:34