Function rs2_wait_for_frame

Function Documentation

rs2_frame *rs2_wait_for_frame(rs2_frame_queue *queue, unsigned int timeout_ms, 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 an exception will be thrown

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

Returns:

frame handle to be released using rs2_release_frame