23 ob_record_device_t *impl_ =
nullptr;
26 explicit RecordDevice(std::shared_ptr<Device> device,
const std::string &file,
bool compressionEnabled =
true) {
41 other.impl_ =
nullptr;
48 other.impl_ =
nullptr;
114 void seek(
const int64_t timestamp) {
135 callback_ = callback;
178 static void playbackStatusCallback(
OBPlaybackStatus status,
void *userData) {
180 if(playbackDevice && playbackDevice->callback_) {
181 playbackDevice->callback_(status);
Device related types, including operations such as getting and creating a device, setting and obtaini...
This file defines the Error class, which describes abnormal errors within the SDK....
enum ob_playback_status OBPlaybackStatus
OB_EXPORT void ob_playback_device_seek(ob_device *player, const uint64_t timestamp, ob_error **error)
Set the playback to a specified time point of the played data.
OB_EXPORT uint64_t ob_playback_device_get_position(ob_device *player, ob_error **error)
Get the current playback position of the played data.
OB_EXPORT ob_playback_status ob_playback_device_get_current_playback_status(ob_device *player, ob_error **error)
Get the current playback status of the played data.
OB_EXPORT ob_device * ob_create_playback_device(const char *file_path, ob_error **error)
Create a playback device for the specified file path.
OB_EXPORT ob_record_device * ob_create_record_device(ob_device *device, const char *file_path, bool compression_enabled, ob_error **error)
Create a recording device for the specified device with a specified file path and compression enabled...
OB_EXPORT uint64_t ob_playback_device_get_duration(ob_device *player, ob_error **error)
Get the duration of the played data.
OB_EXPORT void ob_playback_device_set_playback_rate(ob_device *player, const float rate, ob_error **error)
Set the playback to a specified time point of the played data.
OB_EXPORT void ob_playback_device_pause(ob_device *player, ob_error **error)
Pause playback on the specified playback device.
OB_EXPORT void ob_playback_device_resume(ob_device *player, ob_error **error)
Resume playback on the specified playback device.
OB_EXPORT void ob_playback_device_set_playback_status_changed_callback(ob_device *player, ob_playback_status_changed_callback callback, void *user_data, ob_error **error)
Set a callback function to receive playback status updates.
OB_EXPORT void ob_record_device_pause(ob_record_device *recorder, ob_error **error)
Pause recording on the specified recording device.
OB_EXPORT void ob_delete_record_device(ob_record_device *recorder, ob_error **error)
Delete a recording device.
OB_EXPORT void ob_record_device_resume(ob_record_device *recorder, ob_error **error)
Resume recording on the specified recording device.
Device(ob_device_t *impl)
Describe the entity of the RGBD camera, representing a specific model of RGBD camera.
Device & operator=(Device &&other) noexcept
static void handle(ob_error **error, bool throw_exception=true)
A static function to handle the ob_error and throw an exception if needed.
virtual ~PlaybackDevice() noexcept override=default
void seek(const int64_t timestamp)
Seek to a specific timestamp when playing back a recording.
PlaybackDevice & operator=(const PlaybackDevice &)=delete
PlaybackDevice(const std::string &file)
OBPlaybackStatus getPlaybackStatus() const
Get the current playback status of the playback device.
void resume()
Resume the streaming data from the playback device.
uint64_t getDuration() const
Get the duration of the playback device.
void setPlaybackStatusChangeCallback(PlaybackStatusChangeCallback callback)
Set a callback function to be called when the playback status changes.
PlaybackDevice(const PlaybackDevice &)=delete
uint64_t getPosition() const
Get the current position of the playback device.
PlaybackDevice & operator=(PlaybackDevice &&other) noexcept
void setPlaybackRate(const float rate)
Set the playback rate of the playback device.
void pause()
Pause the streaming data from the playback device.
RecordDevice(std::shared_ptr< Device > device, const std::string &file, bool compressionEnabled=true)
RecordDevice(const RecordDevice &)=delete
virtual ~RecordDevice() noexcept
RecordDevice & operator=(RecordDevice &&other) noexcept
RecordDevice & operator=(const RecordDevice &)=delete
RecordDevice(RecordDevice &&other) noexcept
std::function< void(OBPlaybackStatus status)> PlaybackStatusChangeCallback
The error class exposed by the SDK, users can get detailed error information according to the error.