Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
rs_internal.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 
10 #ifndef LIBREALSENSE_RS2_INTERNAL_H
11 #define LIBREALSENSE_RS2_INTERNAL_H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #include "rs_types.h"
17 #include "rs_context.h"
18 #include "rs_sensor.h"
19 #include "rs_frame.h"
20 #include "rs_option.h"
25 typedef enum rs2_recording_mode
26 {
27  RS2_RECORDING_MODE_BLANK_FRAMES, /* frame metadata will be recorded, but pixel data will be replaced with zeros to save space */
28  RS2_RECORDING_MODE_COMPRESSED, /* frames will be encoded using a proprietary lossy encoding, aiming at x5 compression at some CPU expense */
29  RS2_RECORDING_MODE_BEST_QUALITY, /* frames will not be compressed, but rather stored as-is. This gives best quality and low CPU overhead, but you might run out of memory */
32 
34 typedef struct rs2_video_stream
35 {
37  int index;
38  int uid;
39  int width;
40  int height;
41  int fps;
42  int bpp;
46 
48 typedef struct rs2_motion_stream
49 {
51  int index;
52  int uid;
53  int fps;
57 
59 typedef struct rs2_pose_stream
60 {
62  int index;
63  int uid;
64  int fps;
67 
70 {
71  void* pixels;
72  void(*deleter)(void*);
73  int stride;
74  int bpp;
80 
83 {
84  void* data;
85  void(*deleter)(void*);
91 
94 {
96  {
97  float translation[3];
98  float velocity[3];
99  float acceleration[3];
100  float rotation[4];
105  };
106  void* data;
107  void(*deleter)(void*);
113 
116 {
118  int type;
120  const char* description;
121  const char* serialized_data;
123 
125 
134 rs2_context* rs2_create_recording_context(int api_version, const char* filename, const char* section, rs2_recording_mode mode, rs2_error** error);
135 
145 rs2_context* rs2_create_mock_context(int api_version, const char* filename, const char* section, rs2_error** error);
146 
157 rs2_context* rs2_create_mock_context_versioned(int api_version, const char* filename, const char* section, const char* min_api_version, rs2_error** error);
158 
166 
174 rs2_sensor* rs2_software_device_add_sensor(rs2_device* dev, const char* sensor_name, rs2_error** error);
175 
183 
191 
199 
200 
208 
217 
225 
233 
241 
249 void rs2_software_device_register_info(rs2_device* dev, rs2_camera_info info, const char *val, rs2_error** error);
250 
258 void rs2_software_device_update_info(rs2_device* dev, rs2_camera_info info, const char * val, rs2_error** error);
259 
267 
276 
284 
293 
301 
310 
318 void rs2_software_sensor_add_read_only_option(rs2_sensor* sensor, rs2_option option, float val, rs2_error** error);
319 
327 void rs2_software_sensor_update_read_only_option(rs2_sensor* sensor, rs2_option option, float val, rs2_error** error);
328 
340 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);
341 
348 void rs2_software_sensor_detach(rs2_sensor* sensor, rs2_error** error);
349 
350 #ifdef __cplusplus
351 }
352 #endif
353 #endif
void rs2_software_sensor_set_metadata(rs2_sensor *sensor, rs2_frame_metadata_value value, rs2_metadata_type type, rs2_error **error)
rs2_format fmt
Definition: rs_internal.h:43
void rs2_software_device_set_destruction_callback_cpp(const rs2_device *dev, rs2_software_device_destruction_callback *callback, rs2_error **error)
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
Definition: rs_sensor.h:22
rs2_time_t timestamp
Definition: rs_internal.h:75
float angular_acceleration[3]
Definition: rs_internal.h:102
struct rs2_software_video_frame rs2_software_video_frame
All the parameters required to define a video frame.
rs2_time_t timestamp
Definition: rs_internal.h:108
struct rs2_video_stream rs2_video_stream
All the parameters required to define a video stream.
int uid
Definition: rs_internal.h:52
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:22
float acceleration[3]
Definition: rs_internal.h:99
int fps
Definition: rs_internal.h:64
rs2_stream type
Definition: rs_internal.h:50
rs2_stream_profile * rs2_software_sensor_add_pose_stream(rs2_sensor *sensor, rs2_pose_stream pose_stream, rs2_error **error)
rs2_stream type
Definition: rs_internal.h:61
rs2_recording_mode
Definition: rs_internal.h:25
rs2_stream_profile * rs2_software_sensor_add_pose_stream_ex(rs2_sensor *sensor, rs2_pose_stream pose_stream, int is_default, rs2_error **error)
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)
struct rs2_software_motion_frame rs2_software_motion_frame
All the parameters required to define a motion frame.
const rs2_stream_profile * profile
Definition: rs_internal.h:89
Definition: rs_internal.h:28
struct rs2_context rs2_context
Definition: rs_types.h:238
float rotation[4]
Definition: rs_internal.h:100
int bpp
Definition: rs_internal.h:74
All the parameters required to define a video stream.
Definition: rs_internal.h:34
All the parameters required to define a pose frame.
Definition: rs_internal.h:93
int frame_number
Definition: rs_internal.h:88
int mapper_confidence
Definition: rs_internal.h:104
int uid
Definition: rs_internal.h:63
rs2_stream type
Definition: rs_internal.h:36
Definition: rs_types.hpp:48
int bpp
Definition: rs_internal.h:42
void * data
Definition: rs_internal.h:106
float angular_velocity[3]
Definition: rs_internal.h:101
int fps
Definition: rs_internal.h:41
rs2_timestamp_domain domain
Definition: rs_internal.h:87
const char * serialized_data
Definition: rs_internal.h:121
rs2_timestamp_domain domain
Definition: rs_internal.h:109
rs2_time_t timestamp
Definition: rs_internal.h:86
struct rs2_sensor rs2_sensor
Definition: rs_types.h:241
rs2_context * rs2_create_recording_context(int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error)
int frame_number
Definition: rs_internal.h:110
void rs2_software_sensor_detach(rs2_sensor *sensor, rs2_error **error)
rs2_stream_profile * rs2_software_sensor_add_motion_stream(rs2_sensor *sensor, rs2_motion_stream motion_stream, rs2_error **error)
const rs2_stream_profile * profile
Definition: rs_internal.h:78
int stride
Definition: rs_internal.h:73
rs2_stream_profile * rs2_software_sensor_add_video_stream_ex(rs2_sensor *sensor, rs2_video_stream video_stream, int is_default, rs2_error **error)
Exposes RealSense frame functionality for C compilers.
int uid
Definition: rs_internal.h:38
Exposes RealSense structs.
All the parameters required to define a pose stream.
Definition: rs_internal.h:59
rs2_matchers
Specifies types of different matchers.
Definition: rs_types.h:189
rs2_log_severity severity
Definition: rs_internal.h:119
void(* deleter)(void *)
Definition: rs_internal.h:107
void rs2_software_sensor_on_pose_frame(rs2_sensor *sensor, rs2_software_pose_frame frame, rs2_error **error)
rs2_device * rs2_create_software_device(rs2_error **error)
rs2_notification_category category
Definition: rs_internal.h:117
void rs2_software_sensor_add_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
struct rs2_stream_profile rs2_stream_profile
Definition: rs_types.h:228
int width
Definition: rs_internal.h:39
Definition: rs_internal.h:30
All the parameters required to define a motion stream.
Definition: rs_internal.h:48
Exposes RealSense sensor functionality for C compilers.
rs2_format
A stream's format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:59
rs2_stream_profile * rs2_software_sensor_add_motion_stream_ex(rs2_sensor *sensor, rs2_motion_stream motion_stream, int is_default, rs2_error **error)
rs2_format fmt
Definition: rs_internal.h:65
rs2_format fmt
Definition: rs_internal.h:54
Exposes sensor options functionality for C compilers.
Definition: rs_internal.h:95
const rs2_stream_profile * profile
Definition: rs_internal.h:111
rs2_context * rs2_create_mock_context(int api_version, const char *filename, const char *section, rs2_error **error)
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:42
rs2_sensor * rs2_software_device_add_sensor(rs2_device *dev, const char *sensor_name, rs2_error **error)
void rs2_software_sensor_update_read_only_option(rs2_sensor *sensor, rs2_option option, float val, rs2_error **error)
Definition: rs_internal.h:27
rs2_stream_profile * rs2_software_sensor_add_video_stream(rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error)
void rs2_software_sensor_on_notification(rs2_sensor *sensor, rs2_software_notification notif, rs2_error **error)
struct rs2_software_pose_frame rs2_software_pose_frame
All the parameters required to define a pose frame.
float translation[3]
Definition: rs_internal.h:97
void rs2_software_device_create_matcher(rs2_device *dev, rs2_matchers matcher, rs2_error **error)
struct rs2_motion_stream rs2_motion_stream
All the parameters required to define a motion stream.
void(* rs2_software_device_destruction_callback_ptr)(void *)
Definition: rs_types.h:249
float velocity[3]
Definition: rs_internal.h:98
struct rs2_pose_stream rs2_pose_stream
All the parameters required to define a pose stream.
All the parameters required to define a sensor notification.
Definition: rs_internal.h:115
void(* deleter)(void *)
Definition: rs_internal.h:85
int index
Definition: rs_internal.h:62
int index
Definition: rs_internal.h:37
int tracker_confidence
Definition: rs_internal.h:103
rs2_notification_category
Category of the librealsense notification.
Definition: rs_types.h:17
long long rs2_metadata_type
Definition: rs_types.h:256
rs2_context * rs2_create_mock_context_versioned(int api_version, const char *filename, const char *section, const char *min_api_version, rs2_error **error)
All the parameters required to define a motion frame.
Definition: rs_internal.h:82
rs2_timestamp_domain domain
Definition: rs_internal.h:76
struct rs2_device rs2_device
Definition: rs_types.h:216
int frame_number
Definition: rs_internal.h:77
void rs2_software_sensor_on_motion_frame(rs2_sensor *sensor, rs2_software_motion_frame frame, rs2_error **error)
Video stream intrinsics.
Definition: rs_types.h:58
rs2_motion_device_intrinsic intrinsics
Definition: rs_internal.h:55
struct rs2_software_notification rs2_software_notification
All the parameters required to define a sensor notification.
const char * description
Definition: rs_internal.h:120
Motion device intrinsics: scale, bias, and variances.
Definition: rs_types.h:71
void rs2_software_device_set_destruction_callback(const rs2_device *dev, rs2_software_device_destruction_callback_ptr on_notification, void *user, rs2_error **error)
int fps
Definition: rs_internal.h:53
void * data
Definition: rs_internal.h:84
void rs2_software_sensor_on_video_frame(rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error)
rs2_intrinsics intrinsics
Definition: rs_internal.h:44
All the parameters required to define a video frame.
Definition: rs_internal.h:69
Exposes RealSense context functionality for C compilers.
void(* deleter)(void *)
Definition: rs_internal.h:72
int index
Definition: rs_internal.h:51
void * pixels
Definition: rs_internal.h:71
struct rs2_error rs2_error
Definition: rs_types.h:217
double rs2_time_t
Definition: rs_types.h:255
void rs2_software_device_register_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:121
int type
Definition: rs_internal.h:118
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
Definition: rs_frame.h:29
Definition: rs_internal.h:29
void rs2_software_device_update_info(rs2_device *dev, rs2_camera_info info, const char *val, rs2_error **error)
int height
Definition: rs_internal.h:40
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs_frame.h:19