Exposes record and playback functionality for C compilers.
Definition in file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_record_playback.h.
Go to the source code of this file.
Typedefs | |
| typedef enum rs2_playback_status | rs2_playback_status |
| typedef void(* | rs2_playback_status_changed_callback_ptr) (rs2_playback_status) |
Functions | |
| const char * | rs2_playback_status_to_string (rs2_playback_status status) |
| 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. More... | |
| 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. More... | |
| void | rs2_record_device_pause (const rs2_device *device, rs2_error **error) |
| Pause the recording device without stopping the actual device from streaming. More... | |
| void | rs2_record_device_resume (const rs2_device *device, rs2_error **error) |
| Unpause the recording device. More... | |
| 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. More... | |
| rs2_device * | rs2_create_playback_device (const char *file, rs2_error **error) |
| Creates a playback device to play the content of the given file. More... | |
| const char * | rs2_playback_device_get_file_path (const rs2_device *device, rs2_error **error) |
| Gets the path of the file used by the playback device. More... | |
| unsigned long long int | rs2_playback_get_duration (const rs2_device *device, rs2_error **error) |
| Gets the total duration of the file in units of nanoseconds. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void | rs2_playback_device_pause (const rs2_device *device, rs2_error **error) |
| Un-pauses the playback Calling resume() while playback status is "Playing" or "Stopped" does nothing. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| rs2_playback_status | rs2_playback_device_get_current_status (const rs2_device *device, rs2_error **error) |
| Returns the current state of the playback device. More... | |
| void | rs2_playback_device_set_playback_speed (const rs2_device *device, float speed, rs2_error **error) |
| Set the playing speed. More... | |
| 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) More... | |
| typedef enum rs2_playback_status rs2_playback_status |
| typedef void(* rs2_playback_status_changed_callback_ptr) (rs2_playback_status) |
Definition at line 30 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_record_playback.h.
| enum rs2_playback_status |
Definition at line 19 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/h/rs_record_playback.h.
| rs2_device* rs2_create_playback_device | ( | const char * | file, |
| rs2_error ** | error | ||
| ) |
Creates a playback device to play the content of the given file.
| [in] | file | Path to the file to play |
| [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 |
Referenced by rs2::recorder::recorder().
| 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 |
Referenced by rs2::recorder::recorder().
| rs2_playback_status rs2_playback_device_get_current_status | ( | const rs2_device * | device, |
| rs2_error ** | error | ||
| ) |
Returns the current state of the playback device.
| [in] | device | A playback device |
| [out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Referenced by rs2::playback::current_status().
| const char* rs2_playback_device_get_file_path | ( | const rs2_device * | device, |
| rs2_error ** | error | ||
| ) |
Gets the path of the file used by the playback device.
| [in] | device | A playback device |
| [out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Referenced by rs2::playback::playback().
| 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 |
Referenced by rs2::playback::is_real_time().
| void rs2_playback_device_pause | ( | const rs2_device * | device, |
| rs2_error ** | error | ||
| ) |
Un-pauses the playback Calling resume() while playback status is "Playing" or "Stopped" does nothing.
| [in] | device | A playback device |
| [out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Referenced by rs2::playback::pause().
| 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 |
Referenced by rs2::playback::resume().
| void rs2_playback_device_set_playback_speed | ( | const rs2_device * | device, |
| float | speed, | ||
| rs2_error ** | error | ||
| ) |
Set the playing speed.
| [in] | device | A playback device |
| [in] | speed | Indicates a multiplication of the speed to play (e.g: 1 = normal, 0.5 twice as slow) |
| [out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Referenced by rs2::playback::set_playback_speed().
| 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 |
Referenced by rs2::playback::set_real_time().
| 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 |
Referenced by rs2::playback::set_status_changed_callback().
| 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 |
Referenced by rs2::playback::stop().
| unsigned long long int rs2_playback_get_duration | ( | const rs2_device * | device, |
| rs2_error ** | error | ||
| ) |
Gets the total duration of the file in units of nanoseconds.
| [in] | device | A playback device |
| [out] | error | If non-null, receives any error that occurs during this call, otherwise, errors are ignored |
Referenced by rs2::playback::get_duration().
| 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 |
Referenced by rs2::playback::get_position().
| 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 |
Referenced by rs2::playback::seek().
| const char* rs2_playback_status_to_string | ( | rs2_playback_status | status | ) |
Referenced by operator<<().
| 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 |
Referenced by rs2::recorder::filename().
| 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 |
Referenced by rs2::recorder::pause().
| 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 |
Referenced by rs2::recorder::resume().