Classes | Namespaces | Macros | Functions
rs.cpp File Reference
#include <functional>
#include <climits>
#include "context.h"
#include "device.h"
#include "sync.h"
#include "archive.h"
Include dependency graph for rs.cpp:

Go to the source code of this file.

Classes

struct  rs_error
 

Namespaces

 rsimpl
 

Macros

#define HANDLE_EXCEPTIONS_AND_RETURN(R, ...)   catch(...) { std::ostringstream ss; rsimpl::stream_args(ss, #__VA_ARGS__, __VA_ARGS__); rsimpl::translate_exception(__FUNCTION__, ss.str(), error); return R; }
 
#define VALIDATE_ENUM(ARG)   if(!rsimpl::is_valid(ARG)) { std::ostringstream ss; ss << "bad enum value for argument \"" #ARG "\""; throw std::runtime_error(ss.str()); }
 
#define VALIDATE_LE(ARG, MAX)   if((ARG) > (MAX)) { std::ostringstream ss; ss << "out of range value for argument \"" #ARG "\""; throw std::runtime_error(ss.str()); }
 
#define VALIDATE_NATIVE_STREAM(ARG)   VALIDATE_ENUM(ARG); if(ARG >= RS_STREAM_NATIVE_COUNT) { std::ostringstream ss; ss << "argument \"" #ARG "\" must be a native stream"; throw std::runtime_error(ss.str()); }
 
#define VALIDATE_NOT_NULL(ARG)   if(!(ARG)) throw std::runtime_error("null pointer passed for argument \"" #ARG "\"");
 
#define VALIDATE_RANGE(ARG, MIN, MAX)   if((ARG) < (MIN) || (ARG) > (MAX)) { std::ostringstream ss; ss << "out of range value for argument \"" #ARG "\""; throw std::runtime_error(ss.str()); }
 

Functions

std::string api_version_to_string (int version)
 
int major (int version)
 
int minor (int version)
 
int patch (int version)
 
void report_version_mismatch (int runtime, int compiletime)
 
const char * rs_blob_type_to_string (rs_blob_type type)
 
const char * rs_camera_info_to_string (rs_camera_info info)
 
const char * rs_capabilities_to_string (rs_capabilities capability)
 
rs_contextrs_create_context (int api_version, rs_error **error)
 Creates RealSense context that is required for the rest of the API. More...
 
void rs_delete_context (rs_context *context, rs_error **error)
 Frees the relevant context object. More...
 
int rs_device_supports_option (const rs_device *device, rs_option option, rs_error **error)
 Determines if the device allows a specific option to be queried and set. More...
 
void rs_disable_motion_tracking (rs_device *device, rs_error **error)
 Disables motion-tracking handlers. More...
 
void rs_disable_stream (rs_device *device, rs_stream stream, rs_error **error)
 Disables a specific stream. More...
 
const char * rs_distortion_to_string (rs_distortion distortion)
 
void rs_enable_motion_tracking (rs_device *device, rs_motion_callback_ptr on_motion_event, void *motion_handler, rs_timestamp_callback_ptr on_timestamp_event, void *timestamp_handler, rs_error **error)
 Enables and configures motion-tracking data handlers. More...
 
void rs_enable_motion_tracking_cpp (rs_device *device, rs_motion_callback *motion_callback, rs_timestamp_callback *ts_callback, rs_error **error)
 Enables and configures motion-tracking data handlers. More...
 
void rs_enable_stream (rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error **error)
 Enables a specific stream and requests specific properties. More...
 
void rs_enable_stream_ex (rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_output_buffer_format output, rs_error **error)
 Enables a specific stream and requests specific properties. More...
 
void rs_enable_stream_preset (rs_device *device, rs_stream stream, rs_preset preset, rs_error **error)
 Enables a specific stream and requests properties using a preset. More...
 
const char * rs_event_to_string (rs_event_source event)
 
const char * rs_format_to_string (rs_format format)
 
const char * rs_frame_metadata_to_string (rs_frame_metadata md)
 
void rs_free_error (rs_error *error)
 Frees memory of an error object. More...
 
int rs_get_api_version (rs_error **error)
 Retrieves API version from the source code. Evaluate that the value is conformant to the established policies. More...
 
const char * rs_get_capabilities_name (rs_capabilities capability, rs_error **error)
 
int rs_get_detached_frame_bpp (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame bits per pixel. More...
 
const voidrs_get_detached_frame_data (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves data from frame reference. More...
 
rs_format rs_get_detached_frame_format (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame format. More...
 
int rs_get_detached_frame_height (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame intrinsic height. More...
 
double rs_get_detached_frame_metadata (const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
 Retrieves metadata from a frame reference. More...
 
unsigned long long rs_get_detached_frame_number (const rs_frame_ref *frame, rs_error **error)
 Retrieves frame number from frame reference. More...
 
rs_stream rs_get_detached_frame_stream_type (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame stream type. More...
 
int rs_get_detached_frame_stride (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame stride, meaning the actual line width in memory in bytes (not the logical image width) More...
 
double rs_get_detached_frame_timestamp (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves timestamp from frame reference. More...
 
rs_timestamp_domain rs_get_detached_frame_timestamp_domain (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves timestamp domain from frame reference. More...
 
int rs_get_detached_frame_width (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame intrinsic width in pixels. More...
 
int rs_get_detached_framerate (const rs_frame_ref *frame_ref, rs_error **error)
 Retrieves frame intrinsic frame rate. More...
 
rs_devicers_get_device (rs_context *context, int index, rs_error **error)
 Retrieves connected device by index. More...
 
int rs_get_device_count (const rs_context *context, rs_error **error)
 Determines number of connected devices. More...
 
float rs_get_device_depth_scale (const rs_device *device, rs_error **error)
 Retrieves mapping between the units of the depth image and meters. More...
 
void rs_get_device_extrinsics (const rs_device *device, rs_stream from, rs_stream to, rs_extrinsics *extrin, rs_error **error)
 Retrieves extrinsic transformation between the viewpoints of two different streams. More...
 
const char * rs_get_device_firmware_version (const rs_device *device, rs_error **error)
 Retrieves the version of the firmware currently installed on the device. More...
 
const char * rs_get_device_info (const rs_device *device, rs_camera_info info, rs_error **error)
 Retrieves camera specific information, such as versions of various internal componnents. More...
 
const char * rs_get_device_name (const rs_device *device, rs_error **error)
 Retrieves human-readable device model string. More...
 
double rs_get_device_option (rs_device *device, rs_option option, rs_error **error)
 Retrieves the current value of a single option. More...
 
const char * rs_get_device_option_description (rs_device *device, rs_option option, rs_error **error)
 Retrieves a static description of what a particular option does on given device. More...
 
void rs_get_device_option_range (rs_device *device, rs_option option, double *min, double *max, double *step, rs_error **error)
 Retrieves the available range of values for a supported option. More...
 
void rs_get_device_option_range_ex (rs_device *device, rs_option option, double *min, double *max, double *step, double *def, rs_error **error)
 Retrieves the available range of values for a supported option. More...
 
void rs_get_device_options (rs_device *device, const rs_option options[], unsigned int count, double values[], rs_error **error)
 
const char * rs_get_device_serial (const rs_device *device, rs_error **error)
 Retrieves unique serial number of the device. More...
 
const char * rs_get_device_usb_port_id (const rs_device *device, rs_error **error)
 Retrieves the USB port number of the device. More...
 
const char * rs_get_distortion_name (rs_distortion distortion, rs_error **error)
 
const char * rs_get_error_message (const rs_error *error)
 Returns static pointer to error message. More...
 
const char * rs_get_event_name (rs_event_source event, rs_error **error)
 
const char * rs_get_failed_args (const rs_error *error)
 Returns static pointer to arguments of a failing function in case of error. More...
 
const char * rs_get_failed_function (const rs_error *error)
 Returns static pointer to name of a failing function in case of error. More...
 
const char * rs_get_format_name (rs_format format, rs_error **error)
 
const voidrs_get_frame_data (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the contents of the latest frame on a stream. More...
 
unsigned long long rs_get_frame_number (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves frame number. More...
 
double rs_get_frame_timestamp (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves time at which the latest frame on a stream was captured. More...
 
void rs_get_motion_extrinsics_from (const rs_device *device, rs_stream from, rs_extrinsics *extrin, rs_error **error)
 Retrieves extrinsic transformation between specific stream and the motion module. More...
 
void rs_get_motion_intrinsics (const rs_device *device, rs_motion_intrinsics *intrinsic, rs_error **error)
 Retrieves intrinsic camera parameters for a motion module. More...
 
const char * rs_get_option_name (rs_option option, rs_error **error)
 
const char * rs_get_preset_name (rs_preset preset, rs_error **error)
 
rs_format rs_get_stream_format (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the pixel format for a specific stream. More...
 
int rs_get_stream_framerate (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the frame rate for a specific stream. More...
 
int rs_get_stream_height (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the height in pixels of a specific stream, equivalent to the height field from the stream's intrinsic. More...
 
void rs_get_stream_intrinsics (const rs_device *device, rs_stream stream, rs_intrinsics *intrin, rs_error **error)
 Retrieves intrinsic camera parameters for a specific stream. More...
 
void rs_get_stream_mode (const rs_device *device, rs_stream stream, int index, int *width, int *height, rs_format *format, int *framerate, rs_error **error)
 Determines the properties of a specific streaming mode. More...
 
int rs_get_stream_mode_count (const rs_device *device, rs_stream stream, rs_error **error)
 Determines the number of streaming modes available for a given stream. More...
 
const char * rs_get_stream_name (rs_stream stream, rs_error **error)
 
int rs_get_stream_width (const rs_device *device, rs_stream stream, rs_error **error)
 Retrieves the width in pixels of a specific stream, equivalent to the width field from the stream's intrinsic. More...
 
int rs_is_device_streaming (const rs_device *device, rs_error **error)
 Determines if the device is currently streaming. More...
 
int rs_is_motion_tracking_active (rs_device *device, rs_error **error)
 Checks if data acquisition is active. More...
 
int rs_is_stream_enabled (const rs_device *device, rs_stream stream, rs_error **error)
 Determines if a specific stream is enabled. More...
 
void rs_log_to_callback (rs_log_severity min_severity, rs_log_callback_ptr on_log, void *user, rs_error **error)
 Starts logging to user-provided callback (C version) More...
 
void rs_log_to_callback_cpp (rs_log_severity min_severity, rs_log_callback *callback, rs_error **error)
 Starts logging to user-provided callback. More...
 
void rs_log_to_console (rs_log_severity min_severity, rs_error **error)
 Starts logging to console. More...
 
void rs_log_to_file (rs_log_severity min_severity, const char *file_path, rs_error **error)
 Starts logging to file. More...
 
const char * rs_option_to_string (rs_option option)
 
int rs_poll_for_frames (rs_device *device, rs_error **error)
 Checks if new frames are available, without blocking. More...
 
const char * rs_preset_to_string (rs_preset preset)
 
void rs_release_frame (rs_device *device, rs_frame_ref *frame, rs_error **error)
 Releases frame handle. More...
 
void rs_reset_device_options_to_default (rs_device *device, const rs_option *options, int count, rs_error **error)
 Efficiently resets the value of an arbitrary number of options to default. More...
 
void rs_send_blob_to_device (rs_device *device, rs_blob_type type, void *data, int size, rs_error **error)
 Sends arbitrary binary data to the device. More...
 
void rs_set_device_option (rs_device *device, rs_option option, double value, rs_error **error)
 Sets the current value of a single option. More...
 
void rs_set_device_options (rs_device *device, const rs_option options[], unsigned int count, const double values[], rs_error **error)
 
void rs_set_frame_callback (rs_device *device, rs_stream stream, rs_frame_callback_ptr on_frame, void *user, rs_error **error)
 Sets up a frame callback that is called immediately when an image is available, with no synchronization logic applied. More...
 
void rs_set_frame_callback_cpp (rs_device *device, rs_stream stream, rs_frame_callback *callback, rs_error **error)
 Sets up a frame callback that is called immediately when an image is available, with no synchronization logic applied. More...
 
const char * rs_source_to_string (rs_source source)
 
void rs_start_device (rs_device *device, rs_error **error)
 Begins streaming on all enabled streams for this device. More...
 
void rs_start_source (rs_device *device, rs_source source, rs_error **error)
 Begins streaming on all enabled streams for this device. More...
 
void rs_stop_device (rs_device *device, rs_error **error)
 Ends data acquisition for the specified source providers. More...
 
void rs_stop_source (rs_device *device, rs_source source, rs_error **error)
 Ends data acquisition for the specified source providers. More...
 
const char * rs_stream_to_string (rs_stream stream)
 
int rs_supports (rs_device *device, rs_capabilities capability, rs_error **error)
 Determines device capabilities. More...
 
int rs_supports_camera_info (rs_device *device, rs_camera_info info_param, rs_error **error)
 Returns true if given camera information parameter is supported by the device. More...
 
int rs_supports_frame_metadata (const rs_frame_ref *frame, rs_frame_metadata frame_metadata, rs_error **error)
 Determines device metadata. More...
 
const char * rs_timestamp_domain_to_string (rs_timestamp_domain info)
 
void rs_wait_for_frames (rs_device *device, rs_error **error)
 Blocks until new frames are available. More...
 
template<class T >
void rsimpl::stream_args (std::ostream &out, const char *names, const T &last)
 
template<class T , class... U>
void rsimpl::stream_args (std::ostream &out, const char *names, const T &first, const U &...rest)
 
static void rsimpl::translate_exception (const char *name, std::string args, rs_error **error)
 

Macro Definition Documentation

#define HANDLE_EXCEPTIONS_AND_RETURN (   R,
  ... 
)    catch(...) { std::ostringstream ss; rsimpl::stream_args(ss, #__VA_ARGS__, __VA_ARGS__); rsimpl::translate_exception(__FUNCTION__, ss.str(), error); return R; }

Definition at line 42 of file rs.cpp.

#define VALIDATE_ENUM (   ARG)    if(!rsimpl::is_valid(ARG)) { std::ostringstream ss; ss << "bad enum value for argument \"" #ARG "\""; throw std::runtime_error(ss.str()); }

Definition at line 44 of file rs.cpp.

#define VALIDATE_LE (   ARG,
  MAX 
)    if((ARG) > (MAX)) { std::ostringstream ss; ss << "out of range value for argument \"" #ARG "\""; throw std::runtime_error(ss.str()); }

Definition at line 46 of file rs.cpp.

#define VALIDATE_NATIVE_STREAM (   ARG)    VALIDATE_ENUM(ARG); if(ARG >= RS_STREAM_NATIVE_COUNT) { std::ostringstream ss; ss << "argument \"" #ARG "\" must be a native stream"; throw std::runtime_error(ss.str()); }

Definition at line 47 of file rs.cpp.

#define VALIDATE_NOT_NULL (   ARG)    if(!(ARG)) throw std::runtime_error("null pointer passed for argument \"" #ARG "\"");

Definition at line 43 of file rs.cpp.

#define VALIDATE_RANGE (   ARG,
  MIN,
  MAX 
)    if((ARG) < (MIN) || (ARG) > (MAX)) { std::ostringstream ss; ss << "out of range value for argument \"" #ARG "\""; throw std::runtime_error(ss.str()); }

Definition at line 45 of file rs.cpp.

Function Documentation

std::string api_version_to_string ( int  version)

Definition at line 62 of file rs.cpp.

int major ( int  version)

Definition at line 49 of file rs.cpp.

int minor ( int  version)

Definition at line 53 of file rs.cpp.

int patch ( int  version)

Definition at line 57 of file rs.cpp.

void report_version_mismatch ( int  runtime,
int  compiletime 
)

Definition at line 68 of file rs.cpp.

const char* rs_blob_type_to_string ( rs_blob_type  type)

Definition at line 763 of file rs.cpp.

const char* rs_camera_info_to_string ( rs_camera_info  info)

Definition at line 764 of file rs.cpp.

const char* rs_capabilities_to_string ( rs_capabilities  capability)

Definition at line 759 of file rs.cpp.

rs_context* rs_create_context ( int  api_version,
rs_error **  error 
)

Creates RealSense context that is required for the rest of the API.

Parameters
[in]api_versionUsers are expected to pass their version of RS_API_VERSION to make sure they are running the correct librealsense version.
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Context object

Definition at line 75 of file rs.cpp.

void rs_delete_context ( rs_context context,
rs_error **  error 
)

Frees the relevant context object.

This action might invalidate rs_device pointers created from this context.

Parameters
[in]contextObject that is no longer needed
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 106 of file rs.cpp.

int rs_device_supports_option ( const rs_device device,
rs_option  option,
rs_error **  error 
)

Determines if the device allows a specific option to be queried and set.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the option can be queried and set

Definition at line 182 of file rs.cpp.

void rs_disable_motion_tracking ( rs_device device,
rs_error **  error 
)

Disables motion-tracking handlers.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 366 of file rs.cpp.

void rs_disable_stream ( rs_device device,
rs_stream  stream,
rs_error **  error 
)

Disables a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 241 of file rs.cpp.

const char* rs_distortion_to_string ( rs_distortion  distortion)

Definition at line 757 of file rs.cpp.

void rs_enable_motion_tracking ( rs_device device,
rs_motion_callback_ptr  on_motion_event,
void motion_handler,
rs_timestamp_callback_ptr  on_timestamp_event,
void timestamp_handler,
rs_error **  error 
)

Enables and configures motion-tracking data handlers.

Parameters
[in]deviceRelevant RealSense device
[in]on_motion_eventUser-defined routine to be invoked when a motion data arrives
[in]motion_handlerUser data point to be passed to the motion event callback
[in]on_timestamp_eventUser-defined routine to be invoked on timestamp
[in]timestamp_handlerUser data point to be passed to the motion event callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_enable_motion_tracking_cpp()

Definition at line 338 of file rs.cpp.

void rs_enable_motion_tracking_cpp ( rs_device device,
rs_motion_callback motion_callback,
rs_timestamp_callback timestamp_callback,
rs_error **  error 
)

Enables and configures motion-tracking data handlers.

Note:

The rs_enable_motion_tracking_cpp() method is responsible for activating the motion module on-board the device. One of the services it provides is to produce shared and high-resolution timestamps for all components that are connected to it. For Depth, IR, Color and Fisheye sensors, librealsense takes care of that and copies the timestamps on the relevant frames.

However, when you have an external device (such as a compass, magnetometer, light sensor, or other) and wish to synchronize it precisely with image and motion streams, you can connect that sensor to a GPIO that is available on some devices. Every time the sensor signals, you get a timestamp callback with a frame number, source ID, and a timestamp. This timestamp callback allows advanced users to synchronize compass events (presumably coming though I2C or some other method) with RealSense data.

This variant of rs_enable_motion_tracking() is provided specifically to enable passing lambdas with capture lists safely into the library.

Parameters
[in]deviceRelevant RealSense device
[in]motion_callbackUser-defined routine to be invoked when motion data arrives
[in]timestamp_callbackUser-defined routine to be invoked on timestamp
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_enable_motion_tracking()

Definition at line 352 of file rs.cpp.

void rs_enable_stream ( rs_device device,
rs_stream  stream,
int  width,
int  height,
rs_format  format,
int  framerate,
rs_error **  error 
)

Enables a specific stream and requests specific properties.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]widthDesired width of a frame image in pixels, or 0 if any width is acceptable
[in]heightDesired height of a frame image in pixels, or 0 if any height is acceptable
[in]formatPixel format of a frame image, or ANY if any format is acceptable
[in]framerateNumber of frames that will be streamed per second, or 0 if any frame rate is acceptable
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 220 of file rs.cpp.

void rs_enable_stream_ex ( rs_device device,
rs_stream  stream,
int  width,
int  height,
rs_format  format,
int  framerate,
rs_output_buffer_format  output_format,
rs_error **  error 
)

Enables a specific stream and requests specific properties.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]widthDesired width of a frame image in pixels, or 0 if any width is acceptable
[in]heightDesired height of a frame image in pixels, or 0 if any height is acceptable
[in]formatPixel format of a frame image, or ANY if any format is acceptable
[in]framerateNumber of frames that will be streamed per second, or 0 if any frame rate is acceptable
[in]output_formatOutput buffer format (contious in memory / native with pitch)
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 207 of file rs.cpp.

void rs_enable_stream_preset ( rs_device device,
rs_stream  stream,
rs_preset  preset,
rs_error **  error 
)

Enables a specific stream and requests properties using a preset.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]presetPreset to use to enable the stream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 232 of file rs.cpp.

const char* rs_event_to_string ( rs_event_source  event)

Definition at line 761 of file rs.cpp.

const char* rs_format_to_string ( rs_format  format)

Definition at line 755 of file rs.cpp.

const char* rs_frame_metadata_to_string ( rs_frame_metadata  md)

Definition at line 767 of file rs.cpp.

void rs_free_error ( rs_error error)

Frees memory of an error object.

Parameters
[in]errorError object allocated by RealSense API function

Definition at line 748 of file rs.cpp.

int rs_get_api_version ( rs_error **  error)

Retrieves API version from the source code. Evaluate that the value is conformant to the established policies.

Parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Version API encoded into integer value. For example: "1.9.3" becomes "10903".

Definition at line 721 of file rs.cpp.

const char* rs_get_capabilities_name ( rs_capabilities  capability,
rs_error **  error 
)

Definition at line 620 of file rs.cpp.

int rs_get_detached_frame_bpp ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame bits per pixel.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame pad crop

Definition at line 548 of file rs.cpp.

const void* rs_get_detached_frame_data ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves data from frame reference.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pointer to start of the frame data

Definition at line 512 of file rs.cpp.

rs_format rs_get_detached_frame_format ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame format.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame format

Definition at line 555 of file rs.cpp.

int rs_get_detached_frame_height ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame intrinsic height.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Intrinsic height

Definition at line 526 of file rs.cpp.

double rs_get_detached_frame_metadata ( const rs_frame_ref frame,
rs_frame_metadata  frame_metadata,
rs_error **  error 
)

Retrieves metadata from a frame reference.

Parameters
[in]frameCurrent frame reference
[in]frame_metadataMetadata
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Metadata value

Definition at line 458 of file rs.cpp.

unsigned long long rs_get_detached_frame_number ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame number from frame reference.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame number, in milliseconds since the device was started

Definition at line 570 of file rs.cpp.

rs_stream rs_get_detached_frame_stream_type ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame stream type.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Stream type

Definition at line 562 of file rs.cpp.

int rs_get_detached_frame_stride ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame stride, meaning the actual line width in memory in bytes (not the logical image width)

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame pad crop

Definition at line 540 of file rs.cpp.

double rs_get_detached_frame_timestamp ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves timestamp from frame reference.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Timestamp of the frame, in milliseconds since the device was started

Definition at line 498 of file rs.cpp.

rs_timestamp_domain rs_get_detached_frame_timestamp_domain ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves timestamp domain from frame reference.

This method is used to check if two timestamp values are comparable (meaning, are generated from the same clock).

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Timestamp domain of the frame (camera/ microcontroller)

Definition at line 505 of file rs.cpp.

int rs_get_detached_frame_width ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame intrinsic width in pixels.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Intrinsic width

Definition at line 519 of file rs.cpp.

int rs_get_detached_framerate ( const rs_frame_ref frame,
rs_error **  error 
)

Retrieves frame intrinsic frame rate.

Parameters
[in]frameCurrent frame reference
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Intrinsic frame rate

Definition at line 533 of file rs.cpp.

rs_device* rs_get_device ( rs_context context,
int  index,
rs_error **  error 
)

Retrieves connected device by index.

Parameters
contextObject representing librealsense session
[in]indexZero-based index of device to retrieve
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Requested device

Definition at line 120 of file rs.cpp.

int rs_get_device_count ( const rs_context context,
rs_error **  error 
)

Determines number of connected devices.

Parameters
contextObject representing librealsense session
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Device count

Definition at line 113 of file rs.cpp.

float rs_get_device_depth_scale ( const rs_device device,
rs_error **  error 
)

Retrieves mapping between the units of the depth image and meters.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Depth in meters corresponding to a depth value of 1

Definition at line 420 of file rs.cpp.

void rs_get_device_extrinsics ( const rs_device device,
rs_stream  from_stream,
rs_stream  to_stream,
rs_extrinsics extrin,
rs_error **  error 
)

Retrieves extrinsic transformation between the viewpoints of two different streams.

Parameters
[in]deviceRelevant RealSense device
[in]from_streamStream whose coordinate space to transform from
[in]to_streamStream whose coordinate space to transform to
[out]extrinTransformation between the two streams
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 163 of file rs.cpp.

const char* rs_get_device_firmware_version ( const rs_device device,
rs_error **  error 
)

Retrieves the version of the firmware currently installed on the device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Firmware version string, in a format that is specific to device model

Definition at line 156 of file rs.cpp.

const char* rs_get_device_info ( const rs_device device,
rs_camera_info  info,
rs_error **  error 
)

Retrieves camera specific information, such as versions of various internal componnents.

Parameters
[in]deviceRelevant RealSense device
[out]infoInformation that is retrieved
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Requested camera information string, in a format specific to the device model.

Definition at line 142 of file rs.cpp.

const char* rs_get_device_name ( const rs_device device,
rs_error **  error 
)

Retrieves human-readable device model string.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Model string, such as "Intel RealSense F200" or "Intel RealSense R200"

Definition at line 128 of file rs.cpp.

double rs_get_device_option ( rs_device device,
rs_option  option,
rs_error **  error 
)

Retrieves the current value of a single option.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Value of the option

Definition at line 694 of file rs.cpp.

const char* rs_get_device_option_description ( rs_device device,
rs_option  option,
rs_error **  error 
)

Retrieves a static description of what a particular option does on given device.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Value of the option

Definition at line 704 of file rs.cpp.

void rs_get_device_option_range ( rs_device device,
rs_option  option,
double *  min,
double *  max,
double *  step,
rs_error **  error 
)

Retrieves the available range of values for a supported option.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]minMinimum value that is acceptable for this option
[out]maxMaximum value that is acceptable for this option
[out]stepGranularity of options that accept discrete values, or zero if the option accepts continuous values
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 635 of file rs.cpp.

void rs_get_device_option_range_ex ( rs_device device,
rs_option  option,
double *  min,
double *  max,
double *  step,
double *  def,
rs_error **  error 
)

Retrieves the available range of values for a supported option.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption
[out]minMinimum value that is acceptable for this option
[out]maxMaximum value that is acceptable for this option
[out]stepGranularity of options that accept discrete values, or zero if the option accepts continuous values
[out]defDefault value of the option
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 645 of file rs.cpp.

void rs_get_device_options ( rs_device device,
const rs_option  options[],
unsigned int  count,
double  values[],
rs_error **  error 
)

Definition at line 672 of file rs.cpp.

const char* rs_get_device_serial ( const rs_device device,
rs_error **  error 
)

Retrieves unique serial number of the device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Serial number, in a format specific to the device model

Definition at line 135 of file rs.cpp.

const char* rs_get_device_usb_port_id ( const rs_device device,
rs_error **  error 
)

Retrieves the USB port number of the device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
USB port number in a string of format: "##-##"

Definition at line 149 of file rs.cpp.

const char* rs_get_distortion_name ( rs_distortion  distortion,
rs_error **  error 
)

Definition at line 606 of file rs.cpp.

const char* rs_get_error_message ( const rs_error error)

Returns static pointer to error message.

Parameters
[in]errorError object allocated by RealSense API function
Returns
Pointer to error message (memory manager by the error object)

Definition at line 751 of file rs.cpp.

const char* rs_get_event_name ( rs_event_source  event,
rs_error **  error 
)

Definition at line 627 of file rs.cpp.

const char* rs_get_failed_args ( const rs_error error)

Returns static pointer to arguments of a failing function in case of error.

Parameters
[in]errorError object allocated by RealSense API function
Returns
Pointer to arguments string (memory manager by the error object)

Definition at line 750 of file rs.cpp.

const char* rs_get_failed_function ( const rs_error error)

Returns static pointer to name of a failing function in case of error.

Parameters
[in]errorError object allocated by RealSense API function
Returns
Pointer to function name (memory manager by the error object)

Definition at line 749 of file rs.cpp.

const char* rs_get_format_name ( rs_format  format,
rs_error **  error 
)

Definition at line 592 of file rs.cpp.

const void* rs_get_frame_data ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the contents of the latest frame on a stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream whose latest frame is of interest
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pointer to start of the frame data

Definition at line 490 of file rs.cpp.

unsigned long long rs_get_frame_number ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves frame number.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream whose latest frame is of interest
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame number

Definition at line 482 of file rs.cpp.

double rs_get_frame_timestamp ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves time at which the latest frame on a stream was captured.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream whose latest frame is of interest
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Timestamp of the frame, in milliseconds, since the device was started

Definition at line 474 of file rs.cpp.

void rs_get_motion_extrinsics_from ( const rs_device device,
rs_stream  from,
rs_extrinsics extrin,
rs_error **  error 
)

Retrieves extrinsic transformation between specific stream and the motion module.

Parameters
[in]deviceRelevant RealSense device
[in]fromStream
[out]extrinTransformation between the specific stream and motion module
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 173 of file rs.cpp.

void rs_get_motion_intrinsics ( const rs_device device,
rs_motion_intrinsics intrinsic,
rs_error **  error 
)

Retrieves intrinsic camera parameters for a motion module.

Parameters
[in]deviceRelevant RealSense device
[out]intrinsicIntrinsic parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 298 of file rs.cpp.

const char* rs_get_option_name ( rs_option  option,
rs_error **  error 
)

Definition at line 613 of file rs.cpp.

const char* rs_get_preset_name ( rs_preset  preset,
rs_error **  error 
)

Definition at line 599 of file rs.cpp.

rs_format rs_get_stream_format ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the pixel format for a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pixel format of the stream

Definition at line 273 of file rs.cpp.

int rs_get_stream_framerate ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the frame rate for a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Frame rate of the stream, in frames per second

Definition at line 281 of file rs.cpp.

int rs_get_stream_height ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the height in pixels of a specific stream, equivalent to the height field from the stream's intrinsic.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Height in pixels of images from this stream

Definition at line 265 of file rs.cpp.

void rs_get_stream_intrinsics ( const rs_device device,
rs_stream  stream,
rs_intrinsics intrin,
rs_error **  error 
)

Retrieves intrinsic camera parameters for a specific stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]intrinIntrinsic parameters of the stream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 289 of file rs.cpp.

void rs_get_stream_mode ( const rs_device device,
rs_stream  stream,
int  index,
int width,
int height,
rs_format format,
int framerate,
rs_error **  error 
)

Determines the properties of a specific streaming mode.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]indexZero-based index of the streaming mode
[out]widthWidth of a frame image in pixels
[out]heightHeight of a frame image in pixels
[out]formatPixel format of a frame image
[out]framerateNumber of frames that will be streamed per second
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 198 of file rs.cpp.

int rs_get_stream_mode_count ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Determines the number of streaming modes available for a given stream.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
the count of available modes

Definition at line 190 of file rs.cpp.

const char* rs_get_stream_name ( rs_stream  stream,
rs_error **  error 
)

Definition at line 585 of file rs.cpp.

int rs_get_stream_width ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Retrieves the width in pixels of a specific stream, equivalent to the width field from the stream's intrinsic.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Width in pixels of images from this stream

Definition at line 257 of file rs.cpp.

int rs_is_device_streaming ( const rs_device device,
rs_error **  error 
)

Determines if the device is currently streaming.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the device is currently streaming

Definition at line 413 of file rs.cpp.

int rs_is_motion_tracking_active ( rs_device device,
rs_error **  error 
)

Checks if data acquisition is active.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if motion tracking is active

Definition at line 375 of file rs.cpp.

int rs_is_stream_enabled ( const rs_device device,
rs_stream  stream,
rs_error **  error 
)

Determines if a specific stream is enabled.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the stream is currently enabled

Definition at line 249 of file rs.cpp.

void rs_log_to_callback ( rs_log_severity  min_severity,
rs_log_callback_ptr  on_log,
void user,
rs_error **  error 
)

Starts logging to user-provided callback (C version)

Parameters
[in]on_logCallback function pointer
[in]min_severityMinimum severity to be logged
[in]userCustom pointer for the callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 324 of file rs.cpp.

void rs_log_to_callback_cpp ( rs_log_severity  min_severity,
rs_log_callback callback,
rs_error **  error 
)

Starts logging to user-provided callback.

Parameters
[in]callbackPointer to log into (must be created and used from C++)
[in]min_severityMinimum severity to be logged
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 331 of file rs.cpp.

void rs_log_to_console ( rs_log_severity  min_severity,
rs_error **  error 
)

Starts logging to console.

Parameters
[in]min_severityMinimum severity to be logged
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 769 of file rs.cpp.

void rs_log_to_file ( rs_log_severity  min_severity,
const char *  file_path,
rs_error **  error 
)

Starts logging to file.

Parameters
[in]file_pathRelative filename to log to. In case file exists, it will be appended to.
[in]min_severityMinimum severity to be logged
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 775 of file rs.cpp.

const char* rs_option_to_string ( rs_option  option)

Definition at line 758 of file rs.cpp.

int rs_poll_for_frames ( rs_device device,
rs_error **  error 
)

Checks if new frames are available, without blocking.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
1 if new frames are available, 0 if no new frames have arrived

Definition at line 435 of file rs.cpp.

const char* rs_preset_to_string ( rs_preset  preset)

Definition at line 756 of file rs.cpp.

void rs_release_frame ( rs_device device,
rs_frame_ref frame,
rs_error **  error 
)

Releases frame handle.

Parameters
[in]deviceRelevant RealSense device
[in]frameHandle returned either detach, clone_ref or from frame callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Pointer to start of the frame data

Definition at line 577 of file rs.cpp.

void rs_reset_device_options_to_default ( rs_device device,
const rs_option options,
int  count,
rs_error **  error 
)

Efficiently resets the value of an arbitrary number of options to default.

Parameters
[in]deviceRelevant RealSense device
[in]optionsArray of options that should be set to default
[in]countLength of the options array
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 654 of file rs.cpp.

void rs_send_blob_to_device ( rs_device device,
rs_blob_type  type,
void data,
int  size,
rs_error **  error 
)

Sends arbitrary binary data to the device.

Parameters
[in]deviceRelevant RealSense device
[in]typeType of raw data to send to the device
[in]dataRaw data pointer to send
[in]sizeSize, in bytes of the raw data to send
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 731 of file rs.cpp.

void rs_set_device_option ( rs_device device,
rs_option  option,
double  value,
rs_error **  error 
)

Sets the current value of a single option.

Parameters
[in]deviceRelevant RealSense device
[in]optionOption whose value should be set
[in]valueValue of the option
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 712 of file rs.cpp.

void rs_set_device_options ( rs_device device,
const rs_option  options[],
unsigned int  count,
const double  values[],
rs_error **  error 
)

Definition at line 683 of file rs.cpp.

void rs_set_frame_callback ( rs_device device,
rs_stream  stream,
rs_frame_callback_ptr  on_frame,
void user,
rs_error **  error 
)

Sets up a frame callback that is called immediately when an image is available, with no synchronization logic applied.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]on_frameCallback that will receive the frame data and timestamp
[in]userUser data point to be passed to the callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_set_frame_callback_cpp()

Definition at line 306 of file rs.cpp.

void rs_set_frame_callback_cpp ( rs_device device,
rs_stream  stream,
rs_frame_callback callback,
rs_error **  error 
)

Sets up a frame callback that is called immediately when an image is available, with no synchronization logic applied.

This variant of rs_set_frame_callback() is provided specifically to enable passing lambdas with capture lists safely into the library.

Parameters
[in]deviceRelevant RealSense device
[in]streamStream
[in]callbackCallback that will receive the frame data and timestamp
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
See also
rs_set_frame_callback()

Definition at line 315 of file rs.cpp.

const char* rs_source_to_string ( rs_source  source)

Definition at line 760 of file rs.cpp.

void rs_start_device ( rs_device device,
rs_error **  error 
)

Begins streaming on all enabled streams for this device.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 383 of file rs.cpp.

void rs_start_source ( rs_device device,
rs_source  source,
rs_error **  error 
)

Begins streaming on all enabled streams for this device.

Parameters
[in]deviceRelevant RealSense device
[in]sourceData source to be activated
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 390 of file rs.cpp.

void rs_stop_device ( rs_device device,
rs_error **  error 
)

Ends data acquisition for the specified source providers.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 398 of file rs.cpp.

void rs_stop_source ( rs_device device,
rs_source  source,
rs_error **  error 
)

Ends data acquisition for the specified source providers.

Parameters
[in]deviceRelevant RealSense device
[in]sourceData source to be terminated
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 405 of file rs.cpp.

const char* rs_stream_to_string ( rs_stream  stream)

Definition at line 754 of file rs.cpp.

int rs_supports ( rs_device device,
rs_capabilities  capability,
rs_error **  error 
)

Determines device capabilities.

Parameters
[in]deviceRelevant RealSense device
[in]capabilityCapability to check
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if device has this capability

Definition at line 442 of file rs.cpp.

int rs_supports_camera_info ( rs_device device,
rs_camera_info  info_param,
rs_error **  error 
)

Returns true if given camera information parameter is supported by the device.

Parameters
[in]deviceRelevant RealSense device
[in]info_paramParameter to check
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if the parameter both exists and is well-defined for the specific device

Definition at line 450 of file rs.cpp.

int rs_supports_frame_metadata ( const rs_frame_ref frame,
rs_frame_metadata  frame_metadata,
rs_error **  error 
)

Determines device metadata.

Parameters
[in]frameCurrent frame reference
[in]frame_metadataMetadata
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true if device has this metadata

Definition at line 466 of file rs.cpp.

const char* rs_timestamp_domain_to_string ( rs_timestamp_domain  info)

Definition at line 765 of file rs.cpp.

void rs_wait_for_frames ( rs_device device,
rs_error **  error 
)

Blocks until new frames are available.

Parameters
[in]deviceRelevant RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.

Definition at line 428 of file rs.cpp.



librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:18