OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Advanced.h File Reference
#include "ObTypes.h"

Go to the source code of this file.

Macros

#define ob_depth_work_mode_list_count   ob_depth_work_mode_list_get_count
#define ob_device_preset_list_count   ob_device_preset_list_get_count

Functions

OB_EXPORT ob_depth_work_mode ob_device_get_current_depth_work_mode (const ob_device *device, ob_error **error)
 Get the current depth work mode.
OB_EXPORT const char * ob_device_get_current_depth_work_mode_name (const ob_device *device, ob_error **error)
 Get current depth mode name.
OB_EXPORT ob_status ob_device_switch_depth_work_mode (ob_device *device, const ob_depth_work_mode *work_mode, ob_error **error)
 Switch the depth work mode by ob_depth_work_mode. Prefer to use ob_device_switch_depth_work_mode_by_name to switch depth mode when the complete name of the depth work mode is known.
OB_EXPORT ob_status ob_device_switch_depth_work_mode_by_name (ob_device *device, const char *mode_name, ob_error **error)
 Switch the depth work mode by work mode name.
OB_EXPORT ob_depth_work_mode_listob_device_get_depth_work_mode_list (const ob_device *device, ob_error **error)
 Request the list of supported depth work modes.
OB_EXPORT uint32_t ob_depth_work_mode_list_get_count (const ob_depth_work_mode_list *work_mode_list, ob_error **error)
OB_EXPORT ob_depth_work_mode ob_depth_work_mode_list_get_item (const ob_depth_work_mode_list *work_mode_list, uint32_t index, ob_error **error)
 Get the index target of ob_depth_work_mode from work_mode_list.
OB_EXPORT void ob_delete_depth_work_mode_list (ob_depth_work_mode_list *work_mode_list, ob_error **error)
 Free the resources of ob_depth_work_mode_list.
OB_EXPORT const char * ob_device_get_current_preset_name (const ob_device *device, ob_error **error)
 Get the current preset name.
OB_EXPORT void ob_device_load_preset (ob_device *device, const char *preset_name, ob_error **error)
 Get the available preset list.
OB_EXPORT void ob_device_load_preset_from_json_file (ob_device *device, const char *json_file_path, ob_error **error)
 Load preset from json string.
OB_EXPORT void ob_device_load_preset_from_json_data (ob_device *device, const char *presetName, const uint8_t *data, uint32_t size, ob_error **error)
 Load custom preset from data.
OB_EXPORT void ob_device_export_current_settings_as_preset_json_file (ob_device *device, const char *json_file_path, ob_error **error)
 Export current settings as a preset json file.
OB_EXPORT void ob_device_export_current_settings_as_preset_json_data (ob_device *device, const char *presetName, const uint8_t **data, uint32_t *dataSize, ob_error **error)
 Export current device settings as a preset json data.
OB_EXPORT ob_device_preset_listob_device_get_available_preset_list (const ob_device *device, ob_error **error)
 Get the available preset list.
OB_EXPORT void ob_delete_preset_list (ob_device_preset_list *preset_list, ob_error **error)
 Delete the available preset list.
OB_EXPORT uint32_t ob_device_preset_list_get_count (const ob_device_preset_list *preset_list, ob_error **error)
 Get the number of preset in the preset list.
OB_EXPORT const char * ob_device_preset_list_get_name (const ob_device_preset_list *preset_list, uint32_t index, ob_error **error)
 Get the name of the preset in the preset list.
OB_EXPORT bool ob_device_preset_list_has_preset (const ob_device_preset_list *preset_list, const char *preset_name, ob_error **error)
 Check if the preset list has the preset.
OB_EXPORT bool ob_device_is_frame_interleave_supported (const ob_device *device, ob_error **error)
 Check if the device supports the frame interleave feature.
OB_EXPORT void ob_device_load_frame_interleave (ob_device *device, const char *frame_interleave_name, ob_error **error)
 load the frame interleave mode according to frame interleavee name.
OB_EXPORT ob_device_frame_interleave_listob_device_get_available_frame_interleave_list (ob_device *device, ob_error **error)
 Get the available frame interleave list.
OB_EXPORT void ob_delete_frame_interleave_list (ob_device_frame_interleave_list *frame_interleave_list, ob_error **error)
 Delete the available frame interleave list.
OB_EXPORT uint32_t ob_device_frame_interleave_list_get_count (ob_device_frame_interleave_list *frame_interleave_list, ob_error **error)
 Get the number of frame interleave in the frame interleave list.
OB_EXPORT const char * ob_device_frame_interleave_list_get_name (ob_device_frame_interleave_list *frame_interleave_list, uint32_t index, ob_error **error)
 Get the name of frame interleave in the frame interleave list.
OB_EXPORT bool ob_device_frame_interleave_list_has_frame_interleave (ob_device_frame_interleave_list *frame_interleave_list, const char *frame_interleave_name, ob_error **error)
 Check if the interleave ae list has the interleave ae.
OB_EXPORT ob_preset_resolution_config_listob_device_get_available_preset_resolution_config_list (ob_device *device, ob_error **error)
OB_EXPORT uint32_t ob_device_preset_resolution_config_get_count (ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error)
OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_item (const ob_preset_resolution_config_list *ob_preset_resolution_config_list, uint32_t index, ob_error **error)
 Get the preset resolution in the preset resolution list.
OB_EXPORT void ob_delete_preset_resolution_config_list (ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error)
 Delete the available preset resolution list.

Macro Definition Documentation

◆ ob_depth_work_mode_list_count

#define ob_depth_work_mode_list_count   ob_depth_work_mode_list_get_count

Definition at line 309 of file Advanced.h.

◆ ob_device_preset_list_count

#define ob_device_preset_list_count   ob_device_preset_list_get_count

Definition at line 310 of file Advanced.h.

Function Documentation

◆ ob_device_get_current_depth_work_mode()

OB_EXPORT ob_depth_work_mode ob_device_get_current_depth_work_mode ( const ob_device * device,
ob_error ** error )

Get the current depth work mode.

Parameters
[in]deviceThe device object.
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_depth_work_mode The current depth work mode.

Referenced by ob::Device::getCurrentDepthWorkMode().

◆ ob_device_get_current_depth_work_mode_name()

OB_EXPORT const char * ob_device_get_current_depth_work_mode_name ( const ob_device * device,
ob_error ** error )

Get current depth mode name.

According the current preset name to return current depth mode name

Returns
const char* return the current depth mode name.

Referenced by ob::Device::getCurrentDepthModeName().

◆ ob_device_switch_depth_work_mode()

OB_EXPORT ob_status ob_device_switch_depth_work_mode ( ob_device * device,
const ob_depth_work_mode * work_mode,
ob_error ** error )

Switch the depth work mode by ob_depth_work_mode. Prefer to use ob_device_switch_depth_work_mode_by_name to switch depth mode when the complete name of the depth work mode is known.

Parameters
[in]deviceThe device object.
[in]work_modeThe depth work mode from ob_depth_work_mode_list which is returned by ob_device_get_depth_work_mode_list.
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_status The switch result. OB_STATUS_OK: success, other failed.

Referenced by ob::Device::switchDepthWorkMode().

◆ ob_device_switch_depth_work_mode_by_name()

OB_EXPORT ob_status ob_device_switch_depth_work_mode_by_name ( ob_device * device,
const char * mode_name,
ob_error ** error )

Switch the depth work mode by work mode name.

Parameters
[in]deviceThe device object.
[in]mode_nameThe depth work mode name which is equal to ob_depth_work_mode.name.
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_status The switch result. OB_STATUS_OK: success, other failed.

Referenced by ob::Device::switchDepthWorkMode().

◆ ob_device_get_depth_work_mode_list()

OB_EXPORT ob_depth_work_mode_list * ob_device_get_depth_work_mode_list ( const ob_device * device,
ob_error ** error )

Request the list of supported depth work modes.

Parameters
[in]deviceThe device object.
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_depth_work_mode_list The list of ob_depth_work_mode.

Referenced by ob::Device::getDepthWorkModeList().

◆ ob_depth_work_mode_list_get_count()

OB_EXPORT uint32_t ob_depth_work_mode_list_get_count ( const ob_depth_work_mode_list * work_mode_list,
ob_error ** error )

◆ ob_depth_work_mode_list_get_item()

OB_EXPORT ob_depth_work_mode ob_depth_work_mode_list_get_item ( const ob_depth_work_mode_list * work_mode_list,
uint32_t index,
ob_error ** error )

Get the index target of ob_depth_work_mode from work_mode_list.

Parameters
[in]work_mode_listData structure containing a list of ob_depth_work_mode
[in]indexIndex of the target ob_depth_work_mode
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_depth_work_mode

Referenced by ob::OBDepthWorkModeList::getOBDepthWorkMode().

◆ ob_delete_depth_work_mode_list()

OB_EXPORT void ob_delete_depth_work_mode_list ( ob_depth_work_mode_list * work_mode_list,
ob_error ** error )

Free the resources of ob_depth_work_mode_list.

Parameters
[in]work_mode_listData structure containing a list of ob_depth_work_mode
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::OBDepthWorkModeList::~OBDepthWorkModeList().

◆ ob_device_get_current_preset_name()

OB_EXPORT const char * ob_device_get_current_preset_name ( const ob_device * device,
ob_error ** error )

Get the current preset name.

The preset mean a set of parameters or configurations that can be applied to the device to achieve a specific effect or function.

Parameters
deviceThe device object.
errorPointer to an error object that will be set if an error occurs.
Returns
The current preset name, it should be one of the preset names returned by ob_device_get_available_preset_list.

Referenced by ob::Device::getCurrentPresetName().

◆ ob_device_load_preset()

OB_EXPORT void ob_device_load_preset ( ob_device * device,
const char * preset_name,
ob_error ** error )

Get the available preset list.

Attention
After loading the preset, the settings in the preset will set to the device immediately. Therefore, it is recommended to re-read the device settings to update the user program temporarily.
Parameters
deviceThe device object.
preset_namePointer to an error object that will be set if an error occurs. The name should be one of the preset names returned by ob_device_get_available_preset_list.
errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Device::loadPreset().

◆ ob_device_load_preset_from_json_file()

OB_EXPORT void ob_device_load_preset_from_json_file ( ob_device * device,
const char * json_file_path,
ob_error ** error )

Load preset from json string.

After loading the custom preset, the settings in the custom preset will set to the device immediately.

After loading the custom preset, the available preset list will be appended with the custom preset and named as the file name.

Parameters
deviceThe device object.
json_file_pathThe json file path.
errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Device::loadPresetFromJsonFile().

◆ ob_device_load_preset_from_json_data()

OB_EXPORT void ob_device_load_preset_from_json_data ( ob_device * device,
const char * presetName,
const uint8_t * data,
uint32_t size,
ob_error ** error )

Load custom preset from data.

After loading the custom preset, the settings in the custom preset will set to the device immediately.

After loading the custom preset, the available preset list will be appended with the custom preset and named as the presetName.

Attention
The user should ensure that the custom preset data is adapted to the device and the settings in the data are valid.
It is recommended to re-read the device settings to update the user program temporarily after successfully loading the custom preset.
Parameters
dataThe custom preset data.
sizeThe size of the custom preset data.

Referenced by ob::Device::loadPresetFromJsonData().

◆ ob_device_export_current_settings_as_preset_json_file()

OB_EXPORT void ob_device_export_current_settings_as_preset_json_file ( ob_device * device,
const char * json_file_path,
ob_error ** error )

Export current settings as a preset json file.

After exporting the custom preset, the available preset list will be appended with the custom preset and named as the file name.

Parameters
deviceThe device object.
json_file_pathThe json file path.
errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Device::exportSettingsAsPresetJsonFile().

◆ ob_device_export_current_settings_as_preset_json_data()

OB_EXPORT void ob_device_export_current_settings_as_preset_json_data ( ob_device * device,
const char * presetName,
const uint8_t ** data,
uint32_t * dataSize,
ob_error ** error )

Export current device settings as a preset json data.

After exporting the preset, a new preset named as the presetName will be added to the available preset list.

Attention
The memory of the data is allocated by the SDK, and will automatically be released by the SDK.
The memory of the data will be reused by the SDK on the next call, so the user should copy the data to a new buffer if it needs to be preserved.
Parameters
[out]datareturn the preset json data.
[out]dataSizereturn the size of the preset json data.

Referenced by ob::Device::exportSettingsAsPresetJsonData().

◆ ob_device_get_available_preset_list()

OB_EXPORT ob_device_preset_list * ob_device_get_available_preset_list ( const ob_device * device,
ob_error ** error )

Get the available preset list.

Parameters
deviceThe device object.
errorPointer to an error object that will be set if an error occurs.
Returns
The available preset list.

Referenced by ob::Device::getAvailablePresetList().

◆ ob_delete_preset_list()

OB_EXPORT void ob_delete_preset_list ( ob_device_preset_list * preset_list,
ob_error ** error )

Delete the available preset list.

Parameters
preset_listThe available preset list.
errorPointer to an error object that will be set if an error occurs.

Referenced by ob::DevicePresetList::~DevicePresetList().

◆ ob_device_preset_list_get_count()

OB_EXPORT uint32_t ob_device_preset_list_get_count ( const ob_device_preset_list * preset_list,
ob_error ** error )

Get the number of preset in the preset list.

Parameters
preset_listThe available preset list.
errorPointer to an error object that will be set if an error occurs.
Returns
The number of preset in the preset list.

Referenced by ob::DevicePresetList::getCount().

◆ ob_device_preset_list_get_name()

OB_EXPORT const char * ob_device_preset_list_get_name ( const ob_device_preset_list * preset_list,
uint32_t index,
ob_error ** error )

Get the name of the preset in the preset list.

Parameters
preset_listThe available preset list.
indexThe index of the preset in the preset list.
errorPointer to an error object that will be set if an error occurs.
Returns
The name of the preset in the preset list.

Referenced by ob::DevicePresetList::getName().

◆ ob_device_preset_list_has_preset()

OB_EXPORT bool ob_device_preset_list_has_preset ( const ob_device_preset_list * preset_list,
const char * preset_name,
ob_error ** error )

Check if the preset list has the preset.

Parameters
preset_listThe available preset list.
preset_nameThe name of the preset.
errorPointer to an error object that will be set if an error occurs.
Returns
Whether the preset list has the preset. If true, the preset list has the preset. If false, the preset list does not have the preset.

Referenced by ob::DevicePresetList::hasPreset().

◆ ob_device_is_frame_interleave_supported()

OB_EXPORT bool ob_device_is_frame_interleave_supported ( const ob_device * device,
ob_error ** error )

Check if the device supports the frame interleave feature.

Parameters
deviceThe device object.
errorPointer to an error object that will be set if an error occurs.
Returns
bool Returns true if the device supports the frame interleave feature.

Referenced by ob::Device::isFrameInterleaveSupported().

◆ ob_device_load_frame_interleave()

OB_EXPORT void ob_device_load_frame_interleave ( ob_device * device,
const char * frame_interleave_name,
ob_error ** error )

load the frame interleave mode according to frame interleavee name.

Parameters
deviceThe device object.
frame_interleave_nameThe name should be one of the frame interleave names returned by ob_device_get_available_frame_interleave_list.
errorLog error messages.

Referenced by ob::Device::loadFrameInterleave().

◆ ob_device_get_available_frame_interleave_list()

OB_EXPORT ob_device_frame_interleave_list * ob_device_get_available_frame_interleave_list ( ob_device * device,
ob_error ** error )

Get the available frame interleave list.

Parameters
deviceThe device object.
errorLog error messages.
Returns
The available frame interleave list.

Referenced by ob::Device::getAvailableFrameInterleaveList().

◆ ob_delete_frame_interleave_list()

OB_EXPORT void ob_delete_frame_interleave_list ( ob_device_frame_interleave_list * frame_interleave_list,
ob_error ** error )

Delete the available frame interleave list.

Parameters
frame_interleave_listThe available frame interleave list.
errorLog error messages.

Referenced by ob::DeviceFrameInterleaveList::~DeviceFrameInterleaveList().

◆ ob_device_frame_interleave_list_get_count()

OB_EXPORT uint32_t ob_device_frame_interleave_list_get_count ( ob_device_frame_interleave_list * frame_interleave_list,
ob_error ** error )

Get the number of frame interleave in the frame interleave list.

Parameters
frame_interleave_listThe available frame interleave list.
errorLog error messages.
Returns
The number of frame interleave in the frame interleave list.

Referenced by ob::DeviceFrameInterleaveList::getCount().

◆ ob_device_frame_interleave_list_get_name()

OB_EXPORT const char * ob_device_frame_interleave_list_get_name ( ob_device_frame_interleave_list * frame_interleave_list,
uint32_t index,
ob_error ** error )

Get the name of frame interleave in the frame interleave list.

Parameters
frame_interleave_listThe available frame interleave list.
indexThe index of frame interleave in the frame interleave list.
errorLog error messages.
Returns
The name of frame interleave in the frame interleave list..

Referenced by ob::DeviceFrameInterleaveList::getName().

◆ ob_device_frame_interleave_list_has_frame_interleave()

OB_EXPORT bool ob_device_frame_interleave_list_has_frame_interleave ( ob_device_frame_interleave_list * frame_interleave_list,
const char * frame_interleave_name,
ob_error ** error )

Check if the interleave ae list has the interleave ae.

Parameters
frame_interleave_listThe available interleave ae list.
frame_interleave_nameThe name of the interleave ae.
errorLog error messages.
Returns
Whether the interleave ae list has the interleave ae. If true, the interleave ae list has the interleave ae. If false, the interleave ae list does not have the interleave ae.

Referenced by ob::DeviceFrameInterleaveList::hasFrameInterleave().

◆ ob_device_get_available_preset_resolution_config_list()

OB_EXPORT ob_preset_resolution_config_list * ob_device_get_available_preset_resolution_config_list ( ob_device * device,
ob_error ** error )

◆ ob_device_preset_resolution_config_get_count()

OB_EXPORT uint32_t ob_device_preset_resolution_config_get_count ( ob_preset_resolution_config_list * ob_preset_resolution_config_list,
ob_error ** error )

◆ ob_device_preset_resolution_config_list_get_item()

OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_item ( const ob_preset_resolution_config_list * ob_preset_resolution_config_list,
uint32_t index,
ob_error ** error )

Get the preset resolution in the preset resolution list.

Parameters
ob_preset_resolution_config_listThe available preset resolution list.
indexThe index of preset resolution in the preset resolution list.
errorLog error messages.
Returns
The preset resolution in the preset resolution list.

Referenced by ob::PresetResolutionConfigList::getPresetResolutionRatioConfig().

◆ ob_delete_preset_resolution_config_list()

OB_EXPORT void ob_delete_preset_resolution_config_list ( ob_preset_resolution_config_list * ob_preset_resolution_config_list,
ob_error ** error )

Delete the available preset resolution list.

Parameters
frame_interleave_listThe available preset resolution list.
errorLog error messages.

Referenced by ob::PresetResolutionConfigList::~PresetResolutionConfigList().