Classes | Functions
rs.cpp File Reference
#include <functional>
#include "api.h"
#include "log.h"
#include "context.h"
#include "device.h"
#include "algo.h"
#include "core/debug.h"
#include "core/motion.h"
#include "core/extension.h"
#include "media/record/record_device.h"
#include <media/ros/ros_writer.h>
#include <media/ros/ros_reader.h>
#include "core/advanced_mode.h"
#include "source.h"
#include "core/processing.h"
#include "proc/synthetic-stream.h"
#include "proc/processing-blocks-factory.h"
#include "proc/colorizer.h"
#include "proc/pointcloud.h"
#include "proc/threshold.h"
#include "proc/units-transform.h"
#include "proc/disparity-transform.h"
#include "proc/syncer-processing-block.h"
#include "proc/decimation-filter.h"
#include "proc/spatial-filter.h"
#include "proc/zero-order.h"
#include "proc/hole-filling-filter.h"
#include "proc/color-formats-converter.h"
#include "proc/rates-printer.h"
#include "proc/hdr-merge.h"
#include "proc/sequence-id-filter.h"
#include "media/playback/playback_device.h"
#include "stream.h"
#include "../include/librealsense2/h/rs_types.h"
#include "pipeline/pipeline.h"
#include "environment.h"
#include "proc/temporal-filter.h"
#include "proc/depth-decompress.h"
#include "software-device.h"
#include "global_timestamp_reader.h"
#include "auto-calibrated-device.h"
#include "terminal-parser.h"
#include "firmware_logger_device.h"
#include "device-calibration.h"
#include "calibrated-sensor.h"
Include dependency graph for rs.cpp:

Go to the source code of this file.

Classes

class  calibration_change_callback
 
class  on_log_callback
 
struct  rs2_config
 
struct  rs2_context
 
struct  rs2_device_hub
 
struct  rs2_error
 
struct  rs2_firmware_log_message
 
struct  rs2_firmware_log_parsed_message
 
struct  rs2_frame_queue
 
struct  rs2_pipeline
 
struct  rs2_pipeline_profile
 
struct  rs2_processing_block_list
 
struct  rs2_sensor
 
struct  rs2_sensor_list
 
struct  rs2_stream_profile_list
 
struct  rs2_terminal_parser
 

Functions

rs2_framers2_allocate_composite_frame (rs2_source *source, rs2_frame **frames, int count, rs2_error **error) BEGIN_API_CALL
 
rs2_framers2_allocate_points (rs2_source *source, const rs2_stream_profile *new_stream, rs2_frame *original, rs2_error **error) BEGIN_API_CALL
 
rs2_framers2_allocate_synthetic_motion_frame (rs2_source *source, const rs2_stream_profile *new_stream, rs2_frame *original, rs2_extension frame_type, rs2_error **error) BEGIN_API_CALL
 
rs2_framers2_allocate_synthetic_video_frame (rs2_source *source, const rs2_stream_profile *new_stream, rs2_frame *original, int new_bpp, int new_width, int new_height, int new_stride, rs2_extension frame_type, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_ambient_light_to_string (rs2_ambient_light ambient)
 
const char * rs2_cah_trigger_to_string (rs2_cah_trigger mode)
 
const char * rs2_calib_target_type_to_string (rs2_calib_target_type type)
 
const char * rs2_calibration_status_to_string (rs2_calibration_status status)
 
const char * rs2_calibration_type_to_string (rs2_calibration_type type)
 
const char * rs2_camera_info_to_string (rs2_camera_info info)
 
rs2_stream_profilers2_clone_stream_profile (const rs2_stream_profile *mode, rs2_stream stream, int stream_idx, rs2_format fmt, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_clone_video_stream_profile (const rs2_stream_profile *mode, rs2_stream stream, int index, rs2_format format, int width, int height, const rs2_intrinsics *intr, rs2_error **error) BEGIN_API_CALL
 
void rs2_close (const rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
int rs2_config_can_resolve (rs2_config *config, rs2_pipeline *pipe, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_disable_all_streams (rs2_config *config, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_disable_indexed_stream (rs2_config *config, rs2_stream stream, int index, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_disable_stream (rs2_config *config, rs2_stream stream, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_enable_all_stream (rs2_config *config, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_enable_device (rs2_config *config, const char *serial, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_enable_device_from_file (rs2_config *config, const char *file, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_enable_device_from_file_repeat_option (rs2_config *config, const char *file, int repeat_playback, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_enable_record_to_file (rs2_config *config, const char *file, rs2_error **error) BEGIN_API_CALL
 
void rs2_config_enable_stream (rs2_config *config, rs2_stream stream, int index, int width, int height, rs2_format format, int framerate, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_config_resolve (rs2_config *config, rs2_pipeline *pipe, rs2_error **error) BEGIN_API_CALL
 
void rs2_connect_tm2_controller (const rs2_device *device, const unsigned char *mac, rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_context_add_device (rs2_context *ctx, const char *file, rs2_error **error) BEGIN_API_CALL
 
void rs2_context_add_software_device (rs2_context *ctx, rs2_device *dev, rs2_error **error) BEGIN_API_CALL
 
void rs2_context_remove_device (rs2_context *ctx, const char *file, rs2_error **error) BEGIN_API_CALL
 
void rs2_context_unload_tracking_module (rs2_context *ctx, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_align (rs2_stream align_to, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_colorizer (rs2_error **error) BEGIN_API_CALL
 
rs2_configrs2_create_config (rs2_error **error) BEGIN_API_CALL
 
rs2_contextrs2_create_context (int api_version, rs2_error **error) BEGIN_API_CALL
 Creates RealSense context that is required for the rest of the API. More...
 
rs2_processing_blockrs2_create_decimation_filter_block (rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_create_device (const rs2_device_list *info_list, int index, rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_create_device_from_sensor (const rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
rs2_device_hubrs2_create_device_hub (const rs2_context *context, rs2_error **error) BEGIN_API_CALL
 Creates RealSense device_hub . More...
 
rs2_processing_blockrs2_create_disparity_transform_block (unsigned char transform_to_disparity, rs2_error **error) BEGIN_API_CALL
 
rs2_errorrs2_create_error (const char *what, const char *name, const char *args, rs2_exception_type type) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_create_flash_backup (const rs2_device *device, rs2_update_progress_callback_ptr callback, void *client_data, rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_create_flash_backup_cpp (const rs2_device *device, rs2_update_progress_callback *callback, rs2_error **error) BEGIN_API_CALL
 
rs2_frame_queuers2_create_frame_queue (int capacity, rs2_error **error) BEGIN_API_CALL
 
rs2_firmware_log_messagers2_create_fw_log_message (rs2_device *dev, rs2_error **error) BEGIN_API_CALL
 Creates RealSense firmware log message. More...
 
rs2_firmware_log_parsed_messagers2_create_fw_log_parsed_message (rs2_device *dev, rs2_error **error) BEGIN_API_CALL
 Creates RealSense firmware log parsed message. More...
 
rs2_processing_blockrs2_create_hdr_merge_processing_block (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_hole_filling_filter_block (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_huffman_depth_decompress_block (rs2_error **error) BEGIN_API_CALL
 
rs2_contextrs2_create_mock_context (int api_version, const char *filename, const char *section, rs2_error **error) BEGIN_API_CALL
 
rs2_contextrs2_create_mock_context_versioned (int api_version, const char *filename, const char *section, const char *min_api_version, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeliners2_create_pipeline (rs2_context *ctx, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_pointcloud (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_processing_block (rs2_frame_processor_callback *proc, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_processing_block_fptr (rs2_frame_processor_callback_ptr proc, void *context, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_rates_printer_block (rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_create_record_device (const rs2_device *device, const char *file, rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_create_record_device_ex (const rs2_device *device, const char *file, int compression_enabled, rs2_error **error) BEGIN_API_CALL
 
rs2_contextrs2_create_recording_context (int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error) BEGIN_API_CALL
 
rs2_sensorrs2_create_sensor (const rs2_sensor_list *list, int index, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_sequence_id_filter (rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_create_software_device (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_spatial_filter_block (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_sync_processing_block (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_temporal_filter_block (rs2_error **error) BEGIN_API_CALL
 
rs2_terminal_parserrs2_create_terminal_parser (const char *xml_content, rs2_error **error) BEGIN_API_CALL
 Creates RealSense terminal parser. More...
 
rs2_processing_blockrs2_create_threshold (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_units_transform (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_yuy_decoder (rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_create_zero_order_invalidation_block (rs2_error **error) BEGIN_API_CALL
 
void rs2_delete_config (rs2_config *config) BEGIN_API_CALL
 
void rs2_delete_context (rs2_context *context) BEGIN_API_CALL
 Frees the relevant context object. More...
 
void rs2_delete_device (rs2_device *device) BEGIN_API_CALL
 
void rs2_delete_device_hub (const rs2_device_hub *hub) BEGIN_API_CALL
 Frees the relevant device hub object. More...
 
void rs2_delete_device_list (rs2_device_list *list) BEGIN_API_CALL
 
void rs2_delete_frame_queue (rs2_frame_queue *queue) BEGIN_API_CALL
 
void rs2_delete_fw_log_message (rs2_firmware_log_message *msg) BEGIN_API_CALL
 
void rs2_delete_fw_log_parsed_message (rs2_firmware_log_parsed_message *fw_log_parsed_msg) BEGIN_API_CALL
 Deletes RealSense firmware log parsed message. More...
 
void rs2_delete_options_list (rs2_options_list *list) BEGIN_API_CALL
 
void rs2_delete_pipeline (rs2_pipeline *pipe) BEGIN_API_CALL
 
void rs2_delete_pipeline_profile (rs2_pipeline_profile *profile) BEGIN_API_CALL
 
void rs2_delete_processing_block (rs2_processing_block *block) BEGIN_API_CALL
 
void rs2_delete_raw_data (const rs2_raw_data_buffer *buffer) BEGIN_API_CALL
 
void rs2_delete_recommended_processing_blocks (rs2_processing_block_list *list) BEGIN_API_CALL
 
void rs2_delete_sensor (rs2_sensor *device) BEGIN_API_CALL
 
void rs2_delete_sensor_list (rs2_sensor_list *list) BEGIN_API_CALL
 
void rs2_delete_stream_profile (rs2_stream_profile *p) BEGIN_API_CALL
 
void rs2_delete_stream_profiles_list (rs2_stream_profile_list *list) BEGIN_API_CALL
 
void rs2_delete_terminal_parser (rs2_terminal_parser *terminal_parser) BEGIN_API_CALL
 Deletes RealSense terminal parser. More...
 
float rs2_depth_frame_get_distance (const rs2_frame *frame_ref, int x, int y, rs2_error **error) BEGIN_API_CALL
 
float rs2_depth_frame_get_units (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
float rs2_depth_stereo_frame_get_baseline (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
int rs2_device_hub_is_device_connected (const rs2_device_hub *hub, const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_device_hub_wait_for_device (const rs2_device_hub *hub, rs2_error **error) BEGIN_API_CALL
 
int rs2_device_list_contains (const rs2_device_list *info_list, const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_digital_gain_to_string (rs2_digital_gain gain)
 
void rs2_disconnect_tm2_controller (const rs2_device *device, int id, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_distortion_to_string (rs2_distortion distortion)
 
int rs2_embedded_frames_count (rs2_frame *composite, rs2_error **error) BEGIN_API_CALL
 
void rs2_enable_rolling_log_file (unsigned max_size, rs2_error **error) BEGIN_API_CALL
 
void rs2_enqueue_frame (rs2_frame *frame, void *queue) BEGIN_API_CALL
 
void rs2_enter_update_state (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_exception_type_to_string (rs2_exception_type type)
 
const rs2_raw_data_bufferrs2_export_localization_map (const rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
void rs2_export_to_ply (const rs2_frame *frame, const char *fname, rs2_frame *texture, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_extension_to_string (rs2_extension type)
 
const char * rs2_extension_type_to_string (rs2_extension type)
 
rs2_framers2_extract_frame (rs2_frame *composite, int index, rs2_error **error) BEGIN_API_CALL
 
void rs2_extract_target_dimensions (const rs2_frame *frame_ref, rs2_calib_target_type calib_type, float *target_dims, unsigned int target_dims_size, rs2_error **error) BEGIN_API_CALL
 
void rs2_flush_queue (rs2_frame_queue *queue, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_format_to_string (rs2_format format)
 
void rs2_frame_add_ref (rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_frame_metadata_to_string (rs2_frame_metadata_value metadata)
 
const char * rs2_frame_metadata_value_to_string (rs2_frame_metadata_value metadata)
 
void rs2_free_error (rs2_error *error)
 
const unsigned char * rs2_fw_log_message_data (rs2_firmware_log_message *msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log message data. More...
 
rs2_log_severity rs2_fw_log_message_severity (const rs2_firmware_log_message *msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log message severity. More...
 
int rs2_fw_log_message_size (rs2_firmware_log_message *msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log message size. More...
 
unsigned int rs2_fw_log_message_timestamp (rs2_firmware_log_message *msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log message timestamp. More...
 
rs2_stream_profile_listrs2_get_active_streams (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_api_version (rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_get_calibration_table (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profile_listrs2_get_debug_stream_profiles (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
float rs2_get_depth_scale (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_device_count (const rs2_device_list *list, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_device_info (const rs2_device *dev, rs2_camera_info info, rs2_error **error) BEGIN_API_CALL
 
void rs2_get_dsm_params (const rs2_sensor *sensor, rs2_dsm_params *p_params_out, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_error_message (const rs2_error *error)
 
void rs2_get_extrinsics (const rs2_stream_profile *from, const rs2_stream_profile *to, rs2_extrinsics *extrin, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_failed_args (const rs2_error *error)
 
const char * rs2_get_failed_function (const rs2_error *error)
 
int rs2_get_flash_log (rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense flash log - this is a fw log that has been written in the device during the previous shutdown of the device. More...
 
int rs2_get_frame_bits_per_pixel (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
const voidrs2_get_frame_data (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_frame_data_size (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_frame_height (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
rs2_metadata_type rs2_get_frame_metadata (const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error) BEGIN_API_CALL
 
unsigned long long rs2_get_frame_number (const rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_frame_points_count (const rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
rs2_sensorrs2_get_frame_sensor (const rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
const rs2_stream_profilers2_get_frame_stream_profile (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_frame_stride_in_bytes (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
rs2_pixelrs2_get_frame_texture_coordinates (const rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
rs2_time_t rs2_get_frame_timestamp (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
rs2_timestamp_domain rs2_get_frame_timestamp_domain (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
rs2_vertexrs2_get_frame_vertices (const rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_frame_width (const rs2_frame *frame_ref, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_full_log_message (rs2_log_message const *msg, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_fw_log (rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log. More...
 
const char * rs2_get_fw_log_parsed_file_name (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message file name. More...
 
unsigned int rs2_get_fw_log_parsed_line (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message relevant line (in the file that is returned by rs2_get_fw_log_parsed_file_name). More...
 
const char * rs2_get_fw_log_parsed_message (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message. More...
 
unsigned int rs2_get_fw_log_parsed_sequence_id (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message sequence id - cyclic number of FW log with [0..15] range. More...
 
rs2_log_severity rs2_get_fw_log_parsed_severity (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message severity. More...
 
const char * rs2_get_fw_log_parsed_thread_name (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message thread name. More...
 
unsigned int rs2_get_fw_log_parsed_timestamp (rs2_firmware_log_parsed_message *fw_log_parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parsed message timestamp. More...
 
rs2_exception_type rs2_get_librealsense_exception_type (const rs2_error *error)
 
const char * rs2_get_log_message_filename (rs2_log_message const *msg, rs2_error **error) BEGIN_API_CALL
 
unsigned rs2_get_log_message_line_number (rs2_log_message const *msg, rs2_error **error) BEGIN_API_CALL
 
float rs2_get_max_usable_depth_range (rs2_sensor const *sensor, rs2_error **error) BEGIN_API_CALL
 
void rs2_get_motion_intrinsics (const rs2_stream_profile *mode, rs2_motion_device_intrinsic *intrinsics, rs2_error **error) BEGIN_API_CALL
 
rs2_notification_category rs2_get_notification_category (rs2_notification *notification, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_notification_description (rs2_notification *notification, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_notification_serialized_data (rs2_notification *notification, rs2_error **error) BEGIN_API_CALL
 
rs2_log_severity rs2_get_notification_severity (rs2_notification *notification, rs2_error **error) BEGIN_API_CALL
 
rs2_time_t rs2_get_notification_timestamp (rs2_notification *notification, rs2_error **error) BEGIN_API_CALL
 
unsigned int rs2_get_number_of_fw_logs (rs2_device *dev, rs2_error **error) BEGIN_API_CALL
 Returns number of fw logs already polled from device but not by user yet. More...
 
float rs2_get_option (const rs2_options *options, rs2_option option, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_option_description (const rs2_options *options, rs2_option option, rs2_error **error) BEGIN_API_CALL
 
rs2_option rs2_get_option_from_list (const rs2_options_list *options, int i, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_option_name (const rs2_options *options, rs2_option option, rs2_error **error) BEGIN_API_CALL
 
void rs2_get_option_range (const rs2_options *options, rs2_option option, float *min, float *max, float *step, float *def, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_option_value_description (const rs2_options *options, rs2_option option, float value, rs2_error **error) BEGIN_API_CALL
 
rs2_options_listrs2_get_options_list (const rs2_options *options, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_options_list_size (const rs2_options_list *options, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_blockrs2_get_processing_block (const rs2_processing_block_list *list, int index, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_processing_block_info (const rs2_processing_block *block, rs2_camera_info info, rs2_error **error) BEGIN_API_CALL
 
const unsigned char * rs2_get_raw_data (const rs2_raw_data_buffer *buffer, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_raw_data_size (const rs2_raw_data_buffer *buffer, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_get_raw_log_message (rs2_log_message const *msg, rs2_error **error) BEGIN_API_CALL
 
rs2_processing_block_listrs2_get_recommended_processing_blocks (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_recommended_processing_blocks_count (const rs2_processing_block_list *list, rs2_error **error) BEGIN_API_CALL
 
void rs2_get_region_of_interest (const rs2_sensor *sensor, int *min_x, int *min_y, int *max_x, int *max_y, rs2_error **error) BEGIN_API_CALL
 gets the active region of interest to be used by auto-exposure algorithm More...
 
const char * rs2_get_sensor_info (const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_sensors_count (const rs2_sensor_list *list, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_static_node (const rs2_sensor *sensor, const char *guid, rs2_vector *pos, rs2_quaternion *orient, rs2_error **error) BEGIN_API_CALL
 
float rs2_get_stereo_baseline (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
const rs2_stream_profilers2_get_stream_profile (const rs2_stream_profile_list *list, int index, rs2_error **error) BEGIN_API_CALL
 
void rs2_get_stream_profile_data (const rs2_stream_profile *mode, rs2_stream *stream, rs2_format *format, int *index, int *unique_id, int *framerate, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profile_listrs2_get_stream_profiles (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
int rs2_get_stream_profiles_count (const rs2_stream_profile_list *list, rs2_error **error) BEGIN_API_CALL
 
rs2_time_t rs2_get_time (rs2_error **error) BEGIN_API_CALL
 
void rs2_get_video_stream_intrinsics (const rs2_stream_profile *from, rs2_intrinsics *intr, rs2_error **error) BEGIN_API_CALL
 
void rs2_get_video_stream_resolution (const rs2_stream_profile *from, int *width, int *height, rs2_error **error) BEGIN_API_CALL
 
void rs2_hardware_reset (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_host_perf_mode_to_string (rs2_host_perf_mode mode)
 
int rs2_import_localization_map (const rs2_sensor *sensor, const unsigned char *lmap_blob, unsigned int blob_size, rs2_error **error) BEGIN_API_CALL
 
int rs2_init_fw_log_parser (rs2_device *dev, const char *xml_content, rs2_error **error) BEGIN_API_CALL
 Initializes RealSense firmware logs parser in device. More...
 
int rs2_is_device_extendable_to (const rs2_device *dev, rs2_extension extension, rs2_error **error) BEGIN_API_CALL
 
int rs2_is_frame_extendable_to (const rs2_frame *f, rs2_extension extension_type, rs2_error **error) BEGIN_API_CALL
 
int rs2_is_option_read_only (const rs2_options *options, rs2_option option, rs2_error **error) BEGIN_API_CALL
 
int rs2_is_processing_block_extendable_to (const rs2_processing_block *f, rs2_extension extension_type, rs2_error **error) BEGIN_API_CALL
 
int rs2_is_sensor_extendable_to (const rs2_sensor *sensor, rs2_extension extension_type, rs2_error **error) BEGIN_API_CALL
 
int rs2_is_stream_profile_default (const rs2_stream_profile *profile, rs2_error **error) BEGIN_API_CALL
 
void rs2_keep_frame (rs2_frame *frame) BEGIN_API_CALL
 
const char * rs2_l500_visual_preset_to_string (rs2_l500_visual_preset preset)
 
void rs2_load_json (rs2_device *dev, const void *json_content, unsigned content_size, rs2_error **error) BEGIN_API_CALL
 
int rs2_load_wheel_odometry_config (const rs2_sensor *sensor, const unsigned char *odometry_blob, unsigned int blob_size, rs2_error **error) BEGIN_API_CALL
 
void rs2_log (rs2_log_severity severity, const char *message, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_log_severity_to_string (rs2_log_severity severity)
 
void rs2_log_to_callback (rs2_log_severity min_severity, rs2_log_callback_ptr on_log, void *arg, rs2_error **error) BEGIN_API_CALL
 
void rs2_log_to_callback_cpp (rs2_log_severity min_severity, rs2_log_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_log_to_console (rs2_log_severity min_severity, rs2_error **error) BEGIN_API_CALL
 
void rs2_log_to_file (rs2_log_severity min_severity, const char *file_path, rs2_error **error) BEGIN_API_CALL
 
void rs2_loopback_disable (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_loopback_enable (const rs2_device *device, const char *from_file, rs2_error **error) BEGIN_API_CALL
 
int rs2_loopback_is_enabled (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_notification_category_to_string (rs2_notification_category category)
 
void rs2_open (rs2_sensor *sensor, const rs2_stream_profile *profile, rs2_error **error) BEGIN_API_CALL
 
void rs2_open_multiple (rs2_sensor *sensor, const rs2_stream_profile **profiles, int count, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_option_to_string (rs2_option option)
 
void rs2_override_dsm_params (const rs2_sensor *sensor, rs2_dsm_params const *p_params, rs2_error **error) BEGIN_API_CALL
 
void rs2_override_extrinsics (const rs2_sensor *sensor, const rs2_extrinsics *extrinsics, rs2_error **error) BEGIN_API_CALL
 Override extrinsics of a given sensor that supports calibrated_sensor. More...
 
void rs2_override_intrinsics (const rs2_sensor *sensor, const rs2_intrinsics *intrinsics, rs2_error **error) BEGIN_API_CALL
 Override intrinsics of a given sensor that supports calibrated_sensor. More...
 
int rs2_parse_firmware_log (rs2_device *dev, rs2_firmware_log_message *fw_log_msg, rs2_firmware_log_parsed_message *parsed_msg, rs2_error **error) BEGIN_API_CALL
 Gets RealSense firmware log parser. More...
 
rs2_pipeline_profilers2_pipeline_get_active_profile (rs2_pipeline *pipe, rs2_error **error) BEGIN_API_CALL
 
int rs2_pipeline_poll_for_frames (rs2_pipeline *pipe, rs2_frame **output_frame, rs2_error **error) BEGIN_API_CALL
 
rs2_devicers2_pipeline_profile_get_device (rs2_pipeline_profile *profile, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profile_listrs2_pipeline_profile_get_streams (rs2_pipeline_profile *profile, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_pipeline_start (rs2_pipeline *pipe, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_pipeline_start_with_callback (rs2_pipeline *pipe, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_pipeline_start_with_callback_cpp (rs2_pipeline *pipe, rs2_frame_callback *callback, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_pipeline_start_with_config (rs2_pipeline *pipe, rs2_config *config, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_pipeline_start_with_config_and_callback (rs2_pipeline *pipe, rs2_config *config, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error) BEGIN_API_CALL
 
rs2_pipeline_profilers2_pipeline_start_with_config_and_callback_cpp (rs2_pipeline *pipe, rs2_config *config, rs2_frame_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_pipeline_stop (rs2_pipeline *pipe, rs2_error **error) BEGIN_API_CALL
 
int rs2_pipeline_try_wait_for_frames (rs2_pipeline *pipe, rs2_frame **output_frame, unsigned int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
rs2_framers2_pipeline_wait_for_frames (rs2_pipeline *pipe, unsigned int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
rs2_playback_status rs2_playback_device_get_current_status (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_playback_device_get_file_path (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
int rs2_playback_device_is_real_time (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_device_pause (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_device_resume (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_device_set_playback_speed (const rs2_device *device, float speed, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_device_set_real_time (const rs2_device *device, int real_time, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_device_set_status_changed_callback (const rs2_device *device, rs2_playback_status_changed_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_device_stop (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
unsigned long long int rs2_playback_get_duration (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
unsigned long long int rs2_playback_get_position (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_playback_seek (const rs2_device *device, long long int time, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_playback_status_to_string (rs2_playback_status status)
 
int rs2_poll_for_frame (rs2_frame_queue *queue, rs2_frame **output_frame, rs2_error **error) BEGIN_API_CALL
 
void rs2_pose_frame_get_pose_data (const rs2_frame *frame, rs2_pose *pose, rs2_error **error) BEGIN_API_CALL
 
void rs2_process_frame (rs2_processing_block *block, rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
int rs2_processing_block_register_simple_option (rs2_processing_block *block, rs2_option option_id, float min, float max, float step, float def, rs2_error **error) BEGIN_API_CALL
 
rs2_device_listrs2_query_devices (const rs2_context *context, rs2_error **error) BEGIN_API_CALL
 
rs2_device_listrs2_query_devices_ex (const rs2_context *context, int product_mask, rs2_error **error) BEGIN_API_CALL
 
rs2_sensor_listrs2_query_sensors (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_record_device_filename (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_record_device_pause (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_record_device_resume (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
void rs2_register_calibration_change_callback (rs2_device *dev, rs2_calibration_change_callback_ptr callback, void *user, rs2_error **error) BEGIN_API_CALL
 
void rs2_register_calibration_change_callback_cpp (rs2_device *dev, rs2_calibration_change_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_register_extrinsics (const rs2_stream_profile *from, const rs2_stream_profile *to, rs2_extrinsics extrin, rs2_error **error) BEGIN_API_CALL
 
void rs2_release_frame (rs2_frame *frame) BEGIN_API_CALL
 
int rs2_remove_static_node (const rs2_sensor *sensor, const char *guid, rs2_error **error) BEGIN_API_CALL
 
void rs2_reset_logger (rs2_error **error) BEGIN_API_CALL
 
void rs2_reset_sensor_calibration (rs2_sensor const *sensor, rs2_error **error) BEGIN_API_CALL
 
void rs2_reset_to_factory_calibration (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_run_on_chip_calibration (rs2_device *device, const void *json_content, int content_size, float *health, rs2_update_progress_callback_ptr progress_callback, void *user, int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_run_on_chip_calibration_cpp (rs2_device *device, const void *json_content, int content_size, float *health, rs2_update_progress_callback *progress_callback, int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_run_tare_calibration (rs2_device *device, float ground_truth_mm, const void *json_content, int content_size, rs2_update_progress_callback_ptr progress_callback, void *user, int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_run_tare_calibration_cpp (rs2_device *device, float ground_truth_mm, const void *json_content, int content_size, rs2_update_progress_callback *progress_callback, int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
const rs2_raw_data_bufferrs2_send_and_receive_raw_data (rs2_device *device, void *raw_data_to_send, unsigned size_of_raw_data_to_send, rs2_error **error) BEGIN_API_CALL
 
int rs2_send_wheel_odometry (const rs2_sensor *sensor, char wo_sensor_id, unsigned int frame_num, const rs2_vector translational_velocity, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_sensor_mode_to_string (rs2_sensor_mode mode)
 
rs2_raw_data_bufferrs2_serialize_json (rs2_device *dev, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_calibration_table (const rs2_device *device, const void *calibration, int calibration_size, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_devices_changed_callback (const rs2_context *context, rs2_devices_changed_callback_ptr callback, void *user, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_devices_changed_callback_cpp (rs2_context *context, rs2_devices_changed_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_extrinsics (const rs2_sensor *from_sensor, const rs2_stream_profile *from_profile, rs2_sensor *to_sensor, const rs2_stream_profile *to_profile, const rs2_extrinsics *extrinsics, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_intrinsics (const rs2_sensor *sensor, const rs2_stream_profile *profile, const rs2_intrinsics *intrinsics, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_motion_device_intrinsics (const rs2_sensor *sensor, const rs2_stream_profile *profile, const rs2_motion_device_intrinsic *intrinsics, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_notifications_callback (const rs2_sensor *sensor, rs2_notification_callback_ptr on_notification, void *user, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_notifications_callback_cpp (const rs2_sensor *sensor, rs2_notifications_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_option (const rs2_options *options, rs2_option option, float value, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_region_of_interest (const rs2_sensor *sensor, int min_x, int min_y, int max_x, int max_y, rs2_error **error) BEGIN_API_CALL
 sets the active region of interest to be used by auto-exposure algorithm More...
 
int rs2_set_static_node (const rs2_sensor *sensor, const char *guid, const rs2_vector pos, const rs2_quaternion orient, rs2_error **error) BEGIN_API_CALL
 
void rs2_set_stream_profile_data (rs2_stream_profile *mode, rs2_stream stream, int index, rs2_format format, rs2_error **error) BEGIN_API_CALL
 
rs2_sensorrs2_software_device_add_sensor (rs2_device *dev, const char *sensor_name, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_device_create_matcher (rs2_device *dev, rs2_matchers m, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_device_register_info (rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_device_set_destruction_callback (const rs2_device *dev, rs2_software_device_destruction_callback_ptr on_destruction, void *user, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_device_set_destruction_callback_cpp (const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_device_update_info (rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_software_sensor_add_motion_stream (rs2_sensor *sensor, rs2_motion_stream motion_stream, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_software_sensor_add_motion_stream_ex (rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_add_option (rs2_sensor *sensor, rs2_option option, float min, float max, float step, float def, int is_writable, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_software_sensor_add_pose_stream (rs2_sensor *sensor, rs2_pose_stream pose_stream, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_software_sensor_add_pose_stream_ex (rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_add_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_software_sensor_add_video_stream (rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error) BEGIN_API_CALL
 
rs2_stream_profilers2_software_sensor_add_video_stream_ex (rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_detach (rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_on_motion_frame (rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_on_notification (rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_on_pose_frame (rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_on_video_frame (rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_set_metadata (rs2_sensor *sensor, rs2_frame_metadata_value key, rs2_metadata_type value, rs2_error **error) BEGIN_API_CALL
 
void rs2_software_sensor_update_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_sr300_visual_preset_to_string (rs2_sr300_visual_preset preset)
 
void rs2_start (const rs2_sensor *sensor, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error) BEGIN_API_CALL
 
void rs2_start_cpp (const rs2_sensor *sensor, rs2_frame_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_start_processing (rs2_processing_block *block, rs2_frame_callback *on_frame, rs2_error **error) BEGIN_API_CALL
 
void rs2_start_processing_fptr (rs2_processing_block *block, rs2_frame_callback_ptr on_frame, void *user, rs2_error **error) BEGIN_API_CALL
 
void rs2_start_processing_queue (rs2_processing_block *block, rs2_frame_queue *queue, rs2_error **error) BEGIN_API_CALL
 
void rs2_start_queue (const rs2_sensor *sensor, rs2_frame_queue *queue, rs2_error **error) BEGIN_API_CALL
 
void rs2_stop (const rs2_sensor *sensor, rs2_error **error) BEGIN_API_CALL
 
int rs2_stream_profile_is (const rs2_stream_profile *f, rs2_extension extension_type, rs2_error **error) BEGIN_API_CALL
 
const char * rs2_stream_to_string (rs2_stream stream)
 
int rs2_supports_device_info (const rs2_device *dev, rs2_camera_info info, rs2_error **error) BEGIN_API_CALL
 
int rs2_supports_frame_metadata (const rs2_frame *frame, rs2_frame_metadata_value frame_metadata, rs2_error **error) BEGIN_API_CALL
 
int rs2_supports_option (const rs2_options *options, rs2_option option, rs2_error **error) BEGIN_API_CALL
 
int rs2_supports_processing_block_info (const rs2_processing_block *block, rs2_camera_info info, rs2_error **error) BEGIN_API_CALL
 
int rs2_supports_sensor_info (const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error) BEGIN_API_CALL
 
void rs2_synthetic_frame_ready (rs2_source *source, rs2_frame *frame, rs2_error **error) BEGIN_API_CALL
 
rs2_raw_data_bufferrs2_terminal_parse_command (rs2_terminal_parser *terminal_parser, const char *command, unsigned int size_of_command, rs2_error **error) BEGIN_API_CALL
 Parses terminal command via RealSense terminal parser. More...
 
rs2_raw_data_bufferrs2_terminal_parse_response (rs2_terminal_parser *terminal_parser, const char *command, unsigned int size_of_command, const void *response, unsigned int size_of_response, rs2_error **error) BEGIN_API_CALL
 Parses terminal response via RealSense terminal parser. More...
 
const char * rs2_timestamp_domain_to_string (rs2_timestamp_domain info)
 
void rs2_trigger_device_calibration (rs2_device *dev, rs2_calibration_type type, rs2_error **error) BEGIN_API_CALL
 
int rs2_try_wait_for_frame (rs2_frame_queue *queue, unsigned int timeout_ms, rs2_frame **output_frame, rs2_error **error) BEGIN_API_CALL
 
void rs2_update_firmware (const rs2_device *device, const void *fw_image, int fw_image_size, rs2_update_progress_callback_ptr callback, void *client_data, rs2_error **error) BEGIN_API_CALL
 
void rs2_update_firmware_cpp (const rs2_device *device, const void *fw_image, int fw_image_size, rs2_update_progress_callback *callback, rs2_error **error) BEGIN_API_CALL
 
void rs2_update_firmware_unsigned (const rs2_device *device, const void *image, int image_size, rs2_update_progress_callback_ptr callback, void *client_data, int update_mode, rs2_error **error) BEGIN_API_CALL
 
void rs2_update_firmware_unsigned_cpp (const rs2_device *device, const void *image, int image_size, rs2_update_progress_callback *callback, int update_mode, rs2_error **error) BEGIN_API_CALL
 
rs2_framers2_wait_for_frame (rs2_frame_queue *queue, unsigned int timeout_ms, rs2_error **error) BEGIN_API_CALL
 
void rs2_write_calibration (const rs2_device *device, rs2_error **error) BEGIN_API_CALL
 

Function Documentation

rs2_frame* rs2_allocate_composite_frame ( rs2_source source,
rs2_frame **  frames,
int  count,
rs2_error **  error 
)

Allocate new composite frame, aggregating a set of existing frames

Parameters
[in]sourceFrame pool to allocate the frame from
[in]framesArray of existing frames
[in]countNumber of input frames
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
reference to a newly allocated frame, must be released with release_frame when composite frame gets released it will automatically release all of the input frames

Definition at line 2127 of file rs.cpp.

rs2_frame* rs2_allocate_points ( rs2_source source,
const rs2_stream_profile new_stream,
rs2_frame original,
rs2_error **  error 
)

Allocate new points frame using a frame-source provided from a processing block

Parameters
[in]sourceFrame pool to allocate the frame from
[in]new_streamNew stream profile to assign to newly created frame
[in]originalA reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store

Definition at line 1732 of file rs.cpp.

rs2_frame* rs2_allocate_synthetic_motion_frame ( rs2_source source,
const rs2_stream_profile new_stream,
rs2_frame original,
rs2_extension  frame_type,
rs2_error **  error 
)

Allocate new motion frame using a frame-source provided form a processing block

Parameters
[in]sourceFrame pool to allocate the frame from
[in]new_streamNew stream profile to assign to newly created frame
[in]originalA reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)
[in]frame_typeNew value for frame type for the allocated frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store

Definition at line 1718 of file rs.cpp.

rs2_frame* rs2_allocate_synthetic_video_frame ( rs2_source source,
const rs2_stream_profile new_stream,
rs2_frame original,
int  new_bpp,
int  new_width,
int  new_height,
int  new_stride,
rs2_extension  frame_type,
rs2_error **  error 
)

Allocate new video frame using a frame-source provided form a processing block

Parameters
[in]sourceFrame pool to allocate the frame from
[in]new_streamNew stream profile to assign to newly created frame
[in]originalA reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)
[in]new_bppNew value for bits per pixel for the allocated frame
[in]new_widthNew value for width for the allocated frame
[in]new_heightNew value for height for the allocated frame
[in]new_strideNew value for stride in bytes for the allocated frame
[in]frame_typeNew value for frame type for the allocated frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
reference to a newly allocated frame, must be released with release_frame memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store

Definition at line 1704 of file rs.cpp.

const char* rs2_ambient_light_to_string ( rs2_ambient_light  ambient)

Definition at line 1280 of file rs.cpp.

const char* rs2_cah_trigger_to_string ( rs2_cah_trigger  mode)

Definition at line 1282 of file rs.cpp.

const char* rs2_calib_target_type_to_string ( rs2_calib_target_type  type)

Definition at line 1269 of file rs.cpp.

const char* rs2_calibration_status_to_string ( rs2_calibration_status  status)

Definition at line 1284 of file rs.cpp.

const char* rs2_calibration_type_to_string ( rs2_calibration_type  type)

Definition at line 1283 of file rs.cpp.

const char* rs2_camera_info_to_string ( rs2_camera_info  info)

Definition at line 1266 of file rs.cpp.

rs2_stream_profile* rs2_clone_stream_profile ( const rs2_stream_profile mode,
rs2_stream  stream,
int  index,
rs2_format  format,
rs2_error **  error 
)

Creates a copy of stream profile, assigning new values to some of the fields

Parameters
[in]modeinput stream profile
[in]streamstream type for the profile
[in]formatbinary data format of the profile
[in]indexstream index the profile in case there are multiple streams of the same type
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
new stream profile, must be deleted by rs2_delete_stream_profile

Definition at line 519 of file rs.cpp.

rs2_stream_profile* rs2_clone_video_stream_profile ( const rs2_stream_profile mode,
rs2_stream  stream,
int  index,
rs2_format  format,
int  width,
int  height,
const rs2_intrinsics intr,
rs2_error **  error 
)

Creates a copy of stream profile, assigning new values to some of the fields

Parameters
[in]modeinput stream profile
[in]streamstream type for the profile
[in]formatbinary data format of the profile
[in]widthnew width for the profile
[in]heightnew height for the profile
[in]intrnew intrinsics for the profile
[in]indexstream index the profile in case there are multiple streams of the same type
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
new stream profile, must be deleted by rs2_delete_stream_profile

Definition at line 533 of file rs.cpp.

void rs2_close ( const rs2_sensor sensor,
rs2_error **  error 
)

stop any streaming from specified subdevice

Parameters
[in]sensorRealSense device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 614 of file rs.cpp.

int rs2_config_can_resolve ( rs2_config config,
rs2_pipeline pipe,
rs2_error **  error 
)

Check if the config can resolve the configuration filters, to find a matching device and streams profiles. The resolution conditions are as described in resolve().

Parameters
[in]configA pointer to an instance of a config
[in]pipeThe pipeline for which the selected filters are applied
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
True if a valid profile selection exists, false if no selection can be found under the config filters and the available devices.

Definition at line 2015 of file rs.cpp.

void rs2_config_disable_all_streams ( rs2_config config,
rs2_error **  error 
)

Disable all device stream explicitly, to remove any requests on the streams profiles. The streams can still be enabled due to pipeline computer vision module request. This call removes any filter on the streams configuration.

Parameters
[in]configA pointer to an instance of a config
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2000 of file rs.cpp.

void rs2_config_disable_indexed_stream ( rs2_config config,
rs2_stream  stream,
int  index,
rs2_error **  error 
)

Disable a device stream explicitly, to remove any requests on this stream profile. The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the stream configuration.

Parameters
[in]configA pointer to an instance of a config
[in]streamStream type, for which the filters are cleared
[in]indexStream index, for which the filters are cleared
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1993 of file rs.cpp.

void rs2_config_disable_stream ( rs2_config config,
rs2_stream  stream,
rs2_error **  error 
)

Disable a device stream explicitly, to remove any requests on this stream type. The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the stream configuration.

Parameters
[in]configA pointer to an instance of a config
[in]streamStream type, for which the filters are cleared
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1986 of file rs.cpp.

void rs2_config_enable_all_stream ( rs2_config config,
rs2_error **  error 
)

Enable all device streams explicitly. The conditions and behavior of this method are similar to those of enable_stream(). This filter enables all raw streams of the selected device. The device is either selected explicitly by the application, or by the pipeline requirements or default. The list of streams is device dependent.

Parameters
[in]configA pointer to an instance of a config
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1942 of file rs.cpp.

void rs2_config_enable_device ( rs2_config config,
const char *  serial,
rs2_error **  error 
)

Select a specific device explicitly by its serial number, to be used by the pipeline. The conditions and behavior of this method are similar to those of enable_stream(). This method is required if the application needs to set device or sensor settings prior to pipeline streaming, to enforce the pipeline to use the configured device.

Parameters
[in]configA pointer to an instance of a config
[in]serialdevice serial number, as returned by RS2_CAMERA_INFO_SERIAL_NUMBER
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1949 of file rs.cpp.

void rs2_config_enable_device_from_file ( rs2_config config,
const char *  file,
rs2_error **  error 
)

Select a recorded device from a file, to be used by the pipeline through playback. The device available streams are as recorded to the file, and resolve() considers only this device and configuration as available. This request cannot be used if enable_record_to_file() is called for the current config, and vise versa By default, playback is repeated once the file ends. To control this, see 'rs2_config_enable_device_from_file_repeat_option'.

Parameters
[in]configA pointer to an instance of a config
[in]fileThe playback file of the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1968 of file rs.cpp.

void rs2_config_enable_device_from_file_repeat_option ( rs2_config config,
const char *  file,
int  repeat_playback,
rs2_error **  error 
)

Select a recorded device from a file, to be used by the pipeline through playback. The device available streams are as recorded to the file, and resolve() considers only this device and configuration as available. This request cannot be used if enable_record_to_file() is called for the current config, and vise versa

Parameters
[in]configA pointer to an instance of a config
[in]fileThe playback file of the device
[in]repeat_playbackif true, when file ends the playback starts again, in an infinite loop; if false, when file ends playback does not start again, and should by stopped manually by the user.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1959 of file rs.cpp.

void rs2_config_enable_record_to_file ( rs2_config config,
const char *  file,
rs2_error **  error 
)

Requires that the resolved device would be recorded to file This request cannot be used if enable_device_from_file() is called for the current config, and vise versa

Parameters
[in]configA pointer to an instance of a config
[in]fileThe desired file for the output record
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1977 of file rs.cpp.

void rs2_config_enable_stream ( rs2_config config,
rs2_stream  stream,
int  index,
int  width,
int  height,
rs2_format  format,
int  framerate,
rs2_error **  error 
)

Enable a device stream explicitly, with selected stream parameters. The method allows the application to request a stream with specific configuration. If no stream is explicitly enabled, the pipeline configures the device and its streams according to the attached computer vision modules and processing blocks requirements, or default configuration for the first available device. The application can configure any of the input stream parameters according to its requirement, or set to 0 for don't care value. The config accumulates the application calls for enable configuration methods, until the configuration is applied. Multiple enable stream calls for the same stream with conflicting parameters override each other, and the last call is maintained. Upon calling resolve(), the config checks for conflicts between the application configuration requests and the attached computer vision modules and processing blocks requirements, and fails if conflicts are found. Before resolve() is called, no conflict check is done.

Parameters
[in]configA pointer to an instance of a config
[in]streamStream type to be enabled
[in]indexStream index, used for multiple streams of the same type. -1 indicates any.
[in]widthStream image width - for images streams. 0 indicates any.
[in]heightStream image height - for images streams. 0 indicates any.
[in]formatStream data format - pixel format for images streams, of data type for other streams. RS2_FORMAT_ANY indicates any.
[in]framerateStream frames per second. 0 indicates any.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1928 of file rs.cpp.

rs2_pipeline_profile* rs2_config_resolve ( rs2_config config,
rs2_pipeline pipe,
rs2_error **  error 
)

Resolve the configuration filters, to find a matching device and streams profiles. The method resolves the user configuration filters for the device and streams, and combines them with the requirements of the computer vision modules and processing blocks attached to the pipeline. If there are no conflicts of requests, it looks for an available device, which can satisfy all requests, and selects the first matching streams configuration. In the absence of any request, the rs2::config selects the first available device and the first color and depth streams configuration. The pipeline profile selection during start() follows the same method. Thus, the selected profile is the same, if no change occurs to the available devices occurs. Resolving the pipeline configuration provides the application access to the pipeline selected device for advanced control. The returned configuration is not applied to the device, so the application doesn't own the device sensors. However, the application can call enable_device(), to enforce the device returned by this method is selected by pipeline start(), and configure the device and sensors options or extensions before streaming starts.

Parameters
[in]configA pointer to an instance of a config
[in]pipeThe pipeline for which the selected filters are applied
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
A matching device and streams profile, which satisfies the filters and pipeline requests.

Definition at line 2007 of file rs.cpp.

void rs2_connect_tm2_controller ( const rs2_device device,
const unsigned char *  mac_addr,
rs2_error **  error 
)

Connects to a given tm2 controller

Parameters
[in]deviceDevice to connect to the controller
[in]mac_addrThe MAC address of the desired controller
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2658 of file rs.cpp.

rs2_device* rs2_context_add_device ( rs2_context ctx,
const char *  file,
rs2_error **  error 
)

Create a new device and add it to the context

Parameters
ctxThe context to which the new device will be added
fileThe file from which the device should be created
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
A pointer to a device that plays data from the file, or null in case of failure

Definition at line 1519 of file rs.cpp.

void rs2_context_add_software_device ( rs2_context ctx,
rs2_device dev,
rs2_error **  error 
)

Add an instance of software device to the context

Parameters
ctxThe context to which the new device will be added
devInstance of software device to register into the context
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1529 of file rs.cpp.

void rs2_context_remove_device ( rs2_context ctx,
const char *  file,
rs2_error **  error 
)

Removes a playback device from the context, if exists

Parameters
[in]ctxThe context from which the device should be removed
[in]fileThe file name that was used to add the device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1539 of file rs.cpp.

void rs2_context_unload_tracking_module ( rs2_context ctx,
rs2_error **  error 
)

Removes tracking module. function query_devices() locks the tracking module in the tm_context object. If the tracking module device is not used it should be removed using this function, so that other applications could find it. This function can be used both before the call to query_device() to prevent enabling tracking modules or afterwards to release them.

Definition at line 1547 of file rs.cpp.

rs2_processing_block* rs2_create_align ( rs2_stream  align_to,
rs2_error **  error 
)

Creates Align processing block.

Parameters
[in]align_tostream type to be used as the target of frameset alignment
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2211 of file rs.cpp.

rs2_processing_block* rs2_create_colorizer ( rs2_error **  error)

Creates Depth-Colorizer processing block that can be used to quickly visualize the depth data This block will accept depth frames as input and replace them by depth frames with format RGB8 Non-depth frames are passed through Further customization will be added soon (format, color-map, histogram equalization control)

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

Definition at line 2221 of file rs.cpp.

rs2_config* rs2_create_config ( rs2_error **  error)

Create a config instance The config allows pipeline users to request filters for the pipeline streams and device selection and configuration. This is an optional step in pipeline creation, as the pipeline resolves its streaming device internally. Config provides its users a way to set the filters and test if there is no conflict with the pipeline requirements from the device. It also allows the user to find a matching device for the config filters and the pipeline, in order to select a device explicitly, and modify its controls before streaming starts.

Parameters
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
rs2_config* A pointer to a new config instance

Definition at line 1914 of file rs.cpp.

rs2_context* rs2_create_context ( int  api_version,
rs2_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 RS2_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 163 of file rs.cpp.

rs2_processing_block* rs2_create_decimation_filter_block ( rs2_error **  error)

Creates Depth post-processing filter block. This block accepts depth frames, applies decimation filter and plots modified prames Note that due to the modifiedframe size, the decimated frame repaces the original one

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

Definition at line 2232 of file rs.cpp.

rs2_device* rs2_create_device ( const rs2_device_list info_list,
int  index,
rs2_error **  error 
)

Creates a device by index. The device object represents a physical camera and provides the means to manipulate it.

Parameters
[in]info_listthe list containing the device to retrieve
[in]indexThe zero based index of device to retrieve
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
The requested device, should be released by rs2_delete_device

Definition at line 289 of file rs.cpp.

rs2_device* rs2_create_device_from_sensor ( const rs2_sensor sensor,
rs2_error **  error 
)

This is a helper function allowing the user to discover the device from one of its sensors

Parameters
[in]sensorPointer to a sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
new device wrapper for the device of the sensor. Needs to be released by delete_device

Definition at line 2338 of file rs.cpp.

rs2_device_hub* rs2_create_device_hub ( const rs2_context context,
rs2_error **  error 
)

Creates RealSense device_hub .

Parameters
[in]contextThe context for the device hub
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
Device hub object

Definition at line 178 of file rs.cpp.

rs2_processing_block* rs2_create_disparity_transform_block ( unsigned char  transform_to_disparity,
rs2_error **  error 
)

Creates a post processing block that provides for depth<->disparity domain transformation for stereo-based depth modules

Parameters
[in]transform_to_disparityflag select the transform direction: true = depth->disparity, and vice versa
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2256 of file rs.cpp.

rs2_error* rs2_create_error ( const char *  what,
const char *  name,
const char *  args,
rs2_exception_type  type 
)

Definition at line 147 of file rs.cpp.

const rs2_raw_data_buffer* rs2_create_flash_backup ( const rs2_device device,
rs2_update_progress_callback_ptr  callback,
void client_data,
rs2_error **  error 
)

Create backup of camera flash memory. Such backup does not constitute valid firmware image, and cannot be loaded back to the device, but it does contain all calibration and device information.

Parameters
[in]deviceDevice to update
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[in]client_dataOptional client data for the callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2973 of file rs.cpp.

const rs2_raw_data_buffer* rs2_create_flash_backup_cpp ( const rs2_device device,
rs2_update_progress_callback callback,
rs2_error **  error 
)

Create backup of camera flash memory. Such backup does not constitute valid firmware image, and cannot be loaded back to the device, but it does contain all calibration and device information.

Parameters
[in]deviceDevice to update
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2954 of file rs.cpp.

rs2_frame_queue* rs2_create_frame_queue ( int  capacity,
rs2_error **  error 
)

create frame queue. frame queues are the simplest x-platform synchronization primitive provided by librealsense to help developers who are not using async APIs

Parameters
[in]capacitymax number of frames to allow to be stored in the queue before older frames will start to get dropped
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
handle to the frame queue, must be released using rs2_delete_frame_queue

Definition at line 1030 of file rs.cpp.

rs2_firmware_log_message* rs2_create_fw_log_message ( rs2_device dev,
rs2_error **  error 
)

Creates RealSense firmware log message.

Parameters
[in]devDevice from which the FW log will be taken using the created message
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to created empty firmware log message

Definition at line 3186 of file rs.cpp.

rs2_firmware_log_parsed_message* rs2_create_fw_log_parsed_message ( rs2_device dev,
rs2_error **  error 
)

Creates RealSense firmware log parsed message.

Parameters
[in]devDevice from which the FW log will be taken using the created message
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to created empty firmware log message

Definition at line 3270 of file rs.cpp.

rs2_processing_block* rs2_create_hdr_merge_processing_block ( rs2_error **  error)

Creates a hdr_merge processing block. The block merges between two depth frames with different exposure values

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

Definition at line 2296 of file rs.cpp.

rs2_processing_block* rs2_create_hole_filling_filter_block ( rs2_error **  error)

Creates Depth post-processing hole filling block. The filter replaces empty pixels with data from adjacent pixels based on the method selected

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

Definition at line 2264 of file rs.cpp.

rs2_processing_block* rs2_create_huffman_depth_decompress_block ( rs2_error **  error)

Creates Depth frame decompression module. Decoded frames compressed and transmitted with Z16H variable-lenght Huffman code to standartized Z16 Depth data format. Using the compression allows to reduce the Depth frames bandwidth by more than 50 percent

Parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Huffman-code decompression processing block

Definition at line 2288 of file rs.cpp.

rs2_context* rs2_create_mock_context ( int  api_version,
const char *  filename,
const char *  section,
rs2_error **  error 
)

Create librealsense context that given a file will respond to calls exactly as the recording did if the user calls a method that was either not called during recording or violates causality of the recording error will be thrown

Parameters
[in]api_versionrealsense API version as provided by RS2_API_VERSION macro
[in]filenamestring representing the name of the file to play back from
[in]sectionstring representing the name of the section within existing recording
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
context object, should be released by rs2_delete_context

Definition at line 1214 of file rs.cpp.

rs2_context* rs2_create_mock_context_versioned ( int  api_version,
const char *  filename,
const char *  section,
const char *  min_api_version,
rs2_error **  error 
)

Create librealsense context that given a file will respond to calls exactly as the recording did if the user calls a method that was either not called during recording or violates causality of the recording error will be thrown

Parameters
[in]api_versionrealsense API version as provided by RS2_API_VERSION macro
[in]filenamestring representing the name of the file to play back from
[in]sectionstring representing the name of the section within existing recording
[in]min_api_versionreject any file that was recorded before this version
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
context object, should be released by rs2_delete_context

Definition at line 1204 of file rs.cpp.

rs2_pipeline* rs2_create_pipeline ( rs2_context ctx,
rs2_error **  error 
)

Create a pipeline instance The pipeline simplifies the user interaction with the device and computer vision processing modules. The class abstracts the camera configuration and streaming, and the vision modules triggering and threading. It lets the application focus on the computer vision output of the modules, or the device output data. The pipeline can manage computer vision modules, which are implemented as a processing blocks. The pipeline is the consumer of the processing block interface, while the application consumes the computer vision interface.

Parameters
[in]ctxcontext
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1756 of file rs.cpp.

rs2_processing_block* rs2_create_pointcloud ( rs2_error **  error)

Creates Point-Cloud processing block. This block accepts depth frames and outputs Points frames In addition, given non-depth frame, the block will align texture coordinate to the non-depth stream

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

Definition at line 2187 of file rs.cpp.

rs2_processing_block* rs2_create_processing_block ( rs2_frame_processor_callback proc,
rs2_error **  error 
)

This method creates new custom processing block. This lets the users pass frames between module boundaries for processing This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc..

Parameters
procProcessing function to be applied to every frame entering the block
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
new processing block, to be released by rs2_delete_processing_block

Definition at line 2023 of file rs.cpp.

rs2_processing_block* rs2_create_processing_block_fptr ( rs2_frame_processor_callback_ptr  proc,
void context,
rs2_error **  error 
)

This method creates new custom processing block from function pointer. This lets the users pass frames between module boundaries for processing This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc..

Parameters
procProcessing function pointer to be applied to every frame entering the block
contextUser context (can be anything or null) to be passed later as ctx param of the callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
new processing block, to be released by rs2_delete_processing_block

Definition at line 2032 of file rs.cpp.

rs2_processing_block* rs2_create_rates_printer_block ( rs2_error **  error)

Creates a rates printer block. The printer prints the actual FPS of the invoked frame stream. The block ignores reapiting frames and calculats the FPS only if the frame number of the relevant frame was changed.

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

Definition at line 2272 of file rs.cpp.

rs2_device* rs2_create_record_device ( const rs2_device device,
const char *  file,
rs2_error **  error 
)

Creates a recording device to record the given device and save it to the given file

Parameters
[in]deviceThe device to record
[in]fileThe desired path to which the recorder should save the data
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
A pointer to a device that records its data to file, or null in case of failure

Definition at line 1656 of file rs.cpp.

rs2_device* rs2_create_record_device_ex ( const rs2_device device,
const char *  file,
int  compression_enabled,
rs2_error **  error 
)

Creates a recording device to record the given device and save it to the given file

Parameters
[in]deviceThe device to record
[in]fileThe desired path to which the recorder should save the data
[in]compression_enabledIndicates if compression is enabled, 0 means false, otherwise true
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
A pointer to a device that records its data to file, or null in case of failure

Definition at line 1666 of file rs.cpp.

rs2_context* rs2_create_recording_context ( int  api_version,
const char *  filename,
const char *  section,
rs2_recording_mode  mode,
rs2_error **  error 
)

Create librealsense context that will try to record all operations over librealsense into a file

Parameters
[in]api_versionrealsense API version as provided by RS2_API_VERSION macro
[in]filenamestring representing the name of the file to record
[in]sectionstring representing the name of the section within existing recording
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
context object, should be released by rs2_delete_context

Definition at line 1194 of file rs.cpp.

rs2_sensor* rs2_create_sensor ( const rs2_sensor_list list,
int  index,
rs2_error **  error 
)

create sensor by index

Parameters
[in]indexthe zero based index of sensor to retrieve
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the requested sensor, should be released by rs2_delete_sensor

Definition at line 308 of file rs.cpp.

rs2_processing_block* rs2_create_sequence_id_filter ( rs2_error **  error)

Creates a sequence_id_filter processing block. The block lets frames with the selected sequence id pass and blocks frames with other values

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

Definition at line 2304 of file rs.cpp.

rs2_device* rs2_create_software_device ( rs2_error **  error)

Create software device to enable use librealsense logic without getting data from backend but inject the data from outside

Parameters
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
software device object, should be released by rs2_delete_device

Definition at line 2428 of file rs.cpp.

rs2_processing_block* rs2_create_spatial_filter_block ( rs2_error **  error)

Creates Depth post-processing spatial filter block. This block accepts depth frames, applies spatial filters and plots modified prames

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

Definition at line 2248 of file rs.cpp.

rs2_processing_block* rs2_create_sync_processing_block ( rs2_error **  error)

Creates Sync processing block. This block accepts arbitrary frames and output composite frames of best matches Some frames may be released within the syncer if they are waiting for match for too long Syncronization is done (mostly) based on timestamps so good hardware timestamps are a pre-condition

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

Definition at line 2062 of file rs.cpp.

rs2_processing_block* rs2_create_temporal_filter_block ( rs2_error **  error)

Creates Depth post-processing filter block. This block accepts depth frames, applies temporal filter

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

Definition at line 2240 of file rs.cpp.

rs2_terminal_parser* rs2_create_terminal_parser ( const char *  xml_content,
rs2_error **  error 
)

Creates RealSense terminal parser.

Parameters
[in]xml_contentcontent of the xml file needed for parsing
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to created terminal parser object

Definition at line 3360 of file rs.cpp.

rs2_processing_block* rs2_create_threshold ( rs2_error **  error)

Creates depth thresholding processing block By controlling min and max options on the block, one could filter out depth values that are either too large or too small, as a software post-processing step

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

Definition at line 2199 of file rs.cpp.

rs2_processing_block* rs2_create_units_transform ( rs2_error **  error)

Creates depth units transformation processing block All of the pixels are transformed from depth units into meters.

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

Definition at line 2205 of file rs.cpp.

rs2_processing_block* rs2_create_yuy_decoder ( rs2_error **  error)

Creates YUY decoder processing block. This block accepts raw YUY frames and outputs frames of other formats. YUY is a common video format used by a variety of web-cams. It benefits from packing pixels into 2 bytes per pixel without signficant quality drop. YUY representation can be converted back to more usable RGB form, but this requires somewhat costly conversion. The SDK will automatically try to use SSE2 and AVX instructions and CUDA where available to get best performance. Other implementations (using GLSL, OpenCL, Neon and NCS) should follow.

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

Definition at line 2193 of file rs.cpp.

rs2_processing_block* rs2_create_zero_order_invalidation_block ( rs2_error **  error)

Creates Depth post-processing zero order fix block. The filter invalidates pixels that has a wrong value due to zero order effect

Parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
zero order fix processing block

Definition at line 2280 of file rs.cpp.

void rs2_delete_config ( rs2_config config)

Deletes an instance of a config

Parameters
[in]configA pointer to an instance of a config

Definition at line 1920 of file rs.cpp.

void rs2_delete_context ( rs2_context context)

Frees the relevant context object.

Parameters
[in]contextObject that is no longer needed

Definition at line 171 of file rs.cpp.

void rs2_delete_device ( rs2_device device)

Delete RealSense device

Parameters
[in]deviceRealsense device to delete

Definition at line 301 of file rs.cpp.

void rs2_delete_device_hub ( const rs2_device_hub hub)

Frees the relevant device hub object.

Parameters
[in]hubObject that is no longer needed

Definition at line 184 of file rs.cpp.

void rs2_delete_device_list ( rs2_device_list info_list)

Deletes device list, any devices created using this list will remain unaffected.

Parameters
[in]info_listList to delete

Definition at line 275 of file rs.cpp.

void rs2_delete_frame_queue ( rs2_frame_queue queue)

deletes frame queue and releases all frames inside it

Parameters
[in]queuequeue to delete

Definition at line 1036 of file rs.cpp.

void rs2_delete_fw_log_message ( rs2_firmware_log_message msg)

Delete RealSense firmware log message

Parameters
[in]deviceRealsense firmware log message to delete

Definition at line 3226 of file rs.cpp.

void rs2_delete_fw_log_parsed_message ( rs2_firmware_log_parsed_message fw_log_parsed_msg)

Deletes RealSense firmware log parsed message.

Parameters
[in]msgmessage to be deleted

Definition at line 3304 of file rs.cpp.

void rs2_delete_options_list ( rs2_options_list list)

Deletes options list

Parameters
[in]listlist to delete

Definition at line 672 of file rs.cpp.

void rs2_delete_pipeline ( rs2_pipeline pipe)

Delete a pipeline instance. Upon destruction, the pipeline will implicitly stop itself

Parameters
[in]pipeto delete

Definition at line 1819 of file rs.cpp.

void rs2_delete_pipeline_profile ( rs2_pipeline_profile profile)

Deletes an instance of a pipeline profile

Parameters
[in]profileA pointer to an instance of a pipeline profile

Definition at line 1905 of file rs.cpp.

void rs2_delete_processing_block ( rs2_processing_block block)

Deletes the processing block

Parameters
[in]blockProcessing block

Definition at line 2106 of file rs.cpp.

void rs2_delete_raw_data ( const rs2_raw_data_buffer buffer)

Delete rs2_raw_data_buffer

Parameters
[in]bufferrs2_raw_data_buffer returned by rs2_send_and_receive_raw_data

Definition at line 581 of file rs.cpp.

void rs2_delete_recommended_processing_blocks ( rs2_processing_block_list list)

Deletes processing blocks list

Parameters
[in]listlist to delete

Definition at line 2788 of file rs.cpp.

void rs2_delete_sensor ( rs2_sensor sensor)

delete relasense sensor

Parameters
[in]sensorrealsense sensor to delete

Definition at line 320 of file rs.cpp.

void rs2_delete_sensor_list ( rs2_sensor_list info_list)

Deletes sensors list, any sensors created from this list will remain unaffected

Parameters
[in]info_listlist to delete

Definition at line 282 of file rs.cpp.

void rs2_delete_stream_profile ( rs2_stream_profile mode)

Delete stream profile allocated by rs2_clone_stream_profile Should not be called on stream profiles returned by the device

Parameters
[in]modeinput stream profile

Definition at line 512 of file rs.cpp.

void rs2_delete_stream_profiles_list ( rs2_stream_profile_list list)

delete stream profiles list

Parameters
[in]listthe list of supported profiles returned by rs2_get_supported_profiles

Definition at line 367 of file rs.cpp.

void rs2_delete_terminal_parser ( rs2_terminal_parser terminal_parser)

Deletes RealSense terminal parser.

Parameters
[in]terminal_parserterminal parser to be deleted

Definition at line 3367 of file rs.cpp.

float rs2_depth_frame_get_distance ( const rs2_frame frame_ref,
int  x,
int  y,
rs2_error **  error 
)

Given the 2D depth coordinate (x,y) provide the corresponding depth in metric units

Parameters
[in]frame_ref2D depth pixel coordinates (Left-Upper corner origin)
[in]x,y2D depth pixel coordinates (Left-Upper corner origin)
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2346 of file rs.cpp.

float rs2_depth_frame_get_units ( const rs2_frame frame,
rs2_error **  error 
)

retrieve the scaling factor to use when converting a depth frame's get_data() units to meters

Returns
float - depth, in meters, per 1 unit stored in the frame data

Definition at line 2356 of file rs.cpp.

float rs2_depth_stereo_frame_get_baseline ( const rs2_frame frame_ref,
rs2_error **  error 
)

Retrieve the stereoscopic baseline value from frame. Applicable to stereo-based depth modules

Parameters
[out]floatStereoscopic baseline in millimeters
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2364 of file rs.cpp.

int rs2_device_hub_is_device_connected ( const rs2_device_hub hub,
const rs2_device device,
rs2_error **  error 
)

Checks if device is still connected

Parameters
[in]hubThe device hub object
[in]deviceThe device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
1 if the device is connected, 0 otherwise

Definition at line 199 of file rs.cpp.

rs2_device* rs2_device_hub_wait_for_device ( const rs2_device_hub hub,
rs2_error **  error 
)

If any device is connected return it, otherwise wait until next RealSense device connects. Calling this method multiple times will cycle through connected devices

Parameters
[in]ctxThe context to creat the device
[in]hubThe device hub object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
device object

Definition at line 191 of file rs.cpp.

int rs2_device_list_contains ( const rs2_device_list info_list,
const rs2_device device,
rs2_error **  error 
)

Checks if a specific device is contained inside a device list.

Parameters
[in]info_listThe list of devices to check in
[in]deviceRealSense device to check for
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
True if the device is in the list and false otherwise

Definition at line 890 of file rs.cpp.

const char* rs2_digital_gain_to_string ( rs2_digital_gain  gain)

Definition at line 1281 of file rs.cpp.

void rs2_disconnect_tm2_controller ( const rs2_device device,
int  id,
rs2_error **  error 
)

Disconnects a given tm2 controller

Parameters
[in]deviceDevice to disconnect the controller from
[in]idThe ID of the desired controller
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2668 of file rs.cpp.

const char* rs2_distortion_to_string ( rs2_distortion  distortion)

Definition at line 1264 of file rs.cpp.

int rs2_embedded_frames_count ( rs2_frame composite,
rs2_error **  error 
)

Get number of frames embedded within a composite frame

Parameters
[in]compositeComposite input frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Number of embedded frames

Definition at line 2144 of file rs.cpp.

void rs2_enable_rolling_log_file ( unsigned  max_size,
rs2_error **  error 
)

Enable rolling log file when used with rs2_log_to_file: Upon reaching (max_size/2) bytes, the log will be renamed with an ".old" suffix and a new log created. Any previous .old file will be erased. Must have permissions to remove/rename files in log file directory.

Parameters
[in]max_sizemax file size in megabytes
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1314 of file rs.cpp.

void rs2_enqueue_frame ( rs2_frame frame,
void queue 
)

enqueue new frame into a queue

Parameters
[in]frameframe handle to enqueue (this operation passed ownership to the queue)
[in]queuethe frame queue data structure

Definition at line 1092 of file rs.cpp.

void rs2_enter_update_state ( const rs2_device device,
rs2_error **  error 
)

Enter the device to update state, this will cause the updatable device to disconnect and reconnect as update device.

Parameters
[in]deviceDevice to update
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 3041 of file rs.cpp.

const char* rs2_exception_type_to_string ( rs2_exception_type  type)

Definition at line 1272 of file rs.cpp.

const rs2_raw_data_buffer* rs2_export_localization_map ( const rs2_sensor sensor,
rs2_error **  error 
)

Extract and store the localization map of tm2 tracking device to file

Parameters
[in]sensorTM2 position-tracking sensor
[in]lmap_fnameThe file name of the localization map
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Device's response in a rs2_raw_data_buffer, which should be released by rs2_delete_raw_data

Definition at line 2828 of file rs.cpp.

void rs2_export_to_ply ( const rs2_frame frame,
const char *  fname,
rs2_frame texture,
rs2_error **  error 
)

When called on Points frame type, this method creates a ply file of the model with the given file name.

Parameters
[in]framePoints frame
[in]fnameThe name for the ply file
[in]textureTexture frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2162 of file rs.cpp.

const char* rs2_extension_to_string ( rs2_extension  type)

Definition at line 1276 of file rs.cpp.

const char* rs2_extension_type_to_string ( rs2_extension  type)

Definition at line 1274 of file rs.cpp.

rs2_frame* rs2_extract_frame ( rs2_frame composite,
int  index,
rs2_error **  error 
)

Extract frame from within a composite frame

Parameters
[in]compositeComposite frame
[in]indexIndex of the frame to extract within the composite frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
returns reference to a frame existing within the composite frame If you wish to keep this frame after the composite is released, you need to call acquire_ref Otherwise the resulting frame lifetime is bound by owning composite frame

Definition at line 2114 of file rs.cpp.

void rs2_extract_target_dimensions ( const rs2_frame frame,
rs2_calib_target_type  calib_type,
float *  target_dims,
unsigned int  target_dims_size,
rs2_error **  error 
)

Extract the target dimensions on the specific target

Parameters
[in]frameLeft or right camera frame of specified size based on the target type
[in]calib_typeCalibration target type
[in]target_dims_sizeTarget dimension array size
[out]target_dimsThe array to hold the result target dimensions calculated. For type RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES, the four rectangle side sizes in pixels with the order of top, bottom, left, and right
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2402 of file rs.cpp.

void rs2_flush_queue ( rs2_frame_queue queue,
rs2_error **  error 
)

Definition at line 1103 of file rs.cpp.

const char* rs2_format_to_string ( rs2_format  format)

Definition at line 1263 of file rs.cpp.

void rs2_frame_add_ref ( rs2_frame frame,
rs2_error **  error 
)

create additional reference to a frame without duplicating frame data

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
new frame reference, has to be released by rs2_release_frame

Definition at line 1015 of file rs.cpp.

const char* rs2_frame_metadata_to_string ( rs2_frame_metadata_value  metadata)

Definition at line 1275 of file rs.cpp.

const char* rs2_frame_metadata_value_to_string ( rs2_frame_metadata_value  metadata)

Definition at line 1277 of file rs.cpp.

void rs2_free_error ( rs2_error error)

Definition at line 1256 of file rs.cpp.

const unsigned char* rs2_fw_log_message_data ( rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message data.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
pointer to start of the firmware log message data

Definition at line 3233 of file rs.cpp.

rs2_log_severity rs2_fw_log_message_severity ( const rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message severity.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
severity of the firmware log message data

Definition at line 3247 of file rs.cpp.

int rs2_fw_log_message_size ( rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message size.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
size of the firmware log message data

Definition at line 3240 of file rs.cpp.

unsigned int rs2_fw_log_message_timestamp ( rs2_firmware_log_message msg,
rs2_error **  error 
)

Gets RealSense firmware log message timestamp.

Parameters
[in]msgfirmware log message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
timestamp of the firmware log message

Definition at line 3253 of file rs.cpp.

rs2_stream_profile_list* rs2_get_active_streams ( rs2_sensor sensor,
rs2_error **  error 
)

check how subdevice is streaming

Parameters
[in]sensorinput RealSense subdevice
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
list of stream profiles that given subdevice is currently streaming, should be released by rs2_delete_profiles_list

Definition at line 344 of file rs.cpp.

int rs2_get_api_version ( rs2_error **  error)

Retrieve the 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
the version API encoded into integer value "1.9.3" -> 10903

Definition at line 1184 of file rs.cpp.

const rs2_raw_data_buffer* rs2_get_calibration_table ( const rs2_device dev,
rs2_error **  error 
)

Read current calibration table from flash.

Returns
Calibration table

Definition at line 3147 of file rs.cpp.

rs2_stream_profile_list* rs2_get_debug_stream_profiles ( rs2_sensor sensor,
rs2_error **  error 
)

retrieve list of debug stream profiles that given subdevice can provide

Parameters
[in]sensorinput RealSense subdevice
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
list of debug stream profiles that given subdevice can provide, should be released by rs2_delete_profiles_list

Definition at line 334 of file rs.cpp.

float rs2_get_depth_scale ( rs2_sensor sensor,
rs2_error **  error 
)

When called on a depth sensor, this method will return the number of meters represented by a single depth unit

Parameters
[in]sensordepth sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the number of meters represented by a single depth unit

Definition at line 2312 of file rs.cpp.

int rs2_get_device_count ( const rs2_device_list info_list,
rs2_error **  error 
)

Determines number of devices in a list.

Parameters
[in]info_listThe list of connected devices captured using rs2_query_devices
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Device count

Definition at line 259 of file rs.cpp.

const char* rs2_get_device_info ( const rs2_device device,
rs2_camera_info  info,
rs2_error **  error 
)

Retrieve camera specific information, like versions of various internal components.

Parameters
[in]deviceThe RealSense device
[in]infoCamera info type to retrieve
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
The requested camera info string, in a format specific to the device model

Definition at line 703 of file rs.cpp.

void rs2_get_dsm_params ( rs2_sensor const *  sensor,
rs2_dsm_params p_params_out,
rs2_error **  error 
)

Get the DSM parameters for a sensor

Parameters
[in]sensorSensor that supports the CALIBRATED_SENSOR extension
[out]p_params_outPointer to the structure that will get the DSM parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1146 of file rs.cpp.

const char* rs2_get_error_message ( const rs2_error error)

Definition at line 1259 of file rs.cpp.

void rs2_get_extrinsics ( const rs2_stream_profile from,
const rs2_stream_profile to,
rs2_extrinsics extrin,
rs2_error **  error 
)
Parameters
[in]fromorigin stream profile
[in]totarget stream profile
[out]extrinextrinsics from origin to target
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1110 of file rs.cpp.

const char* rs2_get_failed_args ( const rs2_error error)

Definition at line 1258 of file rs.cpp.

const char* rs2_get_failed_function ( const rs2_error error)

Definition at line 1257 of file rs.cpp.

int rs2_get_flash_log ( rs2_device dev,
rs2_firmware_log_message fw_log_msg,
rs2_error **  error 
)

Gets RealSense flash log - this is a fw log that has been written in the device during the previous shutdown of the device.

Parameters
[in]devDevice from which the FW log should be taken
[in]fw_log_msgFirmware log message object to be filled
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if no firmware log was sent by the hardware monitor

Definition at line 3211 of file rs.cpp.

int rs2_get_frame_bits_per_pixel ( const rs2_frame frame,
rs2_error **  error 
)

retrieve bits per pixels in the frame image (note that bits per pixel is not necessarily divided by 8, as in 12bpp)

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
bits per pixel

Definition at line 978 of file rs.cpp.

const void* rs2_get_frame_data ( const rs2_frame frame,
rs2_error **  error 
)

retrieve data from frame handle

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the pointer to the start of the frame data

Definition at line 940 of file rs.cpp.

int rs2_get_frame_data_size ( const rs2_frame frame,
rs2_error **  error 
)

retrieve data size from frame handle

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the size of the frame data

Definition at line 933 of file rs.cpp.

int rs2_get_frame_height ( const rs2_frame frame,
rs2_error **  error 
)

retrieve frame height in pixels

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
frame height in pixels

Definition at line 955 of file rs.cpp.

rs2_metadata_type rs2_get_frame_metadata ( const rs2_frame frame,
rs2_frame_metadata_value  frame_metadata,
rs2_error **  error 
)

retrieve metadata from frame handle

Parameters
[in]framehandle returned from a callback
[in]frame_metadatathe rs2_frame_metadata whose latest frame we are interested in
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the metadata value

Definition at line 846 of file rs.cpp.

unsigned long long rs2_get_frame_number ( const rs2_frame frame,
rs2_error **  error 
)

retrieve frame number from frame handle

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the frame nubmer of the frame, in milliseconds since the device was started

Definition at line 986 of file rs.cpp.

int rs2_get_frame_points_count ( const rs2_frame frame,
rs2_error **  error 
)

When called on Points frame type, this method returns the number of vertices in the frame

Parameters
[in]framePoints frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Number of vertices

Definition at line 2179 of file rs.cpp.

rs2_sensor* rs2_get_frame_sensor ( const rs2_frame frame,
rs2_error **  error 
)

retrieve frame parent sensor from frame handle

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the parent sensor of the frame

Definition at line 922 of file rs.cpp.

const rs2_stream_profile* rs2_get_frame_stream_profile ( const rs2_frame frame,
rs2_error **  error 
)

Returns the stream profile that was used to start the stream of this frame

Parameters
[in]frameframe reference, owned by the user
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Pointer to the stream profile object, lifetime is managed elsewhere

Definition at line 971 of file rs.cpp.

int rs2_get_frame_stride_in_bytes ( const rs2_frame frame,
rs2_error **  error 
)

retrieve frame stride in bytes (number of bytes from start of line N to start of line N+1)

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
stride in bytes

Definition at line 963 of file rs.cpp.

rs2_pixel* rs2_get_frame_texture_coordinates ( const rs2_frame frame,
rs2_error **  error 
)

When called on Points frame type, this method returns a pointer to an array of texture coordinates per vertex Each coordinate represent a (u,v) pair within [0,1] range, to be mapped to texture image

Parameters
[in]framePoints frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Pointer to an array of texture coordinates, lifetime is managed by the frame

Definition at line 2171 of file rs.cpp.

rs2_time_t rs2_get_frame_timestamp ( const rs2_frame frame,
rs2_error **  error 
)

retrieve timestamp from frame handle in milliseconds

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the timestamp of the frame in milliseconds

Definition at line 908 of file rs.cpp.

rs2_timestamp_domain rs2_get_frame_timestamp_domain ( const rs2_frame frameset,
rs2_error **  error 
)

retrieve timestamp domain from frame handle. timestamps can only be comparable if they are in common domain (for example, depth timestamp might come from system time while color timestamp might come from the device) this method is used to check if two timestamp values are comparable (generated from the same clock)

Parameters
[in]framesethandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the timestamp domain of the frame (camera / microcontroller / system time)

Definition at line 915 of file rs.cpp.

rs2_vertex* rs2_get_frame_vertices ( const rs2_frame frame,
rs2_error **  error 
)

When called on Points frame type, this method returns a pointer to an array of 3D vertices of the model The coordinate system is: X right, Y up, Z away from the camera. Units: Meters

Parameters
[in]framePoints frame
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Pointer to an array of vertices, lifetime is managed by the frame

Definition at line 2154 of file rs.cpp.

int rs2_get_frame_width ( const rs2_frame frame,
rs2_error **  error 
)

retrieve frame width in pixels

Parameters
[in]framehandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
frame width in pixels

Definition at line 947 of file rs.cpp.

const char* rs2_get_full_log_message ( rs2_log_message const *  msg,
rs2_error **  error 
)

Definition at line 1385 of file rs.cpp.

int rs2_get_fw_log ( rs2_device dev,
rs2_firmware_log_message fw_log_msg,
rs2_error **  error 
)

Gets RealSense firmware log.

Parameters
[in]devDevice from which the FW log should be taken
[in]fw_log_msgFirmware log message object to be filled
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if no firmware log was sent by the hardware monitor

Definition at line 3195 of file rs.cpp.

const char* rs2_get_fw_log_parsed_file_name ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message file name.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
file name of the firmware log parsed message

Definition at line 3318 of file rs.cpp.

unsigned int rs2_get_fw_log_parsed_line ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message relevant line (in the file that is returned by rs2_get_fw_log_parsed_file_name).

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
line number of the firmware log parsed message

Definition at line 3339 of file rs.cpp.

const char* rs2_get_fw_log_parsed_message ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
message of the firmware log parsed message

Definition at line 3311 of file rs.cpp.

unsigned int rs2_get_fw_log_parsed_sequence_id ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message sequence id - cyclic number of FW log with [0..15] range.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
sequence of the firmware log parsed message

Definition at line 3353 of file rs.cpp.

rs2_log_severity rs2_get_fw_log_parsed_severity ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message severity.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
severity of the firmware log parsed message

Definition at line 3332 of file rs.cpp.

const char* rs2_get_fw_log_parsed_thread_name ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message thread name.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
thread name of the firmware log parsed message

Definition at line 3325 of file rs.cpp.

unsigned int rs2_get_fw_log_parsed_timestamp ( rs2_firmware_log_parsed_message fw_log_parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parsed message timestamp.

Parameters
[in]fw_log_parsed_msgfirmware log parsed message object
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
timestamp of the firmware log parsed message

Definition at line 3346 of file rs.cpp.

rs2_exception_type rs2_get_librealsense_exception_type ( const rs2_error error)

Definition at line 1260 of file rs.cpp.

const char* rs2_get_log_message_filename ( rs2_log_message const *  msg,
rs2_error **  error 
)

Definition at line 1369 of file rs.cpp.

unsigned rs2_get_log_message_line_number ( rs2_log_message const *  msg,
rs2_error **  error 
)

Definition at line 1361 of file rs.cpp.

float rs2_get_max_usable_depth_range ( rs2_sensor const *  sensor,
rs2_error **  error 
)

When called on a depth sensor, this method will return the maximum range of the camera given the amount of ambient light in the scene

Parameters
[in]sensordepth sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the max usable range in meters

Definition at line 2320 of file rs.cpp.

void rs2_get_motion_intrinsics ( const rs2_stream_profile mode,
rs2_motion_device_intrinsic intrinsics,
rs2_error **  error 
)

Obtain the intrinsics of a specific stream configuration from the device.

Parameters
[in]modeinput stream profile
[out]intrinsicsPointer to the struct to store the data in
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 455 of file rs.cpp.

rs2_notification_category rs2_get_notification_category ( rs2_notification notification,
rs2_error **  error 
)

retrieve category from notification handle

Parameters
[in]notificationhandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the notification category

Definition at line 875 of file rs.cpp.

const char* rs2_get_notification_description ( rs2_notification notification,
rs2_error **  error 
)

retrieve description from notification handle

Parameters
[in]notificationhandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the notification description

Definition at line 854 of file rs.cpp.

const char* rs2_get_notification_serialized_data ( rs2_notification notification,
rs2_error **  error 
)

retrieve serialized data from notification handle

Parameters
[in]notificationhandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the serialized data (in JSON format)

Definition at line 882 of file rs.cpp.

rs2_log_severity rs2_get_notification_severity ( rs2_notification notification,
rs2_error **  error 
)

retrieve severity from notification handle

Parameters
[in]notificationhandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the notification severity

Definition at line 868 of file rs.cpp.

rs2_time_t rs2_get_notification_timestamp ( rs2_notification notification,
rs2_error **  error 
)

retrieve timestamp from notification handle

Parameters
[in]notificationhandle returned from a callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the notification timestamp

Definition at line 861 of file rs.cpp.

unsigned int rs2_get_number_of_fw_logs ( rs2_device dev,
rs2_error **  error 
)

Returns number of fw logs already polled from device but not by user yet.

Parameters
[in]devDevice from which the FW log will be taken
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
number of fw logs already polled from device but not by user yet

Definition at line 3295 of file rs.cpp.

float rs2_get_option ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

read option value from the sensor

Parameters
[in]optionsthe options container
[in]optionoption id to be queried
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
value of the option

Definition at line 628 of file rs.cpp.

const char* rs2_get_option_description ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

get option description

Parameters
[in]optionsthe options container
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
human-readable option description

Definition at line 1007 of file rs.cpp.

rs2_option rs2_get_option_from_list ( const rs2_options_list options,
int  i,
rs2_error **  error 
)

get the specific option from options list

Parameters
[in]ithe index of the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 665 of file rs.cpp.

const char* rs2_get_option_name ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

get option name

Parameters
[in]optionsthe options container
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
human-readable option name

Definition at line 651 of file rs.cpp.

void rs2_get_option_range ( const rs2_options sensor,
rs2_option  option,
float *  min,
float *  max,
float *  step,
float *  def,
rs2_error **  error 
)

retrieve the available range of values of a supported option

Parameters
[in]sensorthe RealSense device
[in]optionthe option whose range should be queried
[out]minthe minimum value which will be accepted for this option
[out]maxthe maximum value which will be accepted for this option
[out]stepthe granularity of options which accept discrete values, or zero if the option accepts continuous values
[out]defthe default value of the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 686 of file rs.cpp.

const char* rs2_get_option_value_description ( const rs2_options options,
rs2_option  option,
float  value,
rs2_error **  error 
)

get option value description (in case specific option value hold special meaning)

Parameters
[in]optionsthe options container
[in]optionoption id to be checked
[in]valuevalue of the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
human-readable description of a specific value of an option or null if no special meaning

Definition at line 1022 of file rs.cpp.

rs2_options_list* rs2_get_options_list ( const rs2_options options,
rs2_error **  error 
)

get the list of supported options of options container

Parameters
[in]optionsthe options container
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 644 of file rs.cpp.

int rs2_get_options_list_size ( const rs2_options_list options,
rs2_error **  error 
)

get the size of options list

Parameters
[in]optionsthe option list
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 658 of file rs.cpp.

rs2_processing_block* rs2_get_processing_block ( const rs2_processing_block_list list,
int  index,
rs2_error **  error 
)

Returns specific processing blocks from processing blocks list

Parameters
[in]listthe processing blocks list
[in]indexthe requested processing block
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
processing block

Definition at line 2772 of file rs.cpp.

const char* rs2_get_processing_block_info ( const rs2_processing_block block,
rs2_camera_info  info,
rs2_error **  error 
)

Retrieve processing block specific information, like name.

Parameters
[in]blockThe processing block
[in]infoprocessing block info type to retrieve
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
The requested processing block info string, in a format specific to the device model

Definition at line 2795 of file rs.cpp.

const unsigned char* rs2_get_raw_data ( const rs2_raw_data_buffer buffer,
rs2_error **  error 
)

Retrieve char array from rs2_raw_data_buffer

Parameters
[in]bufferrs2_raw_data_buffer returned by rs2_send_and_receive_raw_data
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
raw data

Definition at line 567 of file rs.cpp.

int rs2_get_raw_data_size ( const rs2_raw_data_buffer buffer,
rs2_error **  error 
)

get the size of rs2_raw_data_buffer

Parameters
[in]bufferpointer to rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
size of rs2_raw_data_buffer

Definition at line 574 of file rs.cpp.

const char* rs2_get_raw_log_message ( rs2_log_message const *  msg,
rs2_error **  error 
)

Definition at line 1377 of file rs.cpp.

rs2_processing_block_list* rs2_get_recommended_processing_blocks ( rs2_sensor sensor,
rs2_error **  error 
)

Returns the list of recommended processing blocks for a specific sensor. Order and configuration of the blocks are decided by the sensor

Parameters
[in]sensorinput sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
list of supported sensor recommended processing blocks

Definition at line 2765 of file rs.cpp.

int rs2_get_recommended_processing_blocks_count ( const rs2_processing_block_list list,
rs2_error **  error 
)

Returns the processing blocks list size

Parameters
[in]listthe processing blocks list
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the processing block list size

Definition at line 2781 of file rs.cpp.

void rs2_get_region_of_interest ( const rs2_sensor sensor,
int *  min_x,
int *  min_y,
int *  max_x,
int *  max_y,
rs2_error **  error 
)

gets the active region of interest to be used by auto-exposure algorithm

Parameters
[in]sensorthe RealSense sensor
[out]min_xlower horizontal bound in pixels
[out]min_ylower vertical bound in pixels
[out]max_xupper horizontal bound in pixels
[out]max_yupper vertical bound in pixels
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1238 of file rs.cpp.

const char* rs2_get_sensor_info ( const rs2_sensor sensor,
rs2_camera_info  info,
rs2_error **  error 
)

retrieve sensor specific information, like versions of various internal components

Parameters
[in]sensorthe RealSense sensor
[in]infocamera info type to retrieve
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the requested camera info string, in a format specific to the device model

Definition at line 724 of file rs.cpp.

int rs2_get_sensors_count ( const rs2_sensor_list info_list,
rs2_error **  error 
)

Determines number of sensors in a list

Parameters
[in]info_listThe list of connected sensors captured using rs2_query_sensors
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Sensors count

Definition at line 267 of file rs.cpp.

int rs2_get_static_node ( const rs2_sensor sensor,
const char *  guid,
rs2_vector pos,
rs2_quaternion orient,
rs2_error **  error 
)

Retrieve a named location tag

Parameters
[in]sensorT2xx position-tracking sensor
[in]guidNull-terminated string of up to 127 characters
[out]posPosition in meters of the tagged (stored) location
[out]orientQuaternion orientation of the tagged (stored) location
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Non-zero if succeeded, otherwise 0

Definition at line 2852 of file rs.cpp.

float rs2_get_stereo_baseline ( rs2_sensor sensor,
rs2_error **  error 
)

Retrieve the stereoscopic baseline value from sensor. Applicable to stereo-based depth modules

Parameters
[out]floatStereoscopic baseline in millimeters
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2330 of file rs.cpp.

const rs2_stream_profile* rs2_get_stream_profile ( const rs2_stream_profile_list list,
int  index,
rs2_error **  error 
)

Get pointer to specific stream profile

Parameters
[in]listthe list of supported profiles returned by rs2_get_supported_profiles
[in]indexthe zero based index of the streaming mode
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 351 of file rs.cpp.

void rs2_get_stream_profile_data ( const rs2_stream_profile mode,
rs2_stream stream,
rs2_format format,
int *  index,
int *  unique_id,
int *  framerate,
rs2_error **  error 
)

Extract common parameters of a stream profiles

Parameters
[in]modeinput stream profile
[out]streamstream type of the input profile
[out]formatbinary data format of the input profile
[out]indexstream index the input profile in case there are multiple streams of the same type
[out]unique_ididentifier for the stream profile, unique within the application
[out]framerateexpected rate for data frames to arrive, meaning expected number of frames per second
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 484 of file rs.cpp.

rs2_stream_profile_list* rs2_get_stream_profiles ( rs2_sensor sensor,
rs2_error **  error 
)

check if physical subdevice is supported

Parameters
[in]sensorinput RealSense subdevice
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
list of stream profiles that given subdevice can provide, should be released by rs2_delete_profiles_list

Definition at line 327 of file rs.cpp.

int rs2_get_stream_profiles_count ( const rs2_stream_profile_list list,
rs2_error **  error 
)

get the number of supported stream profiles

Parameters
[in]listthe list of supported profiles returned by rs2_get_supported_profiles
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
number of supported subdevice profiles

Definition at line 360 of file rs.cpp.

rs2_time_t rs2_get_time ( rs2_error **  error)

return the time at specific time point

Parameters
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the time at specific time point, in live and record mode it will return the system time and in playback mode it will return the recorded time

Definition at line 2422 of file rs.cpp.

void rs2_get_video_stream_intrinsics ( const rs2_stream_profile mode,
rs2_intrinsics intrinsics,
rs2_error **  error 
)

When called on a video profile, returns the intrinsics of specific stream configuration

Parameters
[in]modeinput stream profile
[out]intrinsicsresulting intrinsics for the video profile
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 374 of file rs.cpp.

void rs2_get_video_stream_resolution ( const rs2_stream_profile mode,
int *  width,
int *  height,
rs2_error **  error 
)

When called on a video stream profile, will return the width and the height of the stream

Parameters
[in]modeinput stream profile
[out]widthwidth in pixels of the video stream
[out]heightheight in pixels of the video stream
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 466 of file rs.cpp.

void rs2_hardware_reset ( const rs2_device device,
rs2_error **  error 
)

Send hardware reset request to the device. The actual reset is asynchronous. Note: Invalidates all handles to this device.

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

Definition at line 1176 of file rs.cpp.

const char* rs2_host_perf_mode_to_string ( rs2_host_perf_mode  mode)

Definition at line 1285 of file rs.cpp.

int rs2_import_localization_map ( const rs2_sensor sensor,
const unsigned char *  lmap_blob,
unsigned int  blob_size,
rs2_error **  error 
)

Imports a localization map from file to tm2 tracking device

Parameters
[in]sensorTM2 position-tracking sensor
[in]lmap_blobLocalization map raw buffer, serialized
[in]blob_sizeThe buffer's size in bytes
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Non-zero if succeeded, otherwise 0

Definition at line 2815 of file rs.cpp.

int rs2_init_fw_log_parser ( rs2_device dev,
const char *  xml_content,
rs2_error **  error 
)

Initializes RealSense firmware logs parser in device.

Parameters
[in]devDevice from which the FW log will be taken
[in]xml_contentcontent of the xml file needed for parsing
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if opening the xml from the xml_path input fails

Definition at line 3260 of file rs.cpp.

int rs2_is_device_extendable_to ( const rs2_device device,
rs2_extension  extension,
rs2_error **  error 
)

Test if the given device can be extended to the requested extension.

Parameters
[in]deviceRealsense device
[in]extensionThe extension to which the device should be tested if it is extendable
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Non-zero value iff the device can be extended to the given extension

Definition at line 1425 of file rs.cpp.

int rs2_is_frame_extendable_to ( const rs2_frame frame,
rs2_extension  extension_type,
rs2_error **  error 
)

Test if the given frame can be extended to the requested extension

Parameters
[in]frameRealsense frame
[in]extension_typeThe extension to which the frame should be tested if it is extendable
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
non-zero value iff the frame can be extended to the given extension

Definition at line 1461 of file rs.cpp.

int rs2_is_option_read_only ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

check if an option is read-only

Parameters
[in]optionsthe options container
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if option is read-only

Definition at line 621 of file rs.cpp.

int rs2_is_processing_block_extendable_to ( const rs2_processing_block block,
rs2_extension  extension_type,
rs2_error **  error 
)

Test if the given processing block can be extended to the requested extension

Parameters
[in]blockprocessing block
[in]extensionThe extension to which the sensor should be tested if it is extendable
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
non-zero value iff the processing block can be extended to the given extension

Definition at line 1481 of file rs.cpp.

int rs2_is_sensor_extendable_to ( const rs2_sensor sensor,
rs2_extension  extension,
rs2_error **  error 
)

Test if the given sensor can be extended to the requested extension

Parameters
[in]sensorRealsense sensor
[in]extensionThe extension to which the sensor should be tested if it is extendable
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
non-zero value iff the sensor can be extended to the given extension

Definition at line 1394 of file rs.cpp.

int rs2_is_stream_profile_default ( const rs2_stream_profile mode,
rs2_error **  error 
)

Returns non-zero if selected profile is recommended for the sensor This is an optional hint we offer to suggest profiles with best performance-quality tradeof

Parameters
[in]modeinput stream profile
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
non-zero if selected profile is recommended for the sensor

Definition at line 477 of file rs.cpp.

void rs2_keep_frame ( rs2_frame frame)

communicate to the library you intend to keep the frame alive for a while this will remove the frame from the regular count of the frame pool once this function is called, the SDK can no longer guarantee 0-allocations during frame cycling

Parameters
[in]framehandle returned from a callback

Definition at line 1000 of file rs.cpp.

const char* rs2_l500_visual_preset_to_string ( rs2_l500_visual_preset  preset)

Definition at line 1278 of file rs.cpp.

void rs2_load_json ( rs2_device dev,
const void json_content,
unsigned  content_size,
rs2_error **  error 
)

Definition at line 3177 of file rs.cpp.

int rs2_load_wheel_odometry_config ( const rs2_sensor sensor,
const unsigned char *  odometry_config_buf,
unsigned int  blob_size,
rs2_error **  error 
)

Load Wheel odometer settings from host to device

Parameters
[in]odometry_config_bufodometer configuration/calibration blob serialized from jsom file
Returns
true on success

Definition at line 2891 of file rs.cpp.

void rs2_log ( rs2_log_severity  severity,
const char *  message,
rs2_error **  error 
)

Add custom message into librealsense log

Parameters
[in]severityThe log level for the message to be written under
[in]messageMessage to be logged
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2600 of file rs.cpp.

const char* rs2_log_severity_to_string ( rs2_log_severity  severity)

Definition at line 1271 of file rs.cpp.

void rs2_log_to_callback ( rs2_log_severity  min_severity,
rs2_log_callback_ptr  on_log,
void arg,
rs2_error **  error 
)

Definition at line 1351 of file rs.cpp.

void rs2_log_to_callback_cpp ( rs2_log_severity  min_severity,
rs2_log_callback callback,
rs2_error **  error 
)

Definition at line 1299 of file rs.cpp.

void rs2_log_to_console ( rs2_log_severity  min_severity,
rs2_error **  error 
)

Definition at line 1287 of file rs.cpp.

void rs2_log_to_file ( rs2_log_severity  min_severity,
const char *  file_path,
rs2_error **  error 
)

Definition at line 1293 of file rs.cpp.

void rs2_loopback_disable ( const rs2_device device,
rs2_error **  error 
)

Restores the given device into normal operation mode

Parameters
[in]deviceDevice to restore to normal operation mode
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2640 of file rs.cpp.

void rs2_loopback_enable ( const rs2_device device,
const char *  from_file,
rs2_error **  error 
)

Enter the given device into loopback operation mode that uses the given file as input for raw data

Parameters
[in]deviceDevice to enter into loopback operation mode
[in]from_filePath to bag file with raw data for loopback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2629 of file rs.cpp.

int rs2_loopback_is_enabled ( const rs2_device device,
rs2_error **  error 
)

Checks if the device is in loopback mode or not

Parameters
[in]deviceDevice to check for operation mode
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if the device is in loopback operation mode

Definition at line 2649 of file rs.cpp.

const char* rs2_notification_category_to_string ( rs2_notification_category  category)

Definition at line 1268 of file rs.cpp.

void rs2_open ( rs2_sensor device,
const rs2_stream_profile profile,
rs2_error **  error 
)

open subdevice for exclusive access, by committing to a configuration

Parameters
[in]devicerelevant RealSense device
[in]profilestream profile that defines single stream configuration
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 588 of file rs.cpp.

void rs2_open_multiple ( rs2_sensor device,
const rs2_stream_profile **  profiles,
int  count,
rs2_error **  error 
)

open subdevice for exclusive access, by committing to composite configuration, specifying one or more stream profiles this method should be used for interdependent streams, such as depth and infrared, that have to be configured together

Parameters
[in]devicerelevant RealSense device
[in]profileslist of stream profiles discovered by get_stream_profiles
[in]countnumber of simultaneous stream profiles to configure
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 599 of file rs.cpp.

const char* rs2_option_to_string ( rs2_option  option)

Definition at line 1265 of file rs.cpp.

void rs2_override_dsm_params ( rs2_sensor const *  sensor,
rs2_dsm_params const *  p_params,
rs2_error **  error 
)

Set the sensor DSM parameters This should ideally be done when the stream is NOT running. If it is, the parameters may not take effect immediately.

Parameters
[in]sensorSensor that supports the CALIBRATED_SENSOR extension
[out]p_paramsPointer to the structure that contains the DSM parameters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1156 of file rs.cpp.

void rs2_override_extrinsics ( const rs2_sensor sensor,
const rs2_extrinsics extrinsics,
rs2_error **  error 
)

Override extrinsics of a given sensor that supports calibrated_sensor.

This will affect extrinsics at the source device and may affect multiple profiles. Used for DEPTH_TO_RGB calibration.

Parameters
[in]sensorThe sensor
[in]extrinsicsExtrinsics from Depth to the named sensor
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1136 of file rs.cpp.

void rs2_override_intrinsics ( const rs2_sensor sensor,
const rs2_intrinsics intrinsics,
rs2_error **  error 
)

Override intrinsics of a given sensor that supports calibrated_sensor.

This will affect intrinsics at the source and may affect multiple profiles. Used for DEPTH_TO_RGB calibration.

Parameters
[in]sensorThe RealSense device
[in]intrinsicsIntrinsics value to be written to the sensor
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2688 of file rs.cpp.

int rs2_parse_firmware_log ( rs2_device dev,
rs2_firmware_log_message fw_log_msg,
rs2_firmware_log_parsed_message parsed_msg,
rs2_error **  error 
)

Gets RealSense firmware log parser.

Parameters
[in]devDevice from which the FW log will be taken
[in]fw_log_msgfirmware log message to be parsed
[in]parsed_msgfirmware log parsed message - place holder for the resulting parsed message
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
true for success, false for failure - failure happens if message could not be parsed

Definition at line 3280 of file rs.cpp.

rs2_pipeline_profile* rs2_pipeline_get_active_profile ( rs2_pipeline pipe,
rs2_error **  error 
)

Return the active device and streams profiles, used by the pipeline. The pipeline streams profiles are selected during start(). The method returns a valid result only when the pipeline is active - between calls to start() and stop(). After stop() is called, the pipeline doesn't own the device, thus, the pipeline selected device may change in subsequent activations.

Parameters
[in]pipea pointer to an instance of the pipeline
[out]errorif 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 on start.

Definition at line 1880 of file rs.cpp.

int rs2_pipeline_poll_for_frames ( rs2_pipeline pipe,
rs2_frame **  output_frame,
rs2_error **  error 
)

Check if a new set of frames is available and retrieve the latest undelivered set. The frames set includes time-synchronized frames of each enabled stream in the pipeline. The method returns without blocking the calling thread, with status of new frames available or not. If available, it fetches the latest frames set. Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate. The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following calls to this method shall return no new frames, until resources are retained.

Parameters
[in]pipethe pipeline
[out]output_frameframe handle to be released using rs2_release_frame
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if new frame was stored to output_frame

Definition at line 1785 of file rs.cpp.

rs2_device* rs2_pipeline_profile_get_device ( rs2_pipeline_profile profile,
rs2_error **  error 
)

Retrieve the device used by the pipeline. The device class provides the application access to control camera additional settings - get device information, sensor options information, options value query and set, sensor specific extensions. Since the pipeline controls the device streams configuration, activation state and frames reading, calling the device API functions, which execute those operations, results in unexpected behavior. The pipeline streaming device is selected during pipeline start(). Devices of profiles, which are not returned by pipeline start() or get_active_profile(), are not guaranteed to be used by the pipeline.

Parameters
[in]profileA pointer to an instance of a pipeline profile
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
rs2_device* The pipeline selected device

Definition at line 1888 of file rs.cpp.

rs2_stream_profile_list* rs2_pipeline_profile_get_streams ( rs2_pipeline_profile profile,
rs2_error **  error 
)

Return the selected streams profiles, which are enabled in this profile.

Parameters
[in]profileA pointer to an instance of a pipeline profile
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
list of stream profiles

Definition at line 1898 of file rs.cpp.

rs2_pipeline_profile* rs2_pipeline_start ( rs2_pipeline pipe,
rs2_error **  error 
)

Start the pipeline streaming with its default configuration. The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model. During the loop execution, the application can access the camera streams by calling wait_for_frames() or poll_for_frames(). The streaming loop runs until the pipeline is stopped. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.

Parameters
[in]pipea pointer to an instance of the pipeline
[out]errorif 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.

Definition at line 1827 of file rs.cpp.

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
[in]pipeA pointer to an instance of the pipeline
[in]on_framefunction pointer to register as per-frame callback
[in]userauxiliary data the user wishes to receive together with every frame callback
[out]errorIf 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.

Definition at line 1842 of file rs.cpp.

rs2_pipeline_profile* rs2_pipeline_start_with_callback_cpp ( rs2_pipeline pipe,
rs2_frame_callback callback,
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
[in]pipeA pointer to an instance of the pipeline
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock
[out]errorIf 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.

Definition at line 1859 of file rs.cpp.

rs2_pipeline_profile* rs2_pipeline_start_with_config ( rs2_pipeline pipe,
rs2_config config,
rs2_error **  error 
)

Start the pipeline streaming according to the configuraion. The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model. During the loop execution, the application can access the camera streams by calling wait_for_frames() or poll_for_frames(). The streaming loop runs until the pipeline is stopped. Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised. The pipeline selects and activates the device upon start, according to configuration or a default configuration. When the rs2::config is provided to the method, the pipeline tries to activate the config resolve() result. If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails. Available configurations and devices may change between config resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.

Parameters
[in]pipea pointer to an instance of the pipeline
[in]configA rs2::config with requested filters on the pipeline configuration. By default no filters are applied.
[out]errorif 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.

Definition at line 1834 of file rs.cpp.

rs2_pipeline_profile* rs2_pipeline_start_with_config_and_callback ( rs2_pipeline pipe,
rs2_config config,
rs2_frame_callback_ptr  on_frame,
void user,
rs2_error **  error 
)

Start the pipeline streaming according to the configuraion. 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. The pipeline selects and activates the device upon start, according to configuration or a default configuration. When the rs2::config is provided to the method, the pipeline tries to activate the config resolve() result. If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails. Available configurations and devices may change between config resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.

Parameters
[in]pipeA pointer to an instance of the pipeline
[in]configA rs2::config with requested filters on the pipeline configuration. By default no filters are applied.
[in]on_framefunction pointer to register as per-frame callback
[in]userauxiliary data the user wishes to receive together with every frame callback
[out]errorIf 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.

Definition at line 1850 of file rs.cpp.

rs2_pipeline_profile* rs2_pipeline_start_with_config_and_callback_cpp ( rs2_pipeline pipe,
rs2_config config,
rs2_frame_callback callback,
rs2_error **  error 
)

Start the pipeline streaming according to the configuraion. 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. The pipeline selects and activates the device upon start, according to configuration or a default configuration. When the rs2::config is provided to the method, the pipeline tries to activate the config resolve() result. If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails. Available configurations and devices may change between config resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.

Parameters
[in]pipeA pointer to an instance of the pipeline
[in]configA rs2::config with requested filters on the pipeline configuration. By default no filters are applied.
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock
[out]errorIf 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.

Definition at line 1869 of file rs.cpp.

void rs2_pipeline_stop ( rs2_pipeline pipe,
rs2_error **  error 
)

Stop the pipeline streaming. The pipeline stops delivering samples to the attached computer vision modules and processing blocks, stops the device streaming and releases the device resources used by the pipeline. It is the application's responsibility to release any frame reference it owns. The method takes effect only after start() was called, otherwise an exception is raised.

Parameters
[in]pipepipeline
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1766 of file rs.cpp.

int rs2_pipeline_try_wait_for_frames ( rs2_pipeline pipe,
rs2_frame **  output_frame,
unsigned int  timeout_ms,
rs2_error **  error 
)

Wait until a new set of frames becomes available. The frames set includes time-synchronized frames of each enabled stream in the pipeline. The method blocks the calling thread, and fetches the latest unread frames set. Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate. The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources are retained.

Parameters
[in]pipethe pipeline
[in]timeout_msmax time in milliseconds to wait until a frame becomes available
[out]output_frameframe handle to be released using rs2_release_frame
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if new frame was stored to output_frame

Definition at line 1802 of file rs.cpp.

rs2_frame* rs2_pipeline_wait_for_frames ( rs2_pipeline pipe,
unsigned int  timeout_ms,
rs2_error **  error 
)

Wait until a new set of frames becomes available. The frames set includes time-synchronized frames of each enabled stream in the pipeline. The method blocks the calling thread, and fetches the latest unread frames set. Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate. The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources are retained.

Parameters
[in]pipethe pipeline
[in]timeout_msMax time in milliseconds to wait until an exception will be thrown
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Set of coherent frames

Definition at line 1774 of file rs.cpp.

rs2_playback_status rs2_playback_device_get_current_status ( const rs2_device device,
rs2_error **  error 
)

Returns the current state of the playback device

Parameters
[in]deviceA playback device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Current state of the playback

Definition at line 1632 of file rs.cpp.

const char* rs2_playback_device_get_file_path ( const rs2_device device,
rs2_error **  error 
)

Gets the path of the file used by the playback device

Parameters
[in]deviceA playback device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Path to the file used by the playback device

Definition at line 1556 of file rs.cpp.

int rs2_playback_device_is_real_time ( const rs2_device device,
rs2_error **  error 
)

Indicates if playback is in real time mode or non real time

Parameters
[in]deviceA playback device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
True iff playback is in real time mode. 0 means false, otherwise true

Definition at line 1613 of file rs.cpp.

void rs2_playback_device_pause ( const rs2_device device,
rs2_error **  error 
)

Un-pauses the playback Calling resume() while playback status is "Playing" or "Stopped" does nothing

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

Definition at line 1597 of file rs.cpp.

void rs2_playback_device_resume ( const rs2_device device,
rs2_error **  error 
)

Pauses the playback Calling pause() in "Paused" status does nothing If pause() is called while playback status is "Playing" or "Stopped", the playback will not play until resume() is called

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

Definition at line 1589 of file rs.cpp.

void rs2_playback_device_set_playback_speed ( const rs2_device device,
float  speed,
rs2_error **  error 
)

Set the playing speed

Parameters
[in]deviceA playback device
[in]speedIndicates a multiplication of the speed to play (e.g: 1 = normal, 0.5 twice as slow)
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1640 of file rs.cpp.

void rs2_playback_device_set_real_time ( const rs2_device device,
int  real_time,
rs2_error **  error 
)

Set the playback to work in real time or non real time

In real time mode, playback will play the same way the file was recorded. In real time mode if the application takes too long to handle the callback, frames may be dropped. In non real time mode, playback will wait for each callback to finish handling the data before reading the next frame. In this mode no frames will be dropped, and the application controls the frame rate of the playback (according to the callback handler duration).

Parameters
[in]deviceA playback device
[in]real_timeIndicates if real time is requested, 0 means false, otherwise true
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1605 of file rs.cpp.

void rs2_playback_device_set_status_changed_callback ( const rs2_device device,
rs2_playback_status_changed_callback callback,
rs2_error **  error 
)

Register to receive callback from playback device upon its status changes

Callbacks are invoked from the reading thread, any heavy processing in the callback handler will affect the reading thread and may cause frame drops\ high latency

Parameters
[in]deviceA playback device
[in]callbackA callback handler that will be invoked when the playback status changes
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1621 of file rs.cpp.

void rs2_playback_device_stop ( const rs2_device device,
rs2_error **  error 
)

Stops the playback Calling stop() will stop all streaming playbakc sensors and will reset the playback (returning to beginning of file)

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

Definition at line 1648 of file rs.cpp.

unsigned long long int rs2_playback_get_duration ( const rs2_device device,
rs2_error **  error 
)

Gets the total duration of the file in units of nanoseconds

Parameters
[in]deviceA playback device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Total duration of the file in units of nanoseconds

Definition at line 1564 of file rs.cpp.

unsigned long long int rs2_playback_get_position ( const rs2_device device,
rs2_error **  error 
)

Gets the current position of the playback in the file in terms of time. Units are expressed in nanoseconds

Parameters
[in]deviceA playback device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Current position of the playback in the file in terms of time. Units are expressed in nanoseconds

Definition at line 1581 of file rs.cpp.

void rs2_playback_seek ( const rs2_device device,
long long int  time,
rs2_error **  error 
)

Set the playback to a specified time point of the played data

Parameters
[in]deviceA playback device.
[in]timeThe time point to which playback should seek, expressed in units of nanoseconds (zero value = start)
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1572 of file rs.cpp.

const char* rs2_playback_status_to_string ( rs2_playback_status  status)

Definition at line 1273 of file rs.cpp.

int rs2_poll_for_frame ( rs2_frame_queue queue,
rs2_frame **  output_frame,
rs2_error **  error 
)

poll if a new frame is available and dequeue if it is

Parameters
[in]queuethe frame queue data structure
[out]output_frameframe handle to be released using rs2_release_frame
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if new frame was stored to output_frame

Definition at line 1058 of file rs.cpp.

void rs2_pose_frame_get_pose_data ( const rs2_frame frame,
rs2_pose pose,
rs2_error **  error 
)

When called on Pose frame type, this method returns the transformation represented by the pose data

Parameters
[in]framePose frame
[out]posePointer to a user allocated struct, which contains the pose info after a successful return
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2372 of file rs.cpp.

void rs2_process_frame ( rs2_processing_block block,
rs2_frame frame,
rs2_error **  error 
)

This method is used to pass frame into a processing block

Parameters
[in]blockProcessing block
[in]frameFrame to process, ownership is moved to the block object
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2097 of file rs.cpp.

int rs2_processing_block_register_simple_option ( rs2_processing_block block,
rs2_option  option_id,
float  min,
float  max,
float  step,
float  def,
rs2_error **  error 
)

This method adds a custom option to a custom processing block. This is a simple float that can be accessed via rs2_set_option and rs2_get_option This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as save_to_ply, etc..

Parameters
[in]blockProcessing block
[in]option_idan int ID for referencing the option
[in]minthe minimum value which will be accepted for this option
[in]maxthe maximum value which will be accepted for this option
[in]stepthe granularity of options which accept discrete values, or zero if the option accepts continuous values
[in]defthe default value of the option. This will be the initial value.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if adding the option succeeds. false if it fails e.g. an option with this id is already registered

Definition at line 2046 of file rs.cpp.

rs2_device_list* rs2_query_devices ( const rs2_context context,
rs2_error **  error 
)

create a static snapshot of all connected devices at the time of the call

Parameters
contextObject representing librealsense session
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the list of devices, should be released by rs2_delete_device_list

Definition at line 208 of file rs.cpp.

rs2_device_list* rs2_query_devices_ex ( const rs2_context context,
int  product_mask,
rs2_error **  error 
)

create a static snapshot of all connected devices at the time of the call

Parameters
contextObject representing librealsense session
product_maskControls what kind of devices will be returned
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
the list of devices, should be released by rs2_delete_device_list

Definition at line 214 of file rs.cpp.

rs2_sensor_list* rs2_query_sensors ( const rs2_device device,
rs2_error **  error 
)

Create a static snapshot of all connected sensors within a specific device.

Parameters
[in]deviceSpecific RealSense device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
The list of sensors, should be released by rs2_delete_sensor_list

Definition at line 236 of file rs.cpp.

const char* rs2_record_device_filename ( const rs2_device device,
rs2_error **  error 
)

Gets the name of the file to which the recorder is writing

Parameters
[in]deviceA recording device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
The name of the file to which the recorder is writing

Definition at line 1695 of file rs.cpp.

void rs2_record_device_pause ( const rs2_device device,
rs2_error **  error 
)

Pause the recording device without stopping the actual device from streaming. Pausing will cause the device to stop writing new data to the file, in particular, frames and changes to extensions

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

Definition at line 1679 of file rs.cpp.

void rs2_record_device_resume ( const rs2_device device,
rs2_error **  error 
)

Unpause the recording device. Resume will cause the device to continue writing new data to the file, in particular, frames and changes to extensions

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

Definition at line 1687 of file rs.cpp.

void rs2_register_calibration_change_callback ( rs2_device dev,
rs2_calibration_change_callback_ptr  callback,
void user,
rs2_error **  error 
)

Adds a callback for a sensor that gets called when calibration (intrinsics) changes, e.g. due to auto-calibration

Parameters
[in]sensorthe sensor
[in]callbackthe C callback function that gets called
[in]useruser argument that gets passed to the callback function
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 417 of file rs.cpp.

void rs2_register_calibration_change_callback_cpp ( rs2_device dev,
rs2_calibration_change_callback callback,
rs2_error **  error 
)

Adds a callback for a sensor that gets called when calibration (intrinsics) changes, e.g. due to auto-calibration

Parameters
[in]sensorthe sensor
[in]callbackthe C++ callback interface that gets called
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 431 of file rs.cpp.

void rs2_register_extrinsics ( const rs2_stream_profile from,
const rs2_stream_profile to,
rs2_extrinsics  extrin,
rs2_error **  error 
)
Parameters
[in]fromorigin stream profile
[in]totarget stream profile
[out]extrinextrinsics from origin to target
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1125 of file rs.cpp.

void rs2_release_frame ( rs2_frame frame)

relases the frame handle

Parameters
[in]framehandle returned from a callback

Definition at line 993 of file rs.cpp.

int rs2_remove_static_node ( const rs2_sensor sensor,
const char *  guid,
rs2_error **  error 
)

Remove a named location tag

Parameters
[in]sensorT2xx position-tracking sensor
[in]guidNull-terminated string of up to 127 characters
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Non-zero if succeeded, otherwise 0

Definition at line 2879 of file rs.cpp.

void rs2_reset_logger ( rs2_error **  error)

Definition at line 1308 of file rs.cpp.

void rs2_reset_sensor_calibration ( rs2_sensor const *  sensor,
rs2_error **  error 
)

Reset the sensor DSM parameters This should ideally be done when the stream is NOT running. May not take effect immediately.

Parameters
[in]sensorSensor that supports the CALIBRATED_SENSOR extension
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1166 of file rs.cpp.

void rs2_reset_to_factory_calibration ( const rs2_device device,
rs2_error **  e 
)

Reset device to factory calibration

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

Definition at line 2733 of file rs.cpp.

const rs2_raw_data_buffer* rs2_run_on_chip_calibration ( rs2_device device,
const void json_content,
int  content_size,
float *  health,
rs2_update_progress_callback_ptr  callback,
void client_data,
int  timeout_ms,
rs2_error **  error 
)

This will improve the depth noise.

Parameters
[in]json_contentJson string to configure regular speed on chip calibration parameters: { "calib type" : 0, "speed": 3, "scan parameter": 0, "adjust both sides": 0, "white wall mode": 0 } calib_type - calibraton type: 0 = regular, 1 = focal length, 2 = both regular and focal length in order speed - for regular calibration, value can be one of: Very fast = 0, Fast = 1, Medium = 2, Slow = 3, White wall = 4, default is Slow for type 0 and Fast for type 2 scan_parameter - for regular calibration. value can be one of: Py scan (default) = 0, Rx scan = 1 adjust_both_sides - for focal length calibration. value can be one of: 0 = adjust right only, 1 = adjust both sides white_wall_mode - white wall mode: 0 for normal mode and 1 for white wall mode if json is nullptr it will be ignored and calibration will use the default parameters
[out]healthThe absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.25) - Good [0.25, 0.75) - Can be Improved [0.75, ) - Requires Calibration The absolute value of focal length calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.15) - Good [0.15, 0.75) - Can be Improved [0.75, ) - Requires Calibration The two health numbers are encoded in one integer as follows for calib_type 2: Regular health number times 1000 are bits 0 to 11 Regular health number is negative if bit 24 is 1 Focal length health number times 1000 are bits 12 to 23 Focal length health number is negative if bit 25 is 1
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[in]client_dataOptional client data for the callback
[in]timeout_msTimeout in ms (use 5000 msec unless instructed otherwise)
Returns
New calibration table

Definition at line 3074 of file rs.cpp.

const rs2_raw_data_buffer* rs2_run_on_chip_calibration_cpp ( rs2_device device,
const void json_content,
int  content_size,
float *  health,
rs2_update_progress_callback progress_callback,
int  timeout_ms,
rs2_error **  error 
)

This will improve the depth noise.

Parameters
[in]json_contentJson string to configure regular speed on chip calibration parameters: { "calib type" : 0, "speed": 3, "scan parameter": 0, "adjust both sides": 0, "white wall mode": 0 } calib_type - calibraton type: 0 = regular, 1 = focal length, 2 = both regular and focal length in order speed - for regular calibration. value can be one of: Very fast = 0, Fast = 1, Medium = 2, Slow = 3, White wall = 4, default is Slow for type 0 and Fast for type 2 scan_parameter - for regular calibration. value can be one of: Py scan (default) = 0, Rx scan = 1 adjust_both_sides - for focal length calibration. value can be one of: 0 = adjust right only, 1 = adjust both sides white_wall_mode - white wall mode: 0 for normal mode and 1 for white wall mode if json is nullptr it will be ignored and calibration will use the default parameters
[out]healthThe absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.25) - Good [0.25, 0.75) - Can be Improved [0.75, ) - Requires Calibration The absolute value of focal length calibration Health-Check captures how far camera calibration is from the optimal one [0, 0.15) - Good [0.15, 0.75) - Can be Improved [0.75, ) - Requires Calibration The two health numbers are encoded in one integer as follows for calib_type 2: Regular health number times 1000 are bits 0 to 11 Regular health number is negative if bit 24 is 1 Focal length health number times 1000 are bits 12 to 23 Focal length health number is negative if bit 25 is 1
[in]callbackOptional callback to get progress notifications
[in]timeout_msTimeout in ms (use 5000 msec unless instructed otherwise)
Returns
New calibration table

Definition at line 3052 of file rs.cpp.

const rs2_raw_data_buffer* rs2_run_tare_calibration ( rs2_device dev,
float  ground_truth_mm,
const void json_content,
int  content_size,
rs2_update_progress_callback_ptr  callback,
void client_data,
int  timeout_ms,
rs2_error **  error 
)

This will adjust camera absolute distance to flat target. User needs to enter the known ground truth.

Parameters
[in]ground_truth_mmGround truth in mm must be between 60 and 10000
[in]json_contentJson string to configure tare calibration parameters: { "average_step_count": 20, "step count": 20, "accuracy": 2, "scan parameter": 0, "data sampling": 0 } average step count - number of frames to average, must be between 1 - 30, default = 20 step count - max iteration steps, must be between 5 - 30, default = 10 accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is very high (0.025%) scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1 data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1 if json is nullptr it will be ignored and calibration will use the default parameters
[in]content_sizeJson string size if its 0 the json will be ignored and calibration will use the default parameters
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[in]client_dataOptional client data for the callback
[in]timeout_msTimeout in ms (use 5000 msec unless instructed otherwise)
Returns
New calibration table

Definition at line 3122 of file rs.cpp.

const rs2_raw_data_buffer* rs2_run_tare_calibration_cpp ( rs2_device dev,
float  ground_truth_mm,
const void json_content,
int  content_size,
rs2_update_progress_callback progress_callback,
int  timeout_ms,
rs2_error **  error 
)

This will adjust camera absolute distance to flat target. User needs to enter the known ground truth.

Parameters
[in]ground_truth_mmGround truth in mm must be between 60 and 10000
[in]json_contentJson string to configure tare calibration parameters: { "average step count": 20, "step count": 20, "accuracy": 2, "scan parameter": 0, "data sampling": 0 } average step count - number of frames to average, must be between 1 - 30, default = 20 step count - max iteration steps, must be between 5 - 30, default = 10 accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is very high (0.025%) scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1 data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1 if json is nullptr it will be ignored and calibration will use the default parameters
[in]content_sizeJson string size if its 0 the json will be ignored and calibration will use the default parameters
[in]callbackOptional callback to get progress notifications
[in]timeout_msTimeout in ms (use 5000 msec unless instructed otherwise)
Returns
New calibration table

Definition at line 3102 of file rs.cpp.

const rs2_raw_data_buffer* rs2_send_and_receive_raw_data ( rs2_device device,
void raw_data_to_send,
unsigned  size_of_raw_data_to_send,
rs2_error **  error 
)

Send raw data to device

Parameters
[in]deviceRealSense device to send data to
[in]raw_data_to_sendRaw data to be sent to device
[in]size_of_raw_data_to_sendSize of raw_data_to_send in bytes
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Device's response in a rs2_raw_data_buffer, which should be released by rs2_delete_raw_data

Definition at line 554 of file rs.cpp.

int rs2_send_wheel_odometry ( const rs2_sensor sensor,
char  wo_sensor_id,
unsigned int  frame_num,
const rs2_vector  translational_velocity,
rs2_error **  error 
)

Send wheel odometry data for each individual sensor (wheel)

Parameters
[in]wo_sensor_id- Zero-based index of (wheel) sensor with the same type within device
[in]frame_num- Monotonocally increasing frame number, managed per sensor.
[in]translational_velocity- Translational velocity of the wheel sensor [meter/sec]
Returns
true on success

Definition at line 2907 of file rs.cpp.

const char* rs2_sensor_mode_to_string ( rs2_sensor_mode  mode)

Definition at line 1279 of file rs.cpp.

rs2_raw_data_buffer* rs2_serialize_json ( rs2_device dev,
rs2_error **  error 
)

Definition at line 3169 of file rs.cpp.

void rs2_set_calibration_table ( const rs2_device device,
const void calibration,
int  calibration_size,
rs2_error **  error 
)

Set current table to dynamic area.

Parameters
[in]Calibrationtable

Definition at line 3157 of file rs.cpp.

void rs2_set_devices_changed_callback ( const rs2_context context,
rs2_devices_changed_callback_ptr  callback,
void user,
rs2_error **  error 
)

set callback to get devices changed events these events will be raised by the context whenever new RealSense device is connected or existing device gets disconnected

Parameters
contextObject representing librealsense session
[in]callbackfunction pointer to register as per-notifications callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 787 of file rs.cpp.

void rs2_set_devices_changed_callback_cpp ( rs2_context context,
rs2_devices_changed_callback callback,
rs2_error **  error 
)

set callback to get devices changed events these events will be raised by the context whenever new RealSense device is connected or existing device gets disconnected

Parameters
contextObject representing librealsense session
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the context
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 823 of file rs.cpp.

void rs2_set_extrinsics ( const rs2_sensor from_sensor,
const rs2_stream_profile from_profile,
rs2_sensor to_sensor,
const rs2_stream_profile to_profile,
const rs2_extrinsics extrinsics,
rs2_error **  error 
)

Set extrinsics between two sensors

Parameters
[in]from_sensorOrigin sensor
[in]from_profileOrigin profile
[in]to_sensorTarget sensor
[in]to_profileTarget profile
[out]extrinsicsExtrinsics from origin to target
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2698 of file rs.cpp.

void rs2_set_intrinsics ( const rs2_sensor sensor,
const rs2_stream_profile profile,
const rs2_intrinsics intrinsics,
rs2_error **  error 
)

Set intrinsics of a given sensor

Parameters
[in]sensorThe RealSense device
[in]profileTarget stream profile
[in]intrinsicsIntrinsics value to be written to the device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2677 of file rs.cpp.

void rs2_set_motion_device_intrinsics ( const rs2_sensor sensor,
const rs2_stream_profile profile,
const rs2_motion_device_intrinsic intrinsics,
rs2_error **  error 
)

Set motion device intrinsics

Parameters
[in]sensorMotion sensor
[in]profileMotion stream profile
[out]intrinsicsPointer to the struct to store the data in
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2722 of file rs.cpp.

void rs2_set_notifications_callback ( const rs2_sensor sensor,
rs2_notification_callback_ptr  on_notification,
void user,
rs2_error **  error 
)

set callback to get notifications from specified sensor

Parameters
[in]sensorRealSense device
[in]on_notificationfunction pointer to register as per-notifications callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 764 of file rs.cpp.

void rs2_set_notifications_callback_cpp ( const rs2_sensor sensor,
rs2_notifications_callback callback,
rs2_error **  error 
)

set callback to get notifications from specified device

Parameters
[in]sensorRealSense sensor
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the relevant subdevice lock
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 806 of file rs.cpp.

void rs2_set_option ( const rs2_options options,
rs2_option  option,
float  value,
rs2_error **  error 
)

write new value to sensor option

Parameters
[in]optionsthe options container
[in]optionoption id to be queried
[in]valuenew value for the option
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 636 of file rs.cpp.

void rs2_set_region_of_interest ( const rs2_sensor sensor,
int  min_x,
int  min_y,
int  max_x,
int  max_y,
rs2_error **  error 
)

sets the active region of interest to be used by auto-exposure algorithm

Parameters
[in]sensorthe RealSense sensor
[in]min_xlower horizontal bound in pixels
[in]min_ylower vertical bound in pixels
[in]max_xupper horizontal bound in pixels
[in]max_yupper vertical bound in pixels
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1224 of file rs.cpp.

int rs2_set_static_node ( const rs2_sensor sensor,
const char *  guid,
const rs2_vector  pos,
const rs2_quaternion  orient,
rs2_error **  error 
)

Create a named location tag

Parameters
[in]sensorT2xx position-tracking sensor
[in]guidNull-terminated string of up to 127 characters
[in]posPosition in meters, relative to the current tracking session
[in]orientQuaternion orientation, expressed the the coordinate system of the current tracking session
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
Non-zero if succeeded, otherwise 0

Definition at line 2840 of file rs.cpp.

void rs2_set_stream_profile_data ( rs2_stream_profile mode,
rs2_stream  stream,
int  index,
rs2_format  format,
rs2_error **  error 
)

Override some of the parameters of the stream profile

Parameters
[in]modeinput stream profile
[in]streamstream type for the profile
[in]formatbinary data format of the profile
[in]indexstream index the profile in case there are multiple streams of the same type
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 500 of file rs.cpp.

rs2_sensor* rs2_software_device_add_sensor ( rs2_device dev,
const char *  sensor_name,
rs2_error **  error 
)

Add sensor to the software device

Parameters
[in]devthe software device
[in]sensor_namethe name of the sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
software sensor object, should be released by rs2_delete_sensor

Definition at line 2463 of file rs.cpp.

void rs2_software_device_create_matcher ( rs2_device dev,
rs2_matchers  matcher,
rs2_error **  error 
)

Set the wanted matcher type that will be used by the syncer

Parameters
[in]devthe software device
[in]matchermatcher type
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2435 of file rs.cpp.

void rs2_software_device_register_info ( rs2_device dev,
rs2_camera_info  info,
const char *  val,
rs2_error **  error 
)

Register a camera info value for the software device

Parameters
[in]devthe software device
[in]infoidentifier for the camera info to add.
[in]valstring value for this new camera info.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2443 of file rs.cpp.

void rs2_software_device_set_destruction_callback ( const rs2_device dev,
rs2_software_device_destruction_callback_ptr  on_notification,
void user,
rs2_error **  error 
)

set callback to be notified when a specific software device is destroyed

Parameters
[in]devsoftware device
[in]on_notificationfunction pointer to register as callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 775 of file rs.cpp.

void rs2_software_device_set_destruction_callback_cpp ( const rs2_device dev,
rs2_software_device_destruction_callback callback,
rs2_error **  error 
)

set callback to be notified when a specific software device is destroyed

Parameters
[in]devsoftware device
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the relevant device lock
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 814 of file rs.cpp.

void rs2_software_device_update_info ( rs2_device dev,
rs2_camera_info  info,
const char *  val,
rs2_error **  error 
)

Update an existing camera info value for the software device

Parameters
[in]devthe software device
[in]infoidentifier for the camera info to add.
[in]valstring value for this new camera info.
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2451 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_motion_stream ( rs2_sensor sensor,
rs2_motion_stream  motion_stream,
rs2_error **  error 
)

Add motion stream to sensor

Parameters
[in]sensorthe software sensor
[in]motion_streamall the stream components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2530 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_motion_stream_ex ( rs2_sensor sensor,
rs2_motion_stream  motion_stream,
int  is_default,
rs2_error **  error 
)

Add motion stream to sensor

Parameters
[in]sensorthe software sensor
[in]motion_streamall the stream components
[in]is_defaultwhether or not the stream should be a default stream for the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2538 of file rs.cpp.

void rs2_software_sensor_add_option ( rs2_sensor sensor,
rs2_option  option,
float  min,
float  max,
float  step,
float  def,
int  is_writable,
rs2_error **  error 
)

Add an option to sensor

Parameters
[in]sensorthe software sensor
[in]optionthe wanted option
[in]minthe minimum value which will be accepted for this option
[in]maxthe maximum value which will be accepted for this option
[in]stepthe granularity of options which accept discrete values, or zero if the option accepts continuous values
[in]defthe initial value of the option
[in]is_writableshould the option be read-only or not
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2578 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_pose_stream ( rs2_sensor sensor,
rs2_pose_stream  pose_stream,
rs2_error **  error 
)

Add pose stream to sensor

Parameters
[in]sensorthe software sensor
[in]pose_streamall the stream components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2546 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_pose_stream_ex ( rs2_sensor sensor,
rs2_pose_stream  pose_stream,
int  is_default,
rs2_error **  error 
)

Add pose stream to sensor

Parameters
[in]sensorthe software sensor
[in]pose_streamall the stream components
[in]is_defaultwhether or not the stream should be a default stream for the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2554 of file rs.cpp.

void rs2_software_sensor_add_read_only_option ( rs2_sensor sensor,
rs2_option  option,
float  val,
rs2_error **  error 
)

Add read only option to sensor

Parameters
[in]sensorthe software sensor
[in]optionthe wanted option
[in]valthe initial value
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2562 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_video_stream ( rs2_sensor sensor,
rs2_video_stream  video_stream,
rs2_error **  error 
)

Add video stream to sensor

Parameters
[in]sensorthe software sensor
[in]video_streamall the stream components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2514 of file rs.cpp.

rs2_stream_profile* rs2_software_sensor_add_video_stream_ex ( rs2_sensor sensor,
rs2_video_stream  video_stream,
int  is_default,
rs2_error **  error 
)

Add video stream to sensor

Parameters
[in]sensorthe software sensor
[in]video_streamall the stream components
[in]is_defaultwhether or not the stream should be a default stream for the device
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2522 of file rs.cpp.

void rs2_software_sensor_detach ( rs2_sensor sensor,
rs2_error **  error 
)

Sensors hold the parent device in scope via a shared_ptr. This function detaches that so that the software sensor doesn't keep the software device alive. Note that this is dangerous as it opens the door to accessing freed memory if care isn't taken.

Parameters
[in]sensorthe software sensor
[out]errorif non-null, recieves any error that occurs during this call, otherwise, errors are ignored

Definition at line 2589 of file rs.cpp.

void rs2_software_sensor_on_motion_frame ( rs2_sensor sensor,
rs2_software_motion_frame  frame,
rs2_error **  error 
)

Inject motion frame to software sonsor

Parameters
[in]sensorthe software sensor
[in]frameall the frame components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2482 of file rs.cpp.

void rs2_software_sensor_on_notification ( rs2_sensor sensor,
rs2_software_notification  notif,
rs2_error **  error 
)

Inject notification to software sonsor

Parameters
[in]sensorthe software sensor
[in]notifall the notification components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2498 of file rs.cpp.

void rs2_software_sensor_on_pose_frame ( rs2_sensor sensor,
rs2_software_pose_frame  frame,
rs2_error **  error 
)

Inject pose frame to software sonsor

Parameters
[in]sensorthe software sensor
[in]frameall the frame components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2490 of file rs.cpp.

void rs2_software_sensor_on_video_frame ( rs2_sensor sensor,
rs2_software_video_frame  frame,
rs2_error **  error 
)

Inject video frame to software sonsor

Parameters
[in]sensorthe software sensor
[in]frameall the frame components
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2474 of file rs.cpp.

void rs2_software_sensor_set_metadata ( rs2_sensor sensor,
rs2_frame_metadata_value  value,
rs2_metadata_type  type,
rs2_error **  error 
)

Set frame metadata for the upcoming frames

Parameters
[in]sensorthe software sensor
[in]valuemetadata key to set
[in]typemetadata value
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2506 of file rs.cpp.

void rs2_software_sensor_update_read_only_option ( rs2_sensor sensor,
rs2_option  option,
float  val,
rs2_error **  error 
)

Update the read only option added to sensor

Parameters
[in]sensorthe software sensor
[in]optionthe wanted option
[in]valthe wanted value
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2570 of file rs.cpp.

const char* rs2_sr300_visual_preset_to_string ( rs2_sr300_visual_preset  preset)

Definition at line 1270 of file rs.cpp.

void rs2_start ( const rs2_sensor sensor,
rs2_frame_callback_ptr  on_frame,
void user,
rs2_error **  error 
)

start streaming from specified configured sensor

Parameters
[in]sensorRealSense device
[in]on_framefunction pointer to register as per-frame callback
[in]userauxiliary data the user wishes to receive together with every frame callback
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 744 of file rs.cpp.

void rs2_start_cpp ( const rs2_sensor sensor,
rs2_frame_callback callback,
rs2_error **  error 
)

start streaming from specified configured sensor

Parameters
[in]sensorRealSense device
[in]callbackcallback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 798 of file rs.cpp.

void rs2_start_processing ( rs2_processing_block block,
rs2_frame_callback on_frame,
rs2_error **  error 
)

This method is used to direct the output from the processing block to some callback or sink object

Parameters
[in]blockProcessing block
[in]on_frameCallback to be invoked every time the processing block calls frame_ready
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2070 of file rs.cpp.

void rs2_start_processing_fptr ( rs2_processing_block block,
rs2_frame_callback_ptr  on_frame,
void user,
rs2_error **  error 
)

This method is used to direct the output from the processing block to some callback or sink object

Parameters
[in]blockProcessing block
[in]on_frameCallback function to be invoked every time the processing block calls frame_ready
[in]userUser context for the callback (can be anything or null)
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2078 of file rs.cpp.

void rs2_start_processing_queue ( rs2_processing_block block,
rs2_frame_queue queue,
rs2_error **  error 
)

This method is used to direct the output from the processing block to a dedicated queue object

Parameters
[in]blockProcessing block
[in]queueQueue to place the processed frames to
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2087 of file rs.cpp.

void rs2_start_queue ( const rs2_sensor sensor,
rs2_frame_queue queue,
rs2_error **  error 
)

start streaming from specified configured sensor of specific stream to frame queue

Parameters
[in]sensorRealSense Sensor
[in]queueframe-queue to store new frames into
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 754 of file rs.cpp.

void rs2_stop ( const rs2_sensor sensor,
rs2_error **  error 
)

stops streaming from specified configured device

Parameters
[in]sensorRealSense sensor
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 831 of file rs.cpp.

int rs2_stream_profile_is ( const rs2_stream_profile mode,
rs2_extension  type,
rs2_error **  error 
)

Try to extend stream profile to an extension type

Parameters
[in]modeinput stream profile
[in]typeextension type, for example RS2_EXTENSION_VIDEO_STREAM_PROFILE
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
non-zero if profile is extendable to specified extension, zero otherwise

Definition at line 1504 of file rs.cpp.

const char* rs2_stream_to_string ( rs2_stream  stream)

Definition at line 1262 of file rs.cpp.

int rs2_supports_device_info ( const rs2_device device,
rs2_camera_info  info,
rs2_error **  error 
)

Check if a camera supports a specific camera info type.

Parameters
[in]deviceThe RealSense device to check
[in]infoThe parameter to check for support
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
True if the parameter both exist and well-defined for the specific device

Definition at line 715 of file rs.cpp.

int rs2_supports_frame_metadata ( const rs2_frame frame,
rs2_frame_metadata_value  frame_metadata,
rs2_error **  error 
)

determine device metadata

Parameters
[in]framehandle returned from a callback
[in]frame_metadatathe metadata to check for support
[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 838 of file rs.cpp.

int rs2_supports_option ( const rs2_options options,
rs2_option  option,
rs2_error **  error 
)

check if particular option is supported by a subdevice

Parameters
[in]optionsthe options container
[in]optionoption id to be checked
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if option is supported

Definition at line 679 of file rs.cpp.

int rs2_supports_processing_block_info ( const rs2_processing_block block,
rs2_camera_info  info,
rs2_error **  error 
)

Check if a processing block supports a specific info type.

Parameters
[in]blockThe processing block to check
[in]infoThe parameter to check for support
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
True if the parameter both exist and well-defined for the specific device

Definition at line 2807 of file rs.cpp.

int rs2_supports_sensor_info ( const rs2_sensor sensor,
rs2_camera_info  info,
rs2_error **  error 
)

check if specific sensor info is supported

Parameters
[in]infothe parameter to check for support
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if the parameter both exist and well-defined for the specific device

Definition at line 736 of file rs.cpp.

void rs2_synthetic_frame_ready ( rs2_source source,
rs2_frame frame,
rs2_error **  error 
)

This method will dispatch frame callback on a frame

Parameters
[in]sourceFrame pool provided by the processing block
[in]frameFrame to dispatch, frame ownership is passed to this function, so you don't have to call release_frame after it
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 1745 of file rs.cpp.

rs2_raw_data_buffer* rs2_terminal_parse_command ( rs2_terminal_parser terminal_parser,
const char *  command,
unsigned int  size_of_command,
rs2_error **  error 
)

Parses terminal command via RealSense terminal parser.

Parameters
[in]terminal_parserTerminal parser object
[in]commandcommand to be sent to the hw monitor of the device
[in]size_of_commandsize of command to be sent to the hw monitor of the device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
command to hw monitor, in hex

Definition at line 3374 of file rs.cpp.

rs2_raw_data_buffer* rs2_terminal_parse_response ( rs2_terminal_parser terminal_parser,
const char *  command,
unsigned int  size_of_command,
const void response,
unsigned int  size_of_response,
rs2_error **  error 
)

Parses terminal response via RealSense terminal parser.

Parameters
[in]terminal_parserTerminal parser object
[in]commandcommand sent to the hw monitor of the device
[in]size_of_commandsize of the command to sent to the hw monitor of the device
[in]responseresponse received by the hw monitor of the device
[in]size_of_responsesize of the response received by the hw monitor of the device
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored.
Returns
answer parsed

Definition at line 3389 of file rs.cpp.

const char* rs2_timestamp_domain_to_string ( rs2_timestamp_domain  info)

Definition at line 1267 of file rs.cpp.

void rs2_trigger_device_calibration ( rs2_device dev,
rs2_calibration_type  type,
rs2_error **  error 
)

Triggers calibration of the given type

Parameters
[in]devthe device
[in]typethe type of calibration requested
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 445 of file rs.cpp.

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
[in]queuethe frame queue data structure
[in]timeout_msmax time in milliseconds to wait until a frame becomes available
[out]output_frameframe handle to be released using rs2_release_frame
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
true if new frame was stored to output_frame

Definition at line 1075 of file rs.cpp.

void rs2_update_firmware ( const rs2_device device,
const void fw_image,
int  fw_image_size,
rs2_update_progress_callback_ptr  callback,
void client_data,
rs2_error **  error 
)

Update device to the provided firmware, the device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller's thread and it supports progress notifications via the optional callback.

Parameters
[in]deviceDevice to update
[in]fw_imageFirmware image buffer
[in]fw_image_sizeFirmware image buffer size
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[in]client_dataOptional client data for the callback
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2932 of file rs.cpp.

void rs2_update_firmware_cpp ( const rs2_device device,
const void fw_image,
int  fw_image_size,
rs2_update_progress_callback callback,
rs2_error **  error 
)

Update device to the provided firmware, the device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller's thread and it supports progress notifications via the optional callback.

Parameters
[in]deviceDevice to update
[in]fw_imageFirmware image buffer
[in]fw_image_sizeFirmware image buffer size
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2917 of file rs.cpp.

void rs2_update_firmware_unsigned ( const rs2_device device,
const void fw_image,
int  fw_image_size,
rs2_update_progress_callback_ptr  callback,
void client_data,
int  update_mode,
rs2_error **  error 
)

Update device to the provided firmware by writing raw data directly to the flash, this command can be executed only on unlocked camera. The device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller's thread and it supports progress notifications via the optional callback.

Parameters
[in]deviceDevice to update
[in]fw_imageFirmware image buffer
[in]fw_image_sizeFirmware image buffer size
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[in]client_dataOptional client data for the callback
[in]update_modeSelect one of RS2_UNSIGNED_UPDATE_MODE, WARNING!!! setting to any option other than RS2_UNSIGNED_UPDATE_MODE_UPDATE will make this call unsafe and might damage the camera
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 3015 of file rs.cpp.

void rs2_update_firmware_unsigned_cpp ( const rs2_device device,
const void fw_image,
int  fw_image_size,
rs2_update_progress_callback callback,
int  update_mode,
rs2_error **  error 
)

Update device to the provided firmware by writing raw data directly to the flash, this command can be executed only on unlocked camera. The device must be extendable to RS2_EXTENSION_UPDATABLE. This call is executed on the caller's thread and it supports progress notifications via the optional callback.

Parameters
[in]deviceDevice to update
[in]fw_imageFirmware image buffer
[in]fw_image_sizeFirmware image buffer size
[in]callbackOptional callback for update progress notifications, the progress value is normailzed to 1
[in]update_modeSelect one of RS2_UNSIGNED_UPDATE_MODE, WARNING!!! setting to any option other than RS2_UNSIGNED_UPDATE_MODE_UPDATE will make this call unsafe and might damage the camera
[out]errorIf non-null, receives any error that occurs during this call, otherwise, errors are ignored

Definition at line 2996 of file rs.cpp.

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
[in]queuethe frame queue data structure
[in]timeout_msmax time in milliseconds to wait until an exception will be thrown
[out]errorif non-null, receives any error that occurs during this call, otherwise, errors are ignored
Returns
frame handle to be released using rs2_release_frame

Definition at line 1043 of file rs.cpp.

void rs2_write_calibration ( const rs2_device device,
rs2_error **  e 
)

Write calibration to device's EEPROM

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

Definition at line 2749 of file rs.cpp.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:28