#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
Go to the source code of this file.
◆ voyant_playback_create()
Creates a new VoyantPlayback instance
- Parameters
-
filter_points | Whether to filter out invalid points during playback. When set to true, any invalid points will be removed from the frames. When set to false, all points including invalid ones will be included. |
- Returns
- VoyantPlaybackBaseC struct containing the playback instance
◆ voyant_playback_current_frame()
int32_t voyant_playback_current_frame |
( |
const VoyantPlaybackBaseC * |
playback, |
|
|
uint8_t * |
dest, |
|
|
uintptr_t |
len |
|
) |
| |
Gets the current frame data
Safety
- playback must be a valid VoyantPlaybackBaseC instance
- dest must point to a buffer of at least len bytes
Parameters
- playback: Reference to VoyantPlaybackBaseC instance
- dest: Pointer to destination buffer
- len: Length of destination buffer in bytes
Returns
- Positive number: Number of bytes copied
- 0: No frame available or buffer too small
- -1: Playback is invalid
◆ voyant_playback_current_frame_index()
int32_t voyant_playback_current_frame_index |
( |
const VoyantPlaybackBaseC * |
playback, |
|
|
uintptr_t * |
index_out |
|
) |
| |
Gets the current frame index (0-based)
Safety
Parameters
- playback: Reference to VoyantPlaybackBaseC instance
- index_out: Pointer to a usize where the frame index will be stored
Returns
- 1: Success, index was written to index_out
- 0: Failure, playback is invalid
◆ voyant_playback_current_frame_timestamp()
int32_t voyant_playback_current_frame_timestamp |
( |
const VoyantPlaybackBaseC * |
playback, |
|
|
uint64_t * |
timestamp_out |
|
) |
| |
Gets the current frame timestamp in nanoseconds
Safety
Parameters
- playback: Reference to VoyantPlaybackBaseC instance
- timestamp_out: Pointer to a u64 where the timestamp will be stored
Returns
- 1: Success, timestamp was written to timestamp_out
- 0: Failure, playback is invalid
◆ voyant_playback_free()
Frees memory associated with a VoyantPlaybackBaseC instance
Safety
- playback must be a valid VoyantPlaybackBaseC instance
- After calling this function, the playback instance should not be used
Parameters
◆ voyant_playback_is_file_open()
Checks if a file is open
Safety
Parameters
Returns
- 1: File is open
- 0: No file is open or playback is invalid
◆ voyant_playback_next_frame()
Reads the next frame
Safety
Parameters
Returns
- 1: Successfully read a frame
- 0: End of file reached
- -1: Error (IO error, deserialization error, etc.)
- -2: Invalid playback instance
◆ voyant_playback_open_file()
int32_t voyant_playback_open_file |
( |
const VoyantPlaybackBaseC * |
playback, |
|
|
const char * |
file_path |
|
) |
| |
Opens a file for playback
Safety
- playback must be a valid VoyantPlaybackBaseC instance
- file_path must be a valid null-terminated C string
Parameters
- playback: Reference to VoyantPlaybackBaseC instance
- file_path: C string containing path to the recording file
Returns
◆ voyant_playback_reset()
Resets playback to the beginning of the file
Safety
Parameters
Returns
- 1: Success
- 0: Failure (no file open or invalid playback)