#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"
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 |
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
[in] | source | Frame pool to allocate the frame from |
[in] | frames | Array of existing frames |
[in] | count | Number of input frames |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | source | Frame pool to allocate the frame from |
[in] | new_stream | New stream profile to assign to newly created frame |
[in] | original | A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | source | Frame pool to allocate the frame from |
[in] | new_stream | New stream profile to assign to newly created frame |
[in] | original | A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) |
[in] | frame_type | New value for frame type for the allocated frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | source | Frame pool to allocate the frame from |
[in] | new_stream | New stream profile to assign to newly created frame |
[in] | original | A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable) |
[in] | new_bpp | New value for bits per pixel for the allocated frame |
[in] | new_width | New value for width for the allocated frame |
[in] | new_height | New value for height for the allocated frame |
[in] | new_stride | New value for stride in bytes for the allocated frame |
[in] | frame_type | New value for frame type for the allocated frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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_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
[in] | mode | input stream profile |
[in] | stream | stream type for the profile |
[in] | format | binary data format of the profile |
[in] | index | stream index the profile in case there are multiple streams of the same type |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | mode | input stream profile |
[in] | stream | stream type for the profile |
[in] | format | binary data format of the profile |
[in] | width | new width for the profile |
[in] | height | new height for the profile |
[in] | intr | new intrinsics for the profile |
[in] | index | stream index the profile in case there are multiple streams of the same type |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_close | ( | const rs2_sensor * | sensor, |
rs2_error ** | error | ||
) |
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()
.
[in] | config | A pointer to an instance of a config |
[in] | pipe | The pipeline for which the selected filters are applied |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[in] | stream | Stream type, for which the filters are cleared |
[in] | index | Stream index, for which the filters are cleared |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[in] | stream | Stream type, for which the filters are cleared |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[in] | serial | device serial number, as returned by RS2_CAMERA_INFO_SERIAL_NUMBER |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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'.
[in] | config | A pointer to an instance of a config |
[in] | file | The playback file of the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | config | A pointer to an instance of a config |
[in] | file | The playback file of the device |
[in] | repeat_playback | if 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] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | config | A pointer to an instance of a config |
[in] | file | The desired file for the output record |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[in] | stream | Stream type to be enabled |
[in] | index | Stream index, used for multiple streams of the same type. -1 indicates any. |
[in] | width | Stream image width - for images streams. 0 indicates any. |
[in] | height | Stream image height - for images streams. 0 indicates any. |
[in] | format | Stream data format - pixel format for images streams, of data type for other streams. RS2_FORMAT_ANY indicates any. |
[in] | framerate | Stream frames per second. 0 indicates any. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | config | A pointer to an instance of a config |
[in] | pipe | The pipeline for which the selected filters are applied |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_connect_tm2_controller | ( | const rs2_device * | device, |
const unsigned char * | mac_addr, | ||
rs2_error ** | error | ||
) |
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
ctx | The context to which the new device will be added | |
file | The file from which the device should be created | |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_context_add_software_device | ( | rs2_context * | ctx, |
rs2_device * | dev, | ||
rs2_error ** | error | ||
) |
Add an instance of software device to the context
ctx | The context to which the new device will be added | |
dev | Instance of software device to register into the context | |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_context_remove_device | ( | rs2_context * | ctx, |
const char * | file, | ||
rs2_error ** | error | ||
) |
Removes a playback device from the context, if exists
[in] | ctx | The context from which the device should be removed |
[in] | file | The file name that was used to add the device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
rs2_processing_block* rs2_create_align | ( | rs2_stream | align_to, |
rs2_error ** | error | ||
) |
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)
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_context* rs2_create_context | ( | int | api_version, |
rs2_error ** | error | ||
) |
Creates RealSense context that is required for the rest of the API.
[in] | api_version | Users are expected to pass their version of RS2_API_VERSION to make sure they are running the correct librealsense version. |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | info_list | the list containing the device to retrieve |
[in] | index | The zero based index of device to retrieve |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | Pointer to a sensor |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_device_hub* rs2_create_device_hub | ( | const rs2_context * | context, |
rs2_error ** | error | ||
) |
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
[in] | transform_to_disparity | flag select the transform direction: true = depth->disparity, and vice versa |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_error* rs2_create_error | ( | const char * | what, |
const char * | name, | ||
const char * | args, | ||
rs2_exception_type | type | ||
) |
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.
[in] | device | Device to update |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[in] | client_data | Optional client data for the callback |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | Device to update |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | capacity | max number of frames to allow to be stored in the queue before older frames will start to get dropped |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_firmware_log_message* rs2_create_fw_log_message | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
Creates RealSense firmware log message.
[in] | dev | Device from which the FW log will be taken using the created message |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
rs2_firmware_log_parsed_message* rs2_create_fw_log_parsed_message | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
Creates RealSense firmware log parsed message.
[in] | dev | Device from which the FW log will be taken using the created message |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
rs2_processing_block* rs2_create_hdr_merge_processing_block | ( | rs2_error ** | error | ) |
rs2_processing_block* rs2_create_hole_filling_filter_block | ( | rs2_error ** | error | ) |
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
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | api_version | realsense API version as provided by RS2_API_VERSION macro |
[in] | filename | string representing the name of the file to play back from |
[in] | section | string representing the name of the section within existing recording |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | api_version | realsense API version as provided by RS2_API_VERSION macro |
[in] | filename | string representing the name of the file to play back from |
[in] | section | string representing the name of the section within existing recording |
[in] | min_api_version | reject any file that was recorded before this version |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | ctx | context |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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..
proc | Processing function to be applied to every frame entering the block | |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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..
proc | Processing function pointer to be applied to every frame entering the block | |
context | User context (can be anything or null) to be passed later as ctx param of the callback | |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | The device to record |
[in] | file | The desired path to which the recorder should save the data |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | The device to record |
[in] | file | The desired path to which the recorder should save the data |
[in] | compression_enabled | Indicates if compression is enabled, 0 means false, otherwise true |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | api_version | realsense API version as provided by RS2_API_VERSION macro |
[in] | filename | string representing the name of the file to record |
[in] | section | string representing the name of the section within existing recording |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_sensor* rs2_create_sensor | ( | const rs2_sensor_list * | list, |
int | index, | ||
rs2_error ** | error | ||
) |
rs2_processing_block* rs2_create_sequence_id_filter | ( | rs2_error ** | error | ) |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_processing_block* rs2_create_spatial_filter_block | ( | rs2_error ** | error | ) |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_processing_block* rs2_create_temporal_filter_block | ( | rs2_error ** | error | ) |
rs2_terminal_parser* rs2_create_terminal_parser | ( | const char * | xml_content, |
rs2_error ** | error | ||
) |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_processing_block* rs2_create_units_transform | ( | rs2_error ** | error | ) |
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.
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_delete_config | ( | rs2_config * | config | ) |
void rs2_delete_context | ( | rs2_context * | context | ) |
void rs2_delete_device | ( | rs2_device * | device | ) |
void rs2_delete_device_hub | ( | const rs2_device_hub * | hub | ) |
void rs2_delete_device_list | ( | rs2_device_list * | info_list | ) |
void rs2_delete_frame_queue | ( | rs2_frame_queue * | queue | ) |
void rs2_delete_fw_log_message | ( | rs2_firmware_log_message * | msg | ) |
void rs2_delete_fw_log_parsed_message | ( | rs2_firmware_log_parsed_message * | fw_log_parsed_msg | ) |
void rs2_delete_options_list | ( | rs2_options_list * | list | ) |
void rs2_delete_pipeline | ( | rs2_pipeline * | pipe | ) |
void rs2_delete_pipeline_profile | ( | rs2_pipeline_profile * | profile | ) |
void rs2_delete_processing_block | ( | rs2_processing_block * | block | ) |
void rs2_delete_raw_data | ( | const rs2_raw_data_buffer * | buffer | ) |
Delete rs2_raw_data_buffer
[in] | buffer | rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data |
void rs2_delete_recommended_processing_blocks | ( | rs2_processing_block_list * | list | ) |
void rs2_delete_sensor | ( | rs2_sensor * | sensor | ) |
void rs2_delete_sensor_list | ( | rs2_sensor_list * | info_list | ) |
void rs2_delete_stream_profile | ( | rs2_stream_profile * | mode | ) |
void rs2_delete_stream_profiles_list | ( | rs2_stream_profile_list * | list | ) |
void rs2_delete_terminal_parser | ( | rs2_terminal_parser * | terminal_parser | ) |
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
[in] | frame_ref | 2D depth pixel coordinates (Left-Upper corner origin) |
[in] | x,y | 2D depth pixel coordinates (Left-Upper corner origin) |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_device_hub_is_device_connected | ( | const rs2_device_hub * | hub, |
const rs2_device * | device, | ||
rs2_error ** | error | ||
) |
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
[in] | ctx | The context to creat the device |
[in] | hub | The device hub object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | info_list | The list of devices to check in |
[in] | device | RealSense device to check for |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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 | ||
) |
const char* rs2_distortion_to_string | ( | rs2_distortion | distortion | ) |
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.
[in] | max_size | max file size in megabytes |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_enter_update_state | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
const char* rs2_exception_type_to_string | ( | rs2_exception_type | type | ) |
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
[in] | sensor | TM2 position-tracking sensor |
[in] | lmap_fname | The file name of the localization map |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | frame | Points frame |
[in] | fname | The name for the ply file |
[in] | texture | Texture frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_extension_to_string | ( | rs2_extension | type | ) |
const char* rs2_extension_type_to_string | ( | rs2_extension | type | ) |
Extract frame from within a composite frame
[in] | composite | Composite frame |
[in] | index | Index of the frame to extract within the composite frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | frame | Left or right camera frame of specified size based on the target type |
[in] | calib_type | Calibration target type |
[in] | target_dims_size | Target dimension array size |
[out] | target_dims | The 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] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_flush_queue | ( | rs2_frame_queue * | queue, |
rs2_error ** | error | ||
) |
const char* rs2_format_to_string | ( | rs2_format | format | ) |
create additional reference to a frame without duplicating frame data
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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 | ) |
const unsigned char* rs2_fw_log_message_data | ( | rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
rs2_log_severity rs2_fw_log_message_severity | ( | const rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
int rs2_fw_log_message_size | ( | rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
unsigned int rs2_fw_log_message_timestamp | ( | rs2_firmware_log_message * | msg, |
rs2_error ** | error | ||
) |
rs2_stream_profile_list* rs2_get_active_streams | ( | rs2_sensor * | sensor, |
rs2_error ** | error | ||
) |
check how subdevice is streaming
[in] | sensor | input RealSense subdevice |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const rs2_raw_data_buffer* rs2_get_calibration_table | ( | const rs2_device * | dev, |
rs2_error ** | error | ||
) |
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
[in] | sensor | input RealSense subdevice |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | depth sensor |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_get_device_count | ( | const rs2_device_list * | info_list, |
rs2_error ** | error | ||
) |
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.
[in] | device | The RealSense device |
[in] | info | Camera info type to retrieve |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | Sensor that supports the CALIBRATED_SENSOR extension |
[out] | p_params_out | Pointer to the structure that will get the DSM parameters |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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 | ||
) |
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 | ||
) |
Gets RealSense flash log - this is a fw log that has been written in the device during the previous shutdown of the device.
[in] | dev | Device from which the FW log should be taken |
[in] | fw_log_msg | Firmware log message object to be filled |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
retrieve bits per pixels in the frame image (note that bits per pixel is not necessarily divided by 8, as in 12bpp)
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | frame | handle returned from a callback |
[in] | frame_metadata | the rs2_frame_metadata whose latest frame we are interested in |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
retrieve frame number from frame handle
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_sensor* rs2_get_frame_sensor | ( | const rs2_frame * | frame, |
rs2_error ** | error | ||
) |
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
[in] | frame | frame reference, owned by the user |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
retrieve frame stride in bytes (number of bytes from start of line N to start of line N+1)
[in] | frame | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | frame | Points frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_time_t rs2_get_frame_timestamp | ( | const rs2_frame * | frame, |
rs2_error ** | error | ||
) |
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)
[in] | frameset | handle returned from a callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | frame | Points frame |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_get_full_log_message | ( | rs2_log_message const * | msg, |
rs2_error ** | error | ||
) |
int rs2_get_fw_log | ( | rs2_device * | dev, |
rs2_firmware_log_message * | fw_log_msg, | ||
rs2_error ** | error | ||
) |
Gets RealSense firmware log.
[in] | dev | Device from which the FW log should be taken |
[in] | fw_log_msg | Firmware log message object to be filled |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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).
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | fw_log_parsed_msg | firmware log parsed message object |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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 | ||
) |
unsigned rs2_get_log_message_line_number | ( | rs2_log_message const * | msg, |
rs2_error ** | error | ||
) |
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
[in] | sensor | depth sensor |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | mode | input stream profile |
[out] | intrinsics | Pointer to the struct to store the data in |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_notification_category rs2_get_notification_category | ( | rs2_notification * | notification, |
rs2_error ** | error | ||
) |
const char* rs2_get_notification_description | ( | rs2_notification * | notification, |
rs2_error ** | error | ||
) |
const char* rs2_get_notification_serialized_data | ( | rs2_notification * | notification, |
rs2_error ** | error | ||
) |
rs2_log_severity rs2_get_notification_severity | ( | rs2_notification * | notification, |
rs2_error ** | error | ||
) |
rs2_time_t rs2_get_notification_timestamp | ( | rs2_notification * | notification, |
rs2_error ** | error | ||
) |
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.
[in] | dev | Device from which the FW log will be taken |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
float rs2_get_option | ( | const rs2_options * | options, |
rs2_option | option, | ||
rs2_error ** | error | ||
) |
const char* rs2_get_option_description | ( | const rs2_options * | options, |
rs2_option | option, | ||
rs2_error ** | error | ||
) |
rs2_option rs2_get_option_from_list | ( | const rs2_options_list * | options, |
int | i, | ||
rs2_error ** | error | ||
) |
const char* rs2_get_option_name | ( | const rs2_options * | options, |
rs2_option | option, | ||
rs2_error ** | error | ||
) |
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
[in] | sensor | the RealSense device |
[in] | option | the option whose range should be queried |
[out] | min | the minimum value which will be accepted for this option |
[out] | max | the maximum value which will be accepted for this option |
[out] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
[out] | def | the default value of the option |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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)
[in] | options | the options container |
[in] | option | option id to be checked |
[in] | value | value of the option |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_options_list* rs2_get_options_list | ( | const rs2_options * | options, |
rs2_error ** | error | ||
) |
int rs2_get_options_list_size | ( | const rs2_options_list * | options, |
rs2_error ** | error | ||
) |
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
[in] | list | the processing blocks list |
[in] | index | the requested processing block |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | block | The processing block |
[in] | info | processing block info type to retrieve |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const unsigned char* rs2_get_raw_data | ( | const rs2_raw_data_buffer * | buffer, |
rs2_error ** | error | ||
) |
Retrieve char array from rs2_raw_data_buffer
[in] | buffer | rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_get_raw_data_size | ( | const rs2_raw_data_buffer * | buffer, |
rs2_error ** | error | ||
) |
get the size of rs2_raw_data_buffer
[in] | buffer | pointer to rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_get_raw_log_message | ( | rs2_log_message const * | msg, |
rs2_error ** | error | ||
) |
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
[in] | sensor | input sensor |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_get_recommended_processing_blocks_count | ( | const rs2_processing_block_list * | list, |
rs2_error ** | error | ||
) |
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
[in] | sensor | the RealSense sensor |
[out] | min_x | lower horizontal bound in pixels |
[out] | min_y | lower vertical bound in pixels |
[out] | max_x | upper horizontal bound in pixels |
[out] | max_y | upper vertical bound in pixels |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the RealSense sensor |
[in] | info | camera info type to retrieve |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_get_sensors_count | ( | const rs2_sensor_list * | info_list, |
rs2_error ** | error | ||
) |
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
[in] | sensor | T2xx position-tracking sensor |
[in] | guid | Null-terminated string of up to 127 characters |
[out] | pos | Position in meters of the tagged (stored) location |
[out] | orient | Quaternion orientation of the tagged (stored) location |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
float rs2_get_stereo_baseline | ( | rs2_sensor * | sensor, |
rs2_error ** | error | ||
) |
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
[in] | list | the list of supported profiles returned by rs2_get_supported_profiles |
[in] | index | the zero based index of the streaming mode |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | mode | input stream profile |
[out] | stream | stream type of the input profile |
[out] | format | binary data format of the input profile |
[out] | index | stream index the input profile in case there are multiple streams of the same type |
[out] | unique_id | identifier for the stream profile, unique within the application |
[out] | framerate | expected rate for data frames to arrive, meaning expected number of frames per second |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_stream_profile_list* rs2_get_stream_profiles | ( | rs2_sensor * | sensor, |
rs2_error ** | error | ||
) |
check if physical subdevice is supported
[in] | sensor | input RealSense subdevice |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_get_stream_profiles_count | ( | const rs2_stream_profile_list * | list, |
rs2_error ** | error | ||
) |
get the number of supported stream profiles
[in] | list | the list of supported profiles returned by rs2_get_supported_profiles |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_time_t rs2_get_time | ( | rs2_error ** | error | ) |
return the time at specific time point
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | mode | input stream profile |
[out] | intrinsics | resulting intrinsics for the video profile |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | mode | input stream profile |
[out] | width | width in pixels of the video stream |
[out] | height | height in pixels of the video stream |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | The RealSense device to reset |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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 | ||
) |
Imports a localization map from file to tm2 tracking device
[in] | sensor | TM2 position-tracking sensor |
[in] | lmap_blob | Localization map raw buffer, serialized |
[in] | blob_size | The buffer's size in bytes |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_init_fw_log_parser | ( | rs2_device * | dev, |
const char * | xml_content, | ||
rs2_error ** | error | ||
) |
Initializes RealSense firmware logs parser in device.
[in] | dev | Device from which the FW log will be taken |
[in] | xml_content | content of the xml file needed for parsing |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | device | Realsense device |
[in] | extension | The extension to which the device should be tested if it is extendable |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | frame | Realsense frame |
[in] | extension_type | The extension to which the frame should be tested if it is extendable |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_is_option_read_only | ( | const rs2_options * | options, |
rs2_option | option, | ||
rs2_error ** | error | ||
) |
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
[in] | block | processing block |
[in] | extension | The extension to which the sensor should be tested if it is extendable |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | Realsense sensor |
[in] | extension | The extension to which the sensor should be tested if it is extendable |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | mode | input stream profile |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | frame | handle returned from a callback |
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 | ||
) |
int rs2_load_wheel_odometry_config | ( | const rs2_sensor * | sensor, |
const unsigned char * | odometry_config_buf, | ||
unsigned int | blob_size, | ||
rs2_error ** | error | ||
) |
void rs2_log | ( | rs2_log_severity | severity, |
const char * | message, | ||
rs2_error ** | error | ||
) |
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 | ||
) |
void rs2_log_to_callback_cpp | ( | rs2_log_severity | min_severity, |
rs2_log_callback * | callback, | ||
rs2_error ** | error | ||
) |
void rs2_log_to_console | ( | rs2_log_severity | min_severity, |
rs2_error ** | error | ||
) |
void rs2_log_to_file | ( | rs2_log_severity | min_severity, |
const char * | file_path, | ||
rs2_error ** | error | ||
) |
void rs2_loopback_disable | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
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
[in] | device | Device to enter into loopback operation mode |
[in] | from_file | Path to bag file with raw data for loopback |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_loopback_is_enabled | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
Checks if the device is in loopback mode or not
[in] | device | Device to check for operation mode |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_notification_category_to_string | ( | rs2_notification_category | category | ) |
void rs2_open | ( | rs2_sensor * | device, |
const rs2_stream_profile * | profile, | ||
rs2_error ** | error | ||
) |
open subdevice for exclusive access, by committing to a configuration
[in] | device | relevant RealSense device |
[in] | profile | stream profile that defines single stream configuration |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | relevant RealSense device |
[in] | profiles | list of stream profiles discovered by get_stream_profiles |
[in] | count | number of simultaneous stream profiles to configure |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_option_to_string | ( | rs2_option | option | ) |
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.
[in] | sensor | Sensor that supports the CALIBRATED_SENSOR extension |
[out] | p_params | Pointer to the structure that contains the DSM parameters |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | sensor | The sensor |
[in] | extrinsics | Extrinsics from Depth to the named sensor |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | sensor | The RealSense device |
[in] | intrinsics | Intrinsics value to be written to the sensor |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | dev | Device from which the FW log will be taken |
[in] | fw_log_msg | firmware log message to be parsed |
[in] | parsed_msg | firmware log parsed message - place holder for the resulting parsed message |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | pipe | a pointer to an instance of the pipeline |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | the pipeline |
[out] | output_frame | frame handle to be released using rs2_release_frame |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | profile | A pointer to an instance of a pipeline profile |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | profile | A pointer to an instance of a pipeline profile |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | a pointer to an instance of the pipeline |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | A pointer to an instance of the pipeline |
[in] | on_frame | function pointer to register as per-frame callback |
[in] | user | auxiliary data the user wishes to receive together with every frame callback |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | A pointer to an instance of the pipeline |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | a pointer to an instance of the pipeline |
[in] | config | A rs2::config with requested filters on the pipeline configuration. By default no filters are applied. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | A pointer to an instance of the pipeline |
[in] | config | A rs2::config with requested filters on the pipeline configuration. By default no filters are applied. |
[in] | on_frame | function pointer to register as per-frame callback |
[in] | user | auxiliary data the user wishes to receive together with every frame callback |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | A pointer to an instance of the pipeline |
[in] | config | A rs2::config with requested filters on the pipeline configuration. By default no filters are applied. |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | pipeline |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | the pipeline |
[in] | timeout_ms | max time in milliseconds to wait until a frame becomes available |
[out] | output_frame | frame handle to be released using rs2_release_frame |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | pipe | the pipeline |
[in] | timeout_ms | Max time in milliseconds to wait until an exception will be thrown |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_playback_status rs2_playback_device_get_current_status | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
const char* rs2_playback_device_get_file_path | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
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
[in] | device | A playback device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_playback_device_pause | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
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
[in] | device | A playback device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_playback_device_set_playback_speed | ( | const rs2_device * | device, |
float | speed, | ||
rs2_error ** | error | ||
) |
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).
[in] | device | A playback device |
[in] | real_time | Indicates if real time is requested, 0 means false, otherwise true |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | A playback device |
[in] | callback | A callback handler that will be invoked when the playback status changes |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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)
[in] | device | A playback device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
unsigned long long int rs2_playback_get_duration | ( | const rs2_device * | device, |
rs2_error ** | error | ||
) |
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
[in] | device | A playback device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | A playback device. |
[in] | time | The time point to which playback should seek, expressed in units of nanoseconds (zero value = start) |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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 | ||
) |
poll if a new frame is available and dequeue if it is
[in] | queue | the frame queue data structure |
[out] | output_frame | frame handle to be released using rs2_release_frame |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
When called on Pose frame type, this method returns the transformation represented by the pose data
[in] | frame | Pose frame |
[out] | pose | Pointer to a user allocated struct, which contains the pose info after a successful return |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | block | Processing block |
[in] | frame | Frame to process, ownership is moved to the block object |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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..
[in] | block | Processing block |
[in] | option_id | an int ID for referencing the option |
[in] | min | the minimum value which will be accepted for this option |
[in] | max | the maximum value which will be accepted for this option |
[in] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
[in] | def | the default value of the option. This will be the initial value. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
context | Object representing librealsense session | |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
context | Object representing librealsense session | |
product_mask | Controls what kind of devices will be returned | |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | Specific RealSense device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | A recording device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | A recording device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | device | A recording device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the sensor |
[in] | callback | the C callback function that gets called |
[in] | user | user argument that gets passed to the callback function |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the sensor |
[in] | callback | the C++ callback interface that gets called |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_register_extrinsics | ( | const rs2_stream_profile * | from, |
const rs2_stream_profile * | to, | ||
rs2_extrinsics | extrin, | ||
rs2_error ** | error | ||
) |
int rs2_remove_static_node | ( | const rs2_sensor * | sensor, |
const char * | guid, | ||
rs2_error ** | error | ||
) |
Remove a named location tag
[in] | sensor | T2xx position-tracking sensor |
[in] | guid | Null-terminated string of up to 127 characters |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | sensor | Sensor that supports the CALIBRATED_SENSOR extension |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_reset_to_factory_calibration | ( | const rs2_device * | device, |
rs2_error ** | e | ||
) |
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.
[in] | json_content | Json 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] | health | The 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] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[in] | client_data | Optional client data for the callback |
[in] | timeout_ms | Timeout in ms (use 5000 msec unless instructed otherwise) |
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.
[in] | json_content | Json 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] | health | The 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] | callback | Optional callback to get progress notifications |
[in] | timeout_ms | Timeout in ms (use 5000 msec unless instructed otherwise) |
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.
[in] | ground_truth_mm | Ground truth in mm must be between 60 and 10000 |
[in] | json_content | Json 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_size | Json string size if its 0 the json will be ignored and calibration will use the default parameters |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[in] | client_data | Optional client data for the callback |
[in] | timeout_ms | Timeout in ms (use 5000 msec unless instructed otherwise) |
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.
[in] | ground_truth_mm | Ground truth in mm must be between 60 and 10000 |
[in] | json_content | Json 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_size | Json string size if its 0 the json will be ignored and calibration will use the default parameters |
[in] | callback | Optional callback to get progress notifications |
[in] | timeout_ms | Timeout in ms (use 5000 msec unless instructed otherwise) |
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
[in] | device | RealSense device to send data to |
[in] | raw_data_to_send | Raw data to be sent to device |
[in] | size_of_raw_data_to_send | Size of raw_data_to_send in bytes |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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)
[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] |
const char* rs2_sensor_mode_to_string | ( | rs2_sensor_mode | mode | ) |
rs2_raw_data_buffer* rs2_serialize_json | ( | rs2_device * | dev, |
rs2_error ** | error | ||
) |
void rs2_set_calibration_table | ( | const rs2_device * | device, |
const void * | calibration, | ||
int | calibration_size, | ||
rs2_error ** | error | ||
) |
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
context | Object representing librealsense session | |
[in] | callback | function pointer to register as per-notifications callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
context | Object representing librealsense session | |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the context |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | from_sensor | Origin sensor |
[in] | from_profile | Origin profile |
[in] | to_sensor | Target sensor |
[in] | to_profile | Target profile |
[out] | extrinsics | Extrinsics from origin to target |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | The RealSense device |
[in] | profile | Target stream profile |
[in] | intrinsics | Intrinsics value to be written to the device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_set_motion_device_intrinsics | ( | const rs2_sensor * | sensor, |
const rs2_stream_profile * | profile, | ||
const rs2_motion_device_intrinsic * | intrinsics, | ||
rs2_error ** | error | ||
) |
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
[in] | sensor | RealSense device |
[in] | on_notification | function pointer to register as per-notifications callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | RealSense sensor |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the relevant subdevice lock |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_set_option | ( | const rs2_options * | options, |
rs2_option | option, | ||
float | value, | ||
rs2_error ** | error | ||
) |
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
[in] | sensor | the RealSense sensor |
[in] | min_x | lower horizontal bound in pixels |
[in] | min_y | lower vertical bound in pixels |
[in] | max_x | upper horizontal bound in pixels |
[in] | max_y | upper vertical bound in pixels |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | T2xx position-tracking sensor |
[in] | guid | Null-terminated string of up to 127 characters |
[in] | pos | Position in meters, relative to the current tracking session |
[in] | orient | Quaternion orientation, expressed the the coordinate system of the current tracking session |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | mode | input stream profile |
[in] | stream | stream type for the profile |
[in] | format | binary data format of the profile |
[in] | index | stream index the profile in case there are multiple streams of the same type |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_sensor* rs2_software_device_add_sensor | ( | rs2_device * | dev, |
const char * | sensor_name, | ||
rs2_error ** | error | ||
) |
Add sensor to the software device
[in] | dev | the software device |
[in] | sensor_name | the name of the sensor |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_device_create_matcher | ( | rs2_device * | dev, |
rs2_matchers | matcher, | ||
rs2_error ** | error | ||
) |
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
[in] | dev | the software device |
[in] | info | identifier for the camera info to add. |
[in] | val | string value for this new camera info. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | software device |
[in] | on_notification | function pointer to register as callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | software device |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the relevant device lock |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | dev | the software device |
[in] | info | identifier for the camera info to add. |
[in] | val | string value for this new camera info. |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_stream_profile* rs2_software_sensor_add_motion_stream | ( | rs2_sensor * | sensor, |
rs2_motion_stream | motion_stream, | ||
rs2_error ** | error | ||
) |
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
[in] | sensor | the software sensor |
[in] | motion_stream | all the stream components |
[in] | is_default | whether or not the stream should be a default stream for the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | the software sensor |
[in] | option | the wanted option |
[in] | min | the minimum value which will be accepted for this option |
[in] | max | the maximum value which will be accepted for this option |
[in] | step | the granularity of options which accept discrete values, or zero if the option accepts continuous values |
[in] | def | the initial value of the option |
[in] | is_writable | should the option be read-only or not |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
rs2_stream_profile* rs2_software_sensor_add_pose_stream | ( | rs2_sensor * | sensor, |
rs2_pose_stream | pose_stream, | ||
rs2_error ** | error | ||
) |
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
[in] | sensor | the software sensor |
[in] | pose_stream | all the stream components |
[in] | is_default | whether or not the stream should be a default stream for the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_sensor_add_read_only_option | ( | rs2_sensor * | sensor, |
rs2_option | option, | ||
float | val, | ||
rs2_error ** | error | ||
) |
rs2_stream_profile* rs2_software_sensor_add_video_stream | ( | rs2_sensor * | sensor, |
rs2_video_stream | video_stream, | ||
rs2_error ** | error | ||
) |
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
[in] | sensor | the software sensor |
[in] | video_stream | all the stream components |
[in] | is_default | whether or not the stream should be a default stream for the device |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | sensor | the software sensor |
[out] | error | if non-null, recieves any error that occurs during this call, otherwise, errors are ignored |
void rs2_software_sensor_on_motion_frame | ( | rs2_sensor * | sensor, |
rs2_software_motion_frame | frame, | ||
rs2_error ** | error | ||
) |
void rs2_software_sensor_on_notification | ( | rs2_sensor * | sensor, |
rs2_software_notification | notif, | ||
rs2_error ** | error | ||
) |
void rs2_software_sensor_on_pose_frame | ( | rs2_sensor * | sensor, |
rs2_software_pose_frame | frame, | ||
rs2_error ** | error | ||
) |
void rs2_software_sensor_on_video_frame | ( | rs2_sensor * | sensor, |
rs2_software_video_frame | frame, | ||
rs2_error ** | error | ||
) |
void rs2_software_sensor_set_metadata | ( | rs2_sensor * | sensor, |
rs2_frame_metadata_value | value, | ||
rs2_metadata_type | type, | ||
rs2_error ** | error | ||
) |
void rs2_software_sensor_update_read_only_option | ( | rs2_sensor * | sensor, |
rs2_option | option, | ||
float | val, | ||
rs2_error ** | error | ||
) |
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 | ||
) |
start streaming from specified configured sensor
[in] | sensor | RealSense device |
[in] | on_frame | function pointer to register as per-frame callback |
[in] | user | auxiliary data the user wishes to receive together with every frame callback |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_start_cpp | ( | const rs2_sensor * | sensor, |
rs2_frame_callback * | callback, | ||
rs2_error ** | error | ||
) |
start streaming from specified configured sensor
[in] | sensor | RealSense device |
[in] | callback | callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | block | Processing block |
[in] | on_frame | Callback to be invoked every time the processing block calls frame_ready |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | block | Processing block |
[in] | on_frame | Callback function to be invoked every time the processing block calls frame_ready |
[in] | user | User context for the callback (can be anything or null) |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | block | Processing block |
[in] | queue | Queue to place the processed frames to |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | sensor | RealSense Sensor |
[in] | queue | frame-queue to store new frames into |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_stop | ( | const rs2_sensor * | sensor, |
rs2_error ** | error | ||
) |
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
[in] | mode | input stream profile |
[in] | type | extension type, for example RS2_EXTENSION_VIDEO_STREAM_PROFILE |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
const char* rs2_stream_to_string | ( | rs2_stream | stream | ) |
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.
[in] | device | The RealSense device to check |
[in] | info | The parameter to check for support |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_supports_frame_metadata | ( | const rs2_frame * | frame, |
rs2_frame_metadata_value | frame_metadata, | ||
rs2_error ** | error | ||
) |
determine device metadata
[in] | frame | handle returned from a callback |
[in] | frame_metadata | the metadata to check for support |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_supports_option | ( | const rs2_options * | options, |
rs2_option | option, | ||
rs2_error ** | error | ||
) |
check if particular option is supported by a subdevice
[in] | options | the options container |
[in] | option | option id to be checked |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | block | The processing block to check |
[in] | info | The parameter to check for support |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
int rs2_supports_sensor_info | ( | const rs2_sensor * | sensor, |
rs2_camera_info | info, | ||
rs2_error ** | error | ||
) |
check if specific sensor info is supported
[in] | info | the parameter to check for support |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_synthetic_frame_ready | ( | rs2_source * | source, |
rs2_frame * | frame, | ||
rs2_error ** | error | ||
) |
This method will dispatch frame callback on a frame
[in] | source | Frame pool provided by the processing block |
[in] | frame | Frame to dispatch, frame ownership is passed to this function, so you don't have to call release_frame after it |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | terminal_parser | Terminal parser object |
[in] | command | command to be sent to the hw monitor of the device |
[in] | size_of_command | size of command to be sent to the hw monitor of the device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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.
[in] | terminal_parser | Terminal parser object |
[in] | command | command sent to the hw monitor of the device |
[in] | size_of_command | size of the command to sent to the hw monitor of the device |
[in] | response | response received by the hw monitor of the device |
[in] | size_of_response | size of the response received by the hw monitor of the device |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored. |
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 | ||
) |
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
[in] | queue | the frame queue data structure |
[in] | timeout_ms | max time in milliseconds to wait until a frame becomes available |
[out] | output_frame | frame handle to be released using rs2_release_frame |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | Device to update |
[in] | fw_image | Firmware image buffer |
[in] | fw_image_size | Firmware image buffer size |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[in] | client_data | Optional client data for the callback |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | Device to update |
[in] | fw_image | Firmware image buffer |
[in] | fw_image_size | Firmware image buffer size |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | Device to update |
[in] | fw_image | Firmware image buffer |
[in] | fw_image_size | Firmware image buffer size |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[in] | client_data | Optional client data for the callback |
[in] | update_mode | Select 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] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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.
[in] | device | Device to update |
[in] | fw_image | Firmware image buffer |
[in] | fw_image_size | Firmware image buffer size |
[in] | callback | Optional callback for update progress notifications, the progress value is normailzed to 1 |
[in] | update_mode | Select 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] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
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
[in] | queue | the frame queue data structure |
[in] | timeout_ms | max time in milliseconds to wait until an exception will be thrown |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
void rs2_write_calibration | ( | const rs2_device * | device, |
rs2_error ** | e | ||
) |