Function rs2_try_wait_for_frame

Function Documentation

int rs2_try_wait_for_frame(rs2_frame_queue *queue, unsigned int timeout_ms, rs2_frame **output_frame, rs2_error **error)

wait until new frame becomes available in the queue and dequeue it

Parameters:
  • queue[in] the frame queue data structure

  • timeout_ms[in] max time in milliseconds to wait until a frame becomes available

  • output_frame[out] frame handle to be released using rs2_release_frame

  • error[out] if non-null, receives any error that occurs during this call, otherwise, errors are ignored

Returns:

true if new frame was stored to output_frame