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

◆ k4a_playback_get_next_capture()

k4a_stream_result_t k4a_playback_get_next_capture ( k4a_playback_t  playback_handle,
k4a_capture_t capture_handle 
)
related

Read the next 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 end of the recording is reached. All other failures will return K4A_STREAM_RESULT_FAILED.
Remarks
k4a_playback_get_next_capture() always returns the next capture in sequence after the most recently returned capture.
The first call to k4a_playback_get_next_capture() after k4a_playback_seek_timestamp() will return the capture in the recording closest to the seek time with an image timestamp greater than or equal to the seek time.
If a call was made to k4a_playback_get_previous_capture() that returned K4A_STREAM_RESULT_EOF, the playback position is at the beginning of the stream and k4a_playback_get_next_capture() will return the first capture in the recording.
Capture objects returned by the playback 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.