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

◆ k4a_playback_get_previous_capture()

k4a_stream_result_t k4a_playback_get_previous_capture ( k4a_playback_t  playback_handle,
k4a_capture_t capture_handle 
)
related

Read the previous capture in the recording sequence.

Parameters
playback_handleHandle obtained by k4a_playback_open().
capture_handleIf successful this contains a handle to a capture object. Caller must call k4a_capture_release() when its done using this capture.
Returns
K4A_STREAM_RESULT_SUCCEEDED if a capture 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_capture() always returns the previous capture in the sequence before the most recently returned capture.
If a call was made to k4a_playback_get_next_capture() that returned K4A_STREAM_RESULT_EOF, the playback position is at the end of the stream and k4a_playback_get_previous_capture() will return the last capture in the recording.
The first call to k4a_playback_get_previous_capture() after k4a_playback_seek_timestamp() will return the capture in the recording closest to the seek time with all image timestamps less than the seek time.
Capture objects returned by this API will always contain at least one image, but may have images missing if frames were dropped in the original recording. When calling k4a_capture_get_color_image(), k4a_capture_get_depth_image(), or k4a_capture_get_ir_image(), the image should be checked for NULL.