#include "rs_types.h"
#include "rs_context.h"
#include "rs_sensor.h"
#include "rs_frame.h"
#include "rs_option.h"
Go to the source code of this file.
|
rs2_context * | rs2_create_recording_context (int api_version, const char *filename, const char *section, rs2_recording_mode mode, rs2_error **error) |
|
rs2_context * | rs2_create_mock_context (int api_version, const char *filename, const char *section, rs2_error **error) |
|
rs2_device * | rs2_create_software_device (rs2_error **error) |
|
rs2_sensor * | rs2_software_device_add_sensor (rs2_device *dev, const char *sensor_name, rs2_error **error) |
|
void | rs2_software_sensor_on_video_frame (rs2_sensor *sensor, rs2_software_video_frame frame, rs2_error **error) |
|
void | rs2_software_device_create_matcher (rs2_device *dev, rs2_matchers matcher, rs2_error **error) |
|
rs2_stream_profile * | rs2_software_sensor_add_video_stream (rs2_sensor *sensor, rs2_video_stream video_stream, rs2_error **error) |
|
void | rs2_software_sensor_add_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error) |
|
void | rs2_software_sensor_update_read_only_option (rs2_sensor *sensor, rs2_option option, float val, rs2_error **error) |
|
◆ rs2_recording_mode
librealsense Recorder is intended for effective unit-testing Currently supports three modes of operation:
◆ rs2_software_video_frame
All the parameters are requaired to define video frame.
◆ rs2_video_stream
All the parameters are requaired to defind video stream.
◆ rs2_recording_mode
librealsense Recorder is intended for effective unit-testing Currently supports three modes of operation:
Enumerator |
---|
RS2_RECORDING_MODE_BLANK_FRAMES | |
RS2_RECORDING_MODE_COMPRESSED | |
RS2_RECORDING_MODE_BEST_QUALITY | |
RS2_RECORDING_MODE_COUNT | |
◆ rs2_create_mock_context()
rs2_context* rs2_create_mock_context |
( |
int |
api_version, |
|
|
const char * |
filename, |
|
|
const char * |
section, |
|
|
rs2_error ** |
error |
|
) |
| |
Create librealsense context that given a file will respond to calls exactly as the recording did if the user calls a method that was either not called during recording or violates causality of the recording error will be thrown
- Parameters
-
[in] | api_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 |
- Returns
- context object, should be released by rs2_delete_context
◆ rs2_create_recording_context()
Create librealsense context that will try to record all operations over librealsense into a file
- Parameters
-
[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 |
- Returns
- context object, should be released by rs2_delete_context
◆ rs2_create_software_device()
Create software device to enable use librealsense logic without getting data from backend but inject the data from outside
- Parameters
-
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
- Returns
- software device object, should be released by rs2_delete_device
◆ rs2_software_device_add_sensor()
Add sensor to the software device
- Parameters
-
[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 |
- Returns
- software sensor object, should be released by rs2_delete_sensor
◆ rs2_software_device_create_matcher()
Set the wanted matcher type that will be used by the syncer
- Parameters
-
[in] | dev | the software device |
[in] | matcher | matcher type |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
◆ rs2_software_sensor_add_read_only_option()
Add read only option to sensor
- Parameters
-
[in] | sensor | the software sensor |
[in] | option | the wanted option |
[in] | val | the initial value |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
◆ rs2_software_sensor_add_video_stream()
Add video stream to sensor
- Parameters
-
[in] | sensor | the software sensor |
[in] | video_stream | all the stream components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
◆ rs2_software_sensor_on_video_frame()
Inject frame to software sonsor
- Parameters
-
[in] | sensor | the software sensor |
[in] | frame | all the frame components |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |
◆ rs2_software_sensor_update_read_only_option()
Update the read only option added to sensor
- Parameters
-
[in] | sensor | the software sensor |
[in] | option | the wanted option |
[in] | val | the wanted value |
[out] | error | if non-null, receives any error that occurs during this call, otherwise, errors are ignored |