|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
4 #ifndef LIBREALSENSE_RS2_RECORD_PLAYBACK_HPP
5 #define LIBREALSENSE_RS2_RECORD_PLAYBACK_HPP
15 T on_status_changed_function;
21 on_status_changed_function(status);
27 class playback :
public device
92 void seek(std::chrono::nanoseconds time)
152 template <
typename T>
203 class recorder :
public device
216 _dev = std::shared_ptr<rs2_device>(
231 _dev = std::shared_ptr<rs2_device>(
281 #endif // LIBREALSENSE_RS2_RECORD_PLAYBACK_HPP
void stop()
Stops the playback, effectively stopping all streaming playback sensors, and resetting the playback.
status_changed_callback(T on_status_changed)
void pause()
Pauses the playback Calling pause() in "Paused" status does nothing If pause() is called while playba...
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.
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.
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.
void seek(std::chrono::nanoseconds time)
Sets the playback to a specified time point of the played data.
std::string file_name() const
Retrieves the name of the playback file.
void rs2_playback_device_set_playback_speed(const rs2_device *device, float speed, rs2_error **error)
Set the playing speed.
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.
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.
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.
void pause()
Pause the recording device without stopping the actual device from streaming.
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.
void set_status_changed_callback(T callback)
Start passing frames into user provided callback.
const std::shared_ptr< rs2_device > & get() const
rs2_playback_status rs2_playback_device_get_current_status(const rs2_device *device, rs2_error **error)
Returns the current state of the playback device.
void rs2_record_device_resume(const rs2_device *device, rs2_error **error)
Unpause the recording device.
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 playba...
void set_playback_speed(float speed) const
Set the playing speed.
uint64_t get_position() const
Retrieves the current position of the playback in the file in terms of time.
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.
std::string filename() const
Gets the name of the file to which the recorder is writing.
void set_real_time(bool real_time) const
Set the playback to work in real time or non real time.
constexpr absl::OTABSL_OPTION_NAMESPACE_NAME::remove_reference_t< T > && move(T &&t) noexcept
recorder(const std::string &file, rs2::device dev)
Creates a recording device to record the given device and save it to the given file as rosbag format.
void on_playback_status_changed(rs2_playback_status status) override
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.
playback(std::shared_ptr< rs2_device > dev)
void rs2_delete_device(rs2_device *device)
Delete RealSense device.
bool is_real_time() const
Indicates if playback is in real time mode or non real time.
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.
void resume()
Unpauses the recording device, making it resume recording.
recorder(std::shared_ptr< rs2_device > dev)
recorder(const std::string &file, rs2::device dev, bool compression_enabled)
Creates a recording device to record the given device and save it to the given file as rosbag format.
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.
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.
std::chrono::nanoseconds get_duration() const
Retrieves the total duration of the file.
static void handle(rs2_error *e)
std::shared_ptr< rs2_device > _dev
rs2_playback_status current_status() const
Returns the current state of the playback device.
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 playbac...
void resume()
Un-pauses the playback Calling resume() while playback status is "Playing" or "Stopped" does nothing.
void rs2_record_device_pause(const rs2_device *device, rs2_error **error)
Pause the recording device without stopping the actual device from streaming.
struct rs2_error rs2_error