OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::PlaybackDevice Class Reference

#include <RecordPlayback.hpp>

Inheritance diagram for ob::PlaybackDevice:

Public Member Functions

 PlaybackDevice (const std::string &file)
virtual ~PlaybackDevice () noexcept override=default
 PlaybackDevice (PlaybackDevice &&other) noexcept
PlaybackDeviceoperator= (PlaybackDevice &&other) noexcept
 PlaybackDevice (const PlaybackDevice &)=delete
PlaybackDeviceoperator= (const PlaybackDevice &)=delete
void pause ()
 Pause the streaming data from the playback device.
void resume ()
 Resume the streaming data from the playback device.
void seek (const int64_t timestamp)
 Seek to a specific timestamp when playing back a recording.
void setPlaybackRate (const float rate)
 Set the playback rate of the playback device.
void setPlaybackStatusChangeCallback (PlaybackStatusChangeCallback callback)
 Set a callback function to be called when the playback status changes.
OBPlaybackStatus getPlaybackStatus () const
 Get the current playback status of the playback device.
uint64_t getPosition () const
 Get the current position of the playback device.
uint64_t getDuration () const
 Get the duration of the playback device.
Public Member Functions inherited from ob::Device
 Device (ob_device_t *impl)
 Describe the entity of the RGBD camera, representing a specific model of RGBD camera.
 Device (Device &&other) noexcept
Deviceoperator= (Device &&other) noexcept
 Device (const Device &)=delete
Deviceoperator= (const Device &)=delete
virtual ~Device () noexcept
ob_device_t * getImpl () const
std::shared_ptr< DeviceInfogetDeviceInfo () const
 Get device information.
bool isExtensionInfoExist (const std::string &infoKey) const
 Check if the extension information is exist.
const char * getExtensionInfo (const std::string &infoKey) const
 Get information about extensions obtained from SDK supported by the device.
std::shared_ptr< SensorListgetSensorList () const
 Get device sensor list.
std::shared_ptr< SensorgetSensor (OBSensorType type) const
 Get specific type of sensor if device not open, SDK will automatically open the connected device and return to the instance.
void setIntProperty (OBPropertyID propertyId, int32_t value) const
 Set int type of device property.
void setFloatProperty (OBPropertyID propertyId, float value) const
 Set float type of device property.
void setBoolProperty (OBPropertyID propertyId, bool value) const
 Set bool type of device property.
int32_t getIntProperty (OBPropertyID propertyId) const
 Get int type of device property.
float getFloatProperty (OBPropertyID propertyId) const
 Get float type of device property.
bool getBoolProperty (OBPropertyID propertyId) const
 Get bool type of device property.
OBIntPropertyRange getIntPropertyRange (OBPropertyID propertyId) const
 Get int type device property range (including current value and default value)
OBFloatPropertyRange getFloatPropertyRange (OBPropertyID propertyId) const
 Get float type device property range((including current value and default value)
OBBoolPropertyRange getBoolPropertyRange (OBPropertyID propertyId) const
 Get bool type device property range (including current value and default value)
void setStructuredData (OBPropertyID propertyId, const uint8_t *data, uint32_t dataSize) const
 Set the structured data type of a device property.
void getStructuredData (OBPropertyID propertyId, uint8_t *data, uint32_t *dataSize) const
 Get the structured data type of a device property.
void writeCustomerData (const void *data, uint32_t dataSize)
 Set the customer data type of a device property.
void readCustomerData (void *data, uint32_t *dataSize)
 Get the customer data type of a device property.
int getSupportedPropertyCount () const
 Get the number of properties supported by the device.
OBPropertyItem getSupportedProperty (uint32_t index) const
 Get the supported properties of the device.
bool isPropertySupported (OBPropertyID propertyId, OBPermissionType permission) const
 Check if a property permission is supported.
bool isGlobalTimestampSupported () const
 Check if the global timestamp is supported for the device.
void enableGlobalTimestamp (bool enable)
 Enable or disable the global timestamp.
void updateFirmware (const char *filePath, DeviceFwUpdateCallback callback, bool async=true)
 Update the device firmware.
void updateFirmwareFromData (const uint8_t *firmwareData, uint32_t firmwareDataSize, DeviceFwUpdateCallback callback, bool async=true)
 Update the device firmware from data.
void updateOptionalDepthPresets (const char filePathList[][OB_PATH_MAX], uint8_t pathCount, DeviceFwUpdateCallback callback)
 Update the device optional depth presets.
void setDeviceStateChangedCallback (DeviceStateChangedCallback callback)
 Set the device state changed callbacks.
OBDepthWorkMode getCurrentDepthWorkMode () const
 Get current depth work mode.
const char * getCurrentDepthModeName ()
 Get current depth mode name.
OBStatus switchDepthWorkMode (const OBDepthWorkMode &workMode) const
 Switch depth work mode by OBDepthWorkMode. Prefer invoke switchDepthWorkMode(const char *modeName) to switch depth mode when known the complete name of depth work mode.
OBStatus switchDepthWorkMode (const char *modeName) const
 Switch depth work mode by work mode name.
std::shared_ptr< OBDepthWorkModeListgetDepthWorkModeList () const
 Request support depth work mode list.
void reboot () const
 Device restart.
void reboot (uint32_t delayMs) const
 Device restart delay mode.
void enableHeartbeat (bool enable) const
 Enable or disable the device heartbeat.
uint16_t getSupportedMultiDeviceSyncModeBitmap () const
 Get the supported multi device sync mode bitmap of the device.
void setMultiDeviceSyncConfig (const OBMultiDeviceSyncConfig &config) const
 set the multi device sync configuration of the device.
OBMultiDeviceSyncConfig getMultiDeviceSyncConfig () const
 get the multi device sync configuration of the device.
void triggerCapture () const
 send the capture command to the device.
void setTimestampResetConfig (const OBDeviceTimestampResetConfig &config) const
 set the timestamp reset configuration of the device.
OBDeviceTimestampResetConfig getTimestampResetConfig () const
 get the timestamp reset configuration of the device.
void timestampReset () const
 send the timestamp reset command to the device.
void timerSyncWithHost () const
 synchronize the timer of the device with the host.
const char * getCurrentPresetName () const
 Get current preset name.
void loadPreset (const char *presetName) const
 load the preset according to the preset name.
std::shared_ptr< DevicePresetListgetAvailablePresetList () const
 Get available preset list.
void loadPresetFromJsonFile (const char *filePath) const
 Load custom preset from file.
void loadPresetFromJsonData (const char *presetName, const uint8_t *data, uint32_t size)
 Load custom preset from data.
void exportSettingsAsPresetJsonData (const char *presetName, const uint8_t **data, uint32_t *dataSize)
 Export current device settings as a preset json data.
void exportSettingsAsPresetJsonFile (const char *filePath) const
 Export current device settings as a preset json file.
OBDeviceState getDeviceState ()
 Get the current device status.
void sendAndReceiveData (const uint8_t *sendData, uint32_t sendDataSize, uint8_t *receiveData, uint32_t *receiveDataSize) const
 Send data to the device and receive data from the device.
bool isFrameInterleaveSupported () const
 Check if the device supports the frame interleave feature.
void loadFrameInterleave (const char *frameInterleaveName) const
 load the frame interleave according to frame interleave name.
std::shared_ptr< DeviceFrameInterleaveListgetAvailableFrameInterleaveList () const
 Get available frame interleave list.
std::shared_ptr< PresetResolutionConfigListgetAvailablePresetResolutionConfigList () const
 Get the available preset resolution config list.
void deviceUpgrade (const char *filePath, DeviceFwUpdateCallback callback, bool async=true)
void deviceUpgradeFromData (const uint8_t *firmwareData, uint32_t firmwareDataSize, DeviceFwUpdateCallback callback, bool async=true)
std::shared_ptr< CameraParamListgetCalibrationCameraParamList ()
void loadDepthFilterConfig (const char *filePath)

Additional Inherited Members

Public Types inherited from ob::Device
typedef std::function< void(OBFwUpdateState state, const char *message, uint8_t percent)> DeviceFwUpdateCallback
 Callback function for device firmware update progress.
typedef std::function< void(OBDeviceState state, const char *message)> DeviceStateChangedCallback
 Callback function for device status updates.
Static Public Member Functions inherited from ob::Device
static void deviceStateChangedCallback (OBDeviceState state, const char *message, void *userData)
Protected Attributes inherited from ob::Device
ob_deviceimpl_ = nullptr
DeviceStateChangedCallback deviceStateChangeCallback_
DeviceFwUpdateCallback fwUpdateCallback_

Detailed Description

Definition at line 71 of file RecordPlayback.hpp.

Constructor & Destructor Documentation

◆ PlaybackDevice() [1/3]

ob::PlaybackDevice::PlaybackDevice ( const std::string & file)
inlineexplicit

Definition at line 73 of file RecordPlayback.hpp.

Referenced by operator=(), operator=(), PlaybackDevice(), and PlaybackDevice().

◆ ~PlaybackDevice()

virtual ob::PlaybackDevice::~PlaybackDevice ( )
overridevirtualdefaultnoexcept

◆ PlaybackDevice() [2/3]

ob::PlaybackDevice::PlaybackDevice ( PlaybackDevice && other)
inlinenoexcept

Definition at line 81 of file RecordPlayback.hpp.

◆ PlaybackDevice() [3/3]

ob::PlaybackDevice::PlaybackDevice ( const PlaybackDevice & )
delete

Member Function Documentation

◆ operator=() [1/2]

PlaybackDevice & ob::PlaybackDevice::operator= ( PlaybackDevice && other)
inlinenoexcept

Definition at line 83 of file RecordPlayback.hpp.

◆ operator=() [2/2]

PlaybackDevice & ob::PlaybackDevice::operator= ( const PlaybackDevice & )
delete

◆ pause()

void ob::PlaybackDevice::pause ( )
inline

Pause the streaming data from the playback device.

Definition at line 95 of file RecordPlayback.hpp.

◆ resume()

void ob::PlaybackDevice::resume ( )
inline

Resume the streaming data from the playback device.

Definition at line 104 of file RecordPlayback.hpp.

◆ seek()

void ob::PlaybackDevice::seek ( const int64_t timestamp)
inline

Seek to a specific timestamp when playing back a recording.

Parameters
[in]timestampThe timestamp to seek to, in milliseconds.

Definition at line 114 of file RecordPlayback.hpp.

◆ setPlaybackRate()

void ob::PlaybackDevice::setPlaybackRate ( const float rate)
inline

Set the playback rate of the playback device.

Parameters
[in]rateThe playback rate to set.

Definition at line 124 of file RecordPlayback.hpp.

◆ setPlaybackStatusChangeCallback()

void ob::PlaybackDevice::setPlaybackStatusChangeCallback ( PlaybackStatusChangeCallback callback)
inline

Set a callback function to be called when the playback status changes.

Parameters
[in]callbackThe callback function to set.

Definition at line 134 of file RecordPlayback.hpp.

◆ getPlaybackStatus()

OBPlaybackStatus ob::PlaybackDevice::getPlaybackStatus ( ) const
inline

Get the current playback status of the playback device.

Returns
The current playback status.

Definition at line 145 of file RecordPlayback.hpp.

◆ getPosition()

uint64_t ob::PlaybackDevice::getPosition ( ) const
inline

Get the current position of the playback device.

Returns
The current position of the playback device, in milliseconds.

Definition at line 157 of file RecordPlayback.hpp.

◆ getDuration()

uint64_t ob::PlaybackDevice::getDuration ( ) const
inline

Get the duration of the playback device.

Returns
The duration of the playback device, in milliseconds.

Definition at line 169 of file RecordPlayback.hpp.


The documentation for this class was generated from the following file: