Azure Kinect Body Tracking SDK  1.0.1

◆ k4abt_tracker_pop_result()

k4a_wait_result_t k4abt_tracker_pop_result ( k4abt_tracker_t  tracker_handle,
k4abt_frame_t body_frame_handle,
int32_t  timeout_in_ms 
)
related

Gets the next available body frame.

Parameters
tracker_handleHandle obtained by k4abt_tracker_create().
body_frame_handleIf successful this contains a handle to a body frame object. Caller must call k4abt_release_frame() when its done using this frame.
timeout_in_msSpecifies the time in milliseconds the function should block waiting for the body frame. 0 is a check of the queue without blocking. Passing a value of K4A_WAIT_INFINITE will blocking indefinitely.
Returns
K4A_WAIT_RESULT_SUCCEEDED if a body frame is returned. If a body frame is not available before the timeout elapses, the function will return K4A_WAIT_RESULT_TIMEOUT. All other failures will return K4A_WAIT_RESULT_FAILED.
Remarks
Retrieves the next available body frame result and pop it from the output queue in the k4abt_tracker_t. If a new body frame is not currently available, this function will block up until the timeout is reached. The SDK will buffer at least three body frames worth of data before stopping new capture being queued by k4abt_tracker_enqueue_capture. Once body_frame data is read, the user must call k4abt_frame_release() to return the allocated memory to the SDK.
Upon successfully reads a body frame this function will return success.
This function returns K4A_WAIT_RESULT_FAILED when either the tracker is shut down by k4abt_tracker_shutdown() API and the remaining tracker queue is empty, or an internal problem is encountered: such as low memory condition, or other unexpected issues.