Function rs2_create_context

Function Documentation

rs2_context *rs2_create_context(int api_version, rs2_error **error)

Creates RealSense context that is required for the rest of the API. Context settings are taken from the library configuration file’s ‘context’ key.

Parameters:
  • api_version[in] Users are expected to pass their version of RS2_API_VERSION to make sure they are running the correct librealsense version.

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

Returns:

Context object