Function rs2_pipeline_start_with_callback

Function Documentation

rs2_pipeline_profile *rs2_pipeline_start_with_callback(rs2_pipeline *pipe, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error)

Start the pipeline streaming with its default configuration. The pipeline captures samples from the device, and delivers them to the through the provided frame callback. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. When starting the pipeline with a callback both wait_for_frames() or poll_for_frames() will throw exception.

Parameters:
  • pipe[in] A pointer to an instance of the pipeline

  • on_frame[in] function pointer to register as per-frame callback

  • user[in] auxiliary data the user wishes to receive together with every frame callback

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

Returns:

The actual pipeline device and streams profile, which was successfully configured to the streaming device.