Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK

◆ k4a_playback_seek_timestamp()

k4a_result_t k4a_playback_seek_timestamp ( k4a_playback_t  playback_handle,
int64_t  offset_usec,
k4a_playback_seek_origin_t  origin 
)
related

Seek to a specific timestamp within a recording.

Parameters
playback_handleHandle obtained by k4a_playback_open().
offset_usecThe timestamp offset to seek to, relative to origin
originSpecifies how the given timestamp should be interpreted. Seek can be done relative to the beginning or end of the recording, or using an absolute device timestamp.
Returns
K4A_RESULT_SUCCEEDED if the seek operation was successful, or K4A_RESULT_FAILED if an error occured. The current seek position is left unchanged if a failure is returned.
Remarks
The first device timestamp in a recording is usually non-zero. The recording file starts at the device timestamp defined by start_timestamp_offset_usec, which is accessible via k4a_playback_get_record_configuration().
The first call to k4a_playback_get_next_capture() after k4a_playback_seek_timestamp() will return the first capture containing an image timestamp greater than or equal to the seek time.
The first call to k4a_playback_get_previous_capture() after k4a_playback_seek_timestamp() will return the first capture with all image timestamps less than the seek time.
The first call to k4a_playback_get_next_imu_sample() after k4a_playback_seek_timestamp() will return the first imu sample with a timestamp greter than or equal to the seek time.
The first call to k4a_playback_get_previous_imu_sample() after k4a_playback_seek_timestamp() will return the first imu sample with a timestamp less than the seek time.