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

◆ k4a_playback_get_previous_data_block()

k4a_stream_result_t k4a_playback_get_previous_data_block ( k4a_playback_t  playback_handle,
const char *  track_name,
k4a_playback_data_block_t data_block_handle 
)
related

Read the previous data block for a particular track.

Parameters
playback_handleHandle obtained by k4a_playback_open().
track_nameThe name of the track to read the previous data block from.
data_block_handleThe location to write the data block.
Returns
K4A_STREAM_RESULT_SUCCEEDED if a sample is returned, or K4A_STREAM_RESULT_EOF if the start of the recording is reached. All other failures will return K4A_STREAM_RESULT_FAILED.
Remarks
k4a_playback_get_previous_data_block() always returns the data block before the most recently returned data block for a particular track.
If a call was made to to k4a_playback_get_next_data_block() which returned K4A_STREAM_RESULT_EOF, then the playback position is at the end of the recording and calling k4a_playback_get_previous_data_block() with the same track will return the last data block in the track.
The first call to k4a_playback_get_previous_data_block() after k4a_playback_seek_timestamp() will return the data block closest to the seek time with a timestamp less than the seek time.
If the call is successful, callers must call k4a_playback_data_block_release() to return the allocated memory for data_block_handle.
k4a_playback_get_previous_data_block() cannot be used with the built-in tracks: "COLOR", "DEPTH", etc... k4a_playback_track_is_builtin() can be used to determine if a track is a built-in track.