C++ wrapper for the Voyant playback system with timing capabilities.
More...
#include <voyant_playback.hpp>
C++ wrapper for the Voyant playback system with timing capabilities.
◆ VoyantPlayback() [1/2]
VoyantPlayback::VoyantPlayback |
( |
double |
rate = 1.0 , |
|
|
bool |
loop = false , |
|
|
bool |
filter_points = false |
|
) |
| |
Constructor
- Parameters
-
rate | Playback rate (1.0 = real-time, 0 = as fast as possible) |
loop | Whether to loop when reaching the end of file |
filter_points | Whether to filter out invalid points during playback. When true, invalid points will be removed from frames. When false, all points including invalid ones will be included. |
◆ ~VoyantPlayback()
VoyantPlayback::~VoyantPlayback |
( |
| ) |
|
◆ VoyantPlayback() [2/2]
◆ currentFrame() [1/2]
Gets the current frame (mutable version)
- Returns
- Mutable reference to the current frame
- Warning
- Only valid if nextFrame() returned true and no error occurred
◆ currentFrame() [2/2]
Gets the current frame (const version)
- Returns
- Const reference to the current frame
- Warning
- Only valid if nextFrame() returned true and no error occurred
◆ currentFrameIndex()
size_t VoyantPlayback::currentFrameIndex |
( |
| ) |
|
Gets the current frame index (0-based)
- Returns
- Current frame index, 0 if invalid
- Warning
- Only valid if nextFrame() returned true and no error occurred
◆ currentFrameTimestamp()
uint64_t VoyantPlayback::currentFrameTimestamp |
( |
| ) |
|
Gets the current frame timestamp in nanoseconds
- Returns
- Timestamp in nanoseconds, 0 if invalid
- Warning
- Only valid if nextFrame() returned true and no error occurred
◆ getFramesProcessed()
size_t VoyantPlayback::getFramesProcessed |
( |
| ) |
const |
Gets the number of frames processed
- Returns
- Number of frames processed
◆ getLastError()
std::string VoyantPlayback::getLastError |
( |
| ) |
const |
Gets the last error message
- Returns
- Last error message or empty string if no error
◆ getLoopsCompleted()
size_t VoyantPlayback::getLoopsCompleted |
( |
| ) |
const |
Gets the number of loops completed
- Returns
- Number of loops completed
◆ isValid()
bool VoyantPlayback::isValid |
( |
| ) |
const |
Checks if the playback handle is valid
- Returns
- true if valid, false otherwise
◆ nextFrame()
bool VoyantPlayback::nextFrame |
( |
| ) |
|
Reads the next frame, automatically applying timing and handling loopback and parses the frame data into the pre-allocated frame wrapper
- Returns
- true if a frame was successfully read, false if at end of file or error
◆ openFile()
bool VoyantPlayback::openFile |
( |
const std::string & |
filePath | ) |
|
Opens a file for playback
- Parameters
-
filePath | Path to the recording file |
- Returns
- true if successful, false otherwise
◆ operator=()
The documentation for this class was generated from the following file: