NVIDIA DeepStream SDK API Reference

9.2 Release
sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/rs.h
Go to the documentation of this file.
1 /* License: Apache 2.0. See LICENSE file in root directory.
2  Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
3 
9 #ifndef LIBREALSENSE_RS2_H
10 #define LIBREALSENSE_RS2_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include "h/rs_types.h"
17 #include "h/rs_context.h"
18 #include "h/rs_device.h"
19 #include "h/rs_frame.h"
20 #include "h/rs_option.h"
21 #include "h/rs_processing.h"
22 #include "h/rs_record_playback.h"
23 #include "h/rs_sensor.h"
24 
25 #define RS2_API_MAJOR_VERSION 2
26 #define RS2_API_MINOR_VERSION 48
27 #define RS2_API_PATCH_VERSION 0
28 #define RS2_API_BUILD_VERSION 0
29 
30 #ifndef STRINGIFY
31 #define STRINGIFY(arg) #arg
32 #endif
33 #ifndef VAR_ARG_STRING
34 #define VAR_ARG_STRING(arg) STRINGIFY(arg)
35 #endif
36 
37 /* Versioning rules : For each release at least one of [MJR/MNR/PTCH] triple is promoted */
38 /* : Versions that differ by RS2_API_PATCH_VERSION only are interface-compatible, i.e. no user-code changes required */
39 /* : Versions that differ by MAJOR/MINOR VERSION component can introduce API changes */
40 /* Version in encoded integer format (1,9,x) -> 01090x. note that each component is limited into [0-99] range by design */
41 #define RS2_API_VERSION (((RS2_API_MAJOR_VERSION) * 10000) + ((RS2_API_MINOR_VERSION) * 100) + (RS2_API_PATCH_VERSION))
42 /* Return version in "X.Y.Z" format */
43 #define RS2_API_VERSION_STR (VAR_ARG_STRING(RS2_API_MAJOR_VERSION.RS2_API_MINOR_VERSION.RS2_API_PATCH_VERSION))
44 #define RS2_API_FULL_VERSION_STR (VAR_ARG_STRING(RS2_API_MAJOR_VERSION.RS2_API_MINOR_VERSION.RS2_API_PATCH_VERSION.RS2_API_BUILD_VERSION))
45 
52 int rs2_get_raw_data_size(const rs2_raw_data_buffer* buffer, rs2_error** error);
53 
58 void rs2_delete_raw_data(const rs2_raw_data_buffer* buffer);
59 
66 const unsigned char* rs2_get_raw_data(const rs2_raw_data_buffer* buffer, rs2_error** error);
67 
73 int rs2_get_api_version(rs2_error** error);
74 
75 void rs2_log_to_console(rs2_log_severity min_severity, rs2_error ** error);
76 
77 void rs2_log_to_file(rs2_log_severity min_severity, const char * file_path, rs2_error ** error);
78 
79 void rs2_log_to_callback_cpp( rs2_log_severity min_severity, rs2_log_callback * callback, rs2_error ** error );
80 
81 void rs2_log_to_callback( rs2_log_severity min_severity, rs2_log_callback_ptr callback, void * arg, rs2_error** error );
82 
83 void rs2_reset_logger( rs2_error ** error);
84 
93 void rs2_enable_rolling_log_file( unsigned max_size, rs2_error ** error );
94 
95 
96 unsigned rs2_get_log_message_line_number( rs2_log_message const * msg, rs2_error** error );
97 const char * rs2_get_log_message_filename( rs2_log_message const * msg, rs2_error** error );
98 const char * rs2_get_raw_log_message( rs2_log_message const * msg, rs2_error** error );
99 const char * rs2_get_full_log_message( rs2_log_message const * msg, rs2_error** error );
100 
107 void rs2_log(rs2_log_severity severity, const char * message, rs2_error ** error);
108 
115 float rs2_depth_frame_get_distance(const rs2_frame* frame_ref, int x, int y, rs2_error** error);
116 
123 
124 #ifdef __cplusplus
125 }
126 #endif
127 #endif
rs2_log_message
struct rs2_log_message rs2_log_message
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:259
rs2_enable_rolling_log_file
void rs2_enable_rolling_log_file(unsigned max_size, rs2_error **error)
Enable rolling log file when used with rs2_log_to_file: Upon reaching (max_size/2) bytes,...
rs2_log_to_callback
void rs2_log_to_callback(rs2_log_severity min_severity, rs2_log_callback_ptr callback, void *arg, rs2_error **error)
rs2_reset_logger
void rs2_reset_logger(rs2_error **error)
rs2_log_to_callback_cpp
void rs2_log_to_callback_cpp(rs2_log_severity min_severity, rs2_log_callback *callback, rs2_error **error)
rs2_get_full_log_message
const char * rs2_get_full_log_message(rs2_log_message const *msg, rs2_error **error)
rs2_get_log_message_filename
const char * rs2_get_log_message_filename(rs2_log_message const *msg, rs2_error **error)
rs2_log_severity
rs2_log_severity
Severity of the librealsense logger.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:153
rs2_log
void rs2_log(rs2_log_severity severity, const char *message, rs2_error **error)
Add custom message into librealsense log.
rs2_log_callback
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_types.hpp:55
rs2_get_time
rs2_time_t rs2_get_time(rs2_error **error)
return the time at specific time point
rs2_raw_data_buffer
struct rs2_raw_data_buffer rs2_raw_data_buffer
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:260
rs2_get_log_message_line_number
unsigned rs2_get_log_message_line_number(rs2_log_message const *msg, rs2_error **error)
rs2_frame
struct rs2_frame rs2_frame
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:261
rs2_delete_raw_data
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
Delete rs2_raw_data_buffer.
rs2_depth_frame_get_distance
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.
rs2_log_callback_ptr
void(* rs2_log_callback_ptr)(rs2_log_severity, rs2_log_message const *, void *arg)
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:292
rs2_get_raw_data_size
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
get the size of rs2_raw_data_buffer
rs2_log_to_console
void rs2_log_to_console(rs2_log_severity min_severity, rs2_error **error)
rs2_time_t
double rs2_time_t
Timestamp format.
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:300
rs2_get_raw_log_message
const char * rs2_get_raw_log_message(rs2_log_message const *msg, rs2_error **error)
rs2_get_raw_data
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
Retrieve char array from rs2_raw_data_buffer.
rs2_log_to_file
void rs2_log_to_file(rs2_log_severity min_severity, const char *file_path, rs2_error **error)
rs2_get_api_version
int rs2_get_api_version(rs2_error **error)
Retrieve the API version from the source code.
rs2_error
struct rs2_error rs2_error
Definition: sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_types.h:258