Update OrbbecSDK version to 2.5.5

This commit is contained in:
slz
2025-11-07 10:16:09 +08:00
parent b46f5191ad
commit 6e77843e2f
43 changed files with 2033 additions and 819 deletions
@@ -20,6 +20,10 @@ OB_EXPORT ob_depth_work_mode ob_device_get_current_depth_work_mode(const ob_devi
/**
* @brief Get current depth mode name
* @brief According the current preset name to return current depth mode name
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* return the current depth mode name.
*/
OB_EXPORT const char *ob_device_get_current_depth_work_mode_name(const ob_device *device, ob_error **error);
@@ -58,12 +62,12 @@ OB_EXPORT ob_status ob_device_switch_depth_work_mode_by_name(ob_device *device,
OB_EXPORT ob_depth_work_mode_list *ob_device_get_depth_work_mode_list(const ob_device *device, ob_error **error);
/**
* \if English
* @brief Get the depth work mode count that ob_depth_work_mode_list hold
* @param[in] work_mode_list data struct contain list of ob_depth_work_mode
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return The total number contained in ob_depth_work_mode_list
*
* @param[in] work_mode_list Data structure containing a list of ob_depth_work_mode
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The total number contained in ob_depth_work_mode_list
*/
OB_EXPORT uint32_t ob_depth_work_mode_list_get_count(const ob_depth_work_mode_list *work_mode_list, ob_error **error);
@@ -73,8 +77,8 @@ OB_EXPORT uint32_t ob_depth_work_mode_list_get_count(const ob_depth_work_mode_li
* @param[in] work_mode_list Data structure containing a list of ob_depth_work_mode
* @param[in] index Index of the target ob_depth_work_mode
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return ob_depth_work_mode
*
* @return ob_depth_work_mode
*/
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);
@@ -83,17 +87,17 @@ OB_EXPORT ob_depth_work_mode ob_depth_work_mode_list_get_item(const ob_depth_wor
*
* @param[in] work_mode_list Data structure containing a list of ob_depth_work_mode
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
*/
OB_EXPORT void ob_delete_depth_work_mode_list(ob_depth_work_mode_list *work_mode_list, ob_error **error);
/**
* @breif Get the current preset name.
* @brief Get the current preset name.
* @brief The preset mean a set of parameters or configurations that can be applied to the device to achieve a specific effect or function.
*
* @param device The device object.
* @param error Pointer to an error object that will be set if an error occurs.
* @return The current preset name, it should be one of the preset names returned by @ref ob_device_get_available_preset_list.
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The current preset name, it should be one of the preset names returned by @ref ob_device_get_available_preset_list.
*/
OB_EXPORT const char *ob_device_get_current_preset_name(const ob_device *device, ob_error **error);
@@ -102,10 +106,10 @@ OB_EXPORT const char *ob_device_get_current_preset_name(const ob_device *device,
* @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.
*
* @param device The device object.
* @param preset_name Pointer to an error object that will be set if an error occurs. The name should be one of the preset names returned by @ref
* @param[in] device The device object.
* @param[in] preset_name Pointer to an error object that will be set if an error occurs. The name should be one of the preset names returned by @ref
* ob_device_get_available_preset_list.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_load_preset(ob_device *device, const char *preset_name, ob_error **error);
@@ -114,22 +118,25 @@ OB_EXPORT void ob_device_load_preset(ob_device *device, const char *preset_name,
* @brief After loading the custom preset, the settings in the custom preset will set to the device immediately.
* @brief After loading the custom preset, the available preset list will be appended with the custom preset and named as the file name.
*
* @param device The device object.
* @param json_file_path The json file path.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] device The device object.
* @param[in] json_file_path The json file path.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_load_preset_from_json_file(ob_device *device, const char *json_file_path, ob_error **error);
/**
* @brief Load custom preset from data.
* @brief After loading the custom preset, the settings in the custom preset will set to the device immediately.
* @brief After loading the custom preset, the available preset list will be appended with the custom preset and named as the @ref presetName.
* @brief After loading the custom preset, the available preset list will be appended with the custom preset and named as the @p presetName.
*
* @attention The user should ensure that the custom preset data is adapted to the device and the settings in the data are valid.
* @attention It is recommended to re-read the device settings to update the user program temporarily after successfully loading the custom preset.
*
* @param data The custom preset data.
* @param size The size of the custom preset data.
* @param[in] device The device object.
* @param[in] presetName The name of the custome preset.
* @param[in] data The custom preset data.
* @param[in] size The size of the custom preset data.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
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);
@@ -137,22 +144,25 @@ OB_EXPORT void ob_device_load_preset_from_json_data(ob_device *device, const cha
* @brief Export current settings as a preset json file.
* @brief After exporting the custom preset, the available preset list will be appended with the custom preset and named as the file name.
*
* @param device The device object.
* @param json_file_path The json file path.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] device The device object.
* @param[in] json_file_path The json file path.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_export_current_settings_as_preset_json_file(ob_device *device, const char *json_file_path, ob_error **error);
/**
* @brief Export current device settings as a preset json data.
* @brief After exporting the preset, a new preset named as the @ref presetName will be added to the available preset list.
* @brief After exporting the preset, a new preset named as the @p 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.
* @attention 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.
*
* @param[out] data return the preset json data.
* @param[out] dataSize return the size of the preset json data.
* @param[in] device The device object.
* @param[in] presetName The name of the custome preset.
* @param[out] data Return the preset json data.
* @param[out] dataSize Return the size of the preset json data.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
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);
@@ -160,54 +170,59 @@ OB_EXPORT void ob_device_export_current_settings_as_preset_json_data(ob_device *
/**
* @brief Get the available preset list.
*
* @param device The device object.
* @param error Pointer to an error object that will be set if an error occurs.
* @return The available preset list.
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The available preset list.
*/
OB_EXPORT ob_device_preset_list *ob_device_get_available_preset_list(const ob_device *device, ob_error **error);
/**
* @brief Delete the available preset list.
*
* @param preset_list The available preset list.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] preset_list The available preset list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_delete_preset_list(ob_device_preset_list *preset_list, ob_error **error);
/**
* @brief Get the number of preset in the preset list.
*
* @param preset_list The available preset list.
* @param error Pointer to an error object that will be set if an error occurs.
* @return The number of preset in the preset list.
* @param[in] preset_list The available preset list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The number of preset in the preset list.
*/
OB_EXPORT uint32_t ob_device_preset_list_get_count(const ob_device_preset_list *preset_list, ob_error **error);
/**
* @brief Get the name of the preset in the preset list.
*
* @param preset_list The available preset list.
* @param index The index of the preset in the preset list.
* @param error Pointer to an error object that will be set if an error occurs.
* @return The name of the preset in the preset list.
* @param[in] preset_list The available preset list.
* @param[in] index The index of the preset in the preset list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The name of the 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);
/**
* @brief Check if the preset list has the preset.
*
* @param preset_list The available preset list.
* @param preset_name The name of the preset.
* @param error Pointer to an error object that will be set if an error occurs.
* @return 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.
* @param[in] preset_list The available preset list.
* @param[in] preset_name The name of the preset.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return 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.
*/
OB_EXPORT bool ob_device_preset_list_has_preset(const ob_device_preset_list *preset_list, const char *preset_name, ob_error **error);
/**
* @brief Check if the device supports the frame interleave feature.
*
* @param device The device object.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool Returns true if the device supports the frame interleave feature.
*/
OB_EXPORT bool ob_device_is_frame_interleave_supported(const ob_device *device, ob_error **error);
@@ -215,17 +230,18 @@ OB_EXPORT bool ob_device_is_frame_interleave_supported(const ob_device *device,
*
* @brief load the frame interleave mode according to frame interleavee name.
*
* @param device The device object.
* @param frame_interleave_name The name should be one of the frame interleave names returned by @ref ob_device_get_available_frame_interleave_list.
* @param error Log error messages.
* @param[in] device The device object.
* @param[in] frame_interleave_name The name should be one of the frame interleave names returned by @ref ob_device_get_available_frame_interleave_list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_load_frame_interleave(ob_device *device, const char *frame_interleave_name, ob_error **error);
/**
* @brief Get the available frame interleave list.
*
* @param device The device object.
* @param error Log error messages.
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The available frame interleave list.
*/
OB_EXPORT ob_device_frame_interleave_list *ob_device_get_available_frame_interleave_list(ob_device *device, ob_error **error);
@@ -233,75 +249,82 @@ OB_EXPORT ob_device_frame_interleave_list *ob_device_get_available_frame_interle
/**
* @brief Delete the available frame interleave list.
*
* @param frame_interleave_list The available frame interleave list.
* @param error Log error messages.
* @param[in] frame_interleave_list The available frame interleave list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_delete_frame_interleave_list(ob_device_frame_interleave_list *frame_interleave_list, ob_error **error);
/**
* @brief Get the number of frame interleave in the frame interleave list.
*
* @param frame_interleave_list The available frame interleave list.
* @param error Log error messages.
* @return The number of frame interleave in the frame interleave list.
* @param[in] frame_interleave_list The available frame interleave list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The number of frame interleave in the 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);
/**
* @brief Get the name of frame interleave in the frame interleave list.
*
* @param frame_interleave_list The available frame interleave list.
* @param index The index of frame interleave in the frame interleave list.
* @param error Log error messages.
* @return The name of frame interleave in the frame interleave list..
* @param[in] frame_interleave_list The available frame interleave list.
* @param[in] index The index of frame interleave in the frame interleave list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The name 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);
/**
* @brief Check if the interleave ae list has the interleave ae.
*
* @param frame_interleave_list The available interleave ae list.
* @param frame_interleave_name The name of the interleave ae.
* @param error Log error messages.
* @return 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
* @param[in] frame_interleave_list The available interleave ae list.
* @param[in] frame_interleave_name The name of the interleave ae.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return 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.
*/
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);
/* @brief Get the available preset resolution config list.
/**
* @brief Get the available preset resolution config list.
*
* @param device The device object.
* @param error Log error messages.
* @return The available frame interleave list.
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The available frame resolution config list.
*/
OB_EXPORT ob_preset_resolution_config_list *ob_device_get_available_preset_resolution_config_list(ob_device *device, ob_error **error);
/* @brief Get the number of preset resolution in the preset resolution list.
/**
* @brief Get the number of preset resolution in the preset resolution list.
*
* @param ob_preset_resolution_config_list The available preset resolution list.
* @param error Log error messages.
* @return The number of preset resolution in the preset resolution list.
* @param[in] ob_preset_resolution_config_list The available preset resolution list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The number of preset resolution in the preset resolution list.
*/
OB_EXPORT uint32_t ob_device_preset_resolution_config_get_count(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
/**
* @brief Get the preset resolution in the preset resolution list.
*
* @param ob_preset_resolution_config_list The available preset resolution list.
* @param index The index of preset resolution in the preset resolution list.
* @param error Log error messages.
* @return The preset resolution in the preset resolution list.
* @param[in] ob_preset_resolution_config_list The available preset resolution list.
* @param[in] index The index of preset resolution in the preset resolution list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The preset resolution in the preset resolution list.
*/
OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_item(const ob_preset_resolution_config_list *ob_preset_resolution_config_lis,
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);
/**
* @brief Delete the available preset resolution list.
*
* @param frame_interleave_list The available preset resolution list.
* @param error Log error messages.
* @param[in] ob_preset_resolution_config_list The available preset resolution list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_delete_preset_resolution_config_list(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
@@ -19,6 +19,7 @@ extern "C" {
* @brief Create a context object with the default configuration file
*
* @param[out] error Pointer to an error object that will be populated if an error occurs during context creation
*
* @return Pointer to the created context object
*/
OB_EXPORT ob_context *ob_create_context(ob_error **error);
@@ -28,6 +29,7 @@ OB_EXPORT ob_context *ob_create_context(ob_error **error);
*
* @param[in] config_file_path Path to the configuration file. If NULL, the default configuration file will be used.
* @param[out] error Pointer to an error object that will be populated if an error occurs during context creation
*
* @return Pointer to the created context object
*/
OB_EXPORT ob_context *ob_create_context_with_config(const char *config_file_path, ob_error **error);
@@ -45,6 +47,7 @@ OB_EXPORT void ob_delete_context(ob_context *context, ob_error **error);
*
* @param[in] context Pointer to the context object
* @param[out] error Pointer to an error object that will be populated if an error occurs during device enumeration
*
* @return Pointer to the device list object
*/
OB_EXPORT ob_device_list *ob_query_device_list(ob_context *context, ob_error **error);
@@ -63,6 +66,21 @@ OB_EXPORT ob_device_list *ob_query_device_list(ob_context *context, ob_error **e
*/
OB_EXPORT void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error);
/**
* @brief "Force" a static IP address configuration in a device identified by its MAC Address.
*
* @param[in] macAddress MAC address of the network device.
* You can obtain it from @ref ob_device_info_get_uid, or specify it manually
* in the format xx:xx:xx:xx:xx:xx, where each xx is a two-digit hexadecimal value.
* @param[in] config The new IP configuration.
* @param[out] error Pointer to an error object that will be populated if an error occurs.
*
* @return bool true if the configuration command was processed successfully, false otherwise.
*
* @note This applies to all Orbbec GigE Vision devices
*/
OB_EXPORT bool ob_force_ip_config(const char *macAddress, ob_net_ip_config config, ob_error **error);
/**
* @brief Create a network device object
*
@@ -70,12 +88,14 @@ OB_EXPORT void ob_enable_net_device_enumeration(ob_context *context, bool enable
* @param[in] address IP address of the device
* @param[in] port Port number of the device
* @param[out] error Pointer to an error object that will be populated if an error occurs during device creation
*
* @return Pointer to the created device object
*/
OB_EXPORT ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error);
/**
* @brief Set a device plug-in callback function
*
* @attention The added and removed device lists returned through the callback interface need to be released manually
* @attention This function supports multiple callbacks. Each call to this function adds a new callback to an internal list.
*
@@ -129,12 +149,26 @@ OB_EXPORT void ob_set_logger_severity(ob_log_severity severity, ob_error **error
* @brief Set the log output to a file
*
* @param[in] severity Log level to output to file
* @param[in] directory Path to the log file output directory. If the path is empty, the existing settings will continue to be used (if the existing
* configuration is also empty, the log will not be output to the file)
* @param[in] directory Path to the log file output directory.
* If empty, the existing configuration is used;
* if the existing configuration is also empty,
* the value from the config file or the default configuration will be used.
* @param[out] error Pointer to an error object that will be populated if an error occurs during log output setting
*
* @note Other settings, such as log file name, remain unchanged.
*/
OB_EXPORT void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error);
/**
* @brief Set the log file name for file output
*
* @param[in] file_name Log file name. Must not be empty.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @note Other settings, such as log level and output directory, remain unchanged.
*/
OB_EXPORT void ob_set_logger_file_name(const char *file_name, ob_error **error);
/**
* @brief Set the log callback function
*
@@ -153,14 +187,28 @@ OB_EXPORT void ob_set_logger_to_callback(ob_log_severity severity, ob_log_callba
*/
OB_EXPORT void ob_set_logger_to_console(ob_log_severity severity, ob_error **error);
/**
* @brief Logs a message with severity, file, function, and line info.
*
* @param[in] severity Log level, see @ref ob_log_severity for details
* @param[in] module The module or component the log belongs to
* @param[in] message Message string to log
* @param[in] file Source file name, e.g., __FILE__
* @param[in] func Function name, e.g., __func__
* @param[in] line Line number, e.g., __LINE__
* @param[out] error Pointer to an error object that will be populated if an error occurs during log output setting
*/
OB_EXPORT void ob_log_external_message(ob_log_severity severity, const char *module, const char *message, const char *file, const char *func, int line,
ob_error **error);
/**
* @brief Set the extensions directory
* @brief The extensions directory is used to search for dynamic libraries that provide additional functionality to the SDK, such as the Frame filters.
*
* @attention Should be called before creating the context and pipeline, otherwise the default extensions directory (./extensions) will be used.
*
* @param directory Path to the extensions directory. If the path is empty, extensions path will be set to the current working directory.
* @param error Pointer to an error object that will be populated if an error occurs during extensions directory setting
* @param[in] directory Path to the extensions directory. If the path is empty, extensions path will be set to the current working directory.
* @param[out] error Pointer to an error object that will be populated if an error occurs during extensions directory setting
*/
OB_EXPORT void ob_set_extensions_directory(const char *directory, ob_error **error);
+144 -20
View File
@@ -29,6 +29,7 @@ OB_EXPORT void ob_delete_device(ob_device *device, ob_error **error);
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_sensor_list* The list of all sensors.
*/
OB_EXPORT ob_sensor_list *ob_device_get_sensor_list(const ob_device *device, ob_error **error);
@@ -39,6 +40,7 @@ OB_EXPORT ob_sensor_list *ob_device_get_sensor_list(const ob_device *device, ob_
* @param[in] device The device object.
* @param[in] type The type of sensor to get.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_sensor* The acquired sensor.
*/
OB_EXPORT ob_sensor *ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error);
@@ -59,6 +61,7 @@ OB_EXPORT void ob_device_set_int_property(ob_device *device, ob_property_id prop
* @param[in] device The device object.
* @param[in] property_id The property ID.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int32_t The property value.
*/
OB_EXPORT int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error);
@@ -69,6 +72,7 @@ OB_EXPORT int32_t ob_device_get_int_property(ob_device *device, ob_property_id p
* @param[in] device The device object.
* @param[in] property_id The property id.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The property range.
*/
OB_EXPORT ob_int_property_range ob_device_get_int_property_range(ob_device *device, ob_property_id property_id, ob_error **error);
@@ -89,6 +93,7 @@ OB_EXPORT void ob_device_set_float_property(ob_device *device, ob_property_id pr
* @param[in] device The device object.
* @param[in] property_id The property ID.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return float The property value.
*/
OB_EXPORT float ob_device_get_float_property(ob_device *device, ob_property_id property_id, ob_error **error);
@@ -99,6 +104,7 @@ OB_EXPORT float ob_device_get_float_property(ob_device *device, ob_property_id p
* @param[in] device The device object.
* @param[in] property_id The property id.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The property range.
*/
OB_EXPORT ob_float_property_range ob_device_get_float_property_range(ob_device *device, ob_property_id property_id, ob_error **error);
@@ -119,6 +125,7 @@ OB_EXPORT void ob_device_set_bool_property(ob_device *device, ob_property_id pro
* @param[in] device The device object.
* @param[in] property_id The property ID.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool The property value.
*/
OB_EXPORT bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error);
@@ -129,6 +136,7 @@ OB_EXPORT bool ob_device_get_bool_property(ob_device *device, ob_property_id pro
* @param[in] device The device object.
* @param[in] property_id The property id.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The property range.
*/
OB_EXPORT ob_bool_property_range ob_device_get_bool_property_range(ob_device *device, ob_property_id property_id, ob_error **error);
@@ -191,6 +199,7 @@ OB_EXPORT void ob_device_read_customer_data(ob_device *device, void *data, uint3
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The number of properties supported by the device.
*/
OB_EXPORT uint32_t ob_device_get_supported_property_count(const ob_device *device, ob_error **error);
@@ -201,6 +210,7 @@ OB_EXPORT uint32_t ob_device_get_supported_property_count(const ob_device *devic
* @param[in] device The device object.
* @param[in] index The property index.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The type of property supported by the device.
*/
OB_EXPORT ob_property_item ob_device_get_supported_property_item(const ob_device *device, uint32_t index, ob_error **error);
@@ -212,6 +222,7 @@ OB_EXPORT ob_property_item ob_device_get_supported_property_item(const ob_device
* @param[in] property_id The property id.
* @param[in] permission The type of permission that needs to be interpreted.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return Whether the property permission is supported.
*/
OB_EXPORT bool ob_device_is_property_supported(const ob_device *device, ob_property_id property_id, ob_permission_type permission, ob_error **error);
@@ -221,6 +232,7 @@ OB_EXPORT bool ob_device_is_property_supported(const ob_device *device, ob_prope
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool Whether the device supports global timestamp.
*/
OB_EXPORT bool ob_device_is_global_timestamp_supported(const ob_device *device, ob_error **error);
@@ -228,9 +240,9 @@ OB_EXPORT bool ob_device_is_global_timestamp_supported(const ob_device *device,
/**
* @brief Enable or disable global timestamp.
*
* @param device The device object.
* @param enable Whether to enable global timestamp.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] device The device object.
* @param[in] enable Whether to enable global timestamp.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_enable_global_timestamp(ob_device *device, bool enable, ob_error **error);
@@ -312,7 +324,7 @@ OB_EXPORT void ob_device_set_state_changed_callback(ob_device *device, ob_device
*
* @param[in] device The device object.
* @param[in] enable Whether to enable the device heartbeat.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_enable_heartbeat(ob_device *device, bool enable, ob_error **error);
@@ -326,7 +338,7 @@ OB_EXPORT void ob_device_enable_heartbeat(ob_device *device, bool enable, ob_err
* @param[in] send_data_size The size of the data to be sent to the device.
* @param[out] receive_data The data received from the device.
* @param[in,out] receive_data_size Pass in the expected size of the receive data, and return the actual size of the received data.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_send_and_receive_data(ob_device *device, const uint8_t *send_data, uint32_t send_data_size, uint8_t *receive_data,
uint32_t *receive_data_size, ob_error **error);
@@ -336,6 +348,7 @@ OB_EXPORT void ob_device_send_and_receive_data(ob_device *device, const uint8_t
*
* @param[in] device The device to obtain information from.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device_info* The device information.
*/
OB_EXPORT ob_device_info *ob_device_get_device_info(const ob_device *device, ob_error **error);
@@ -353,6 +366,7 @@ OB_EXPORT void ob_delete_device_info(ob_device_info *info, ob_error **error);
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* return the device name
*/
OB_EXPORT const char *ob_device_info_get_name(const ob_device_info *info, ob_error **error);
@@ -362,6 +376,7 @@ OB_EXPORT const char *ob_device_info_get_name(const ob_device_info *info, ob_err
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int return the device pid
*/
OB_EXPORT int ob_device_info_get_pid(const ob_device_info *info, ob_error **error);
@@ -371,6 +386,7 @@ OB_EXPORT int ob_device_info_get_pid(const ob_device_info *info, ob_error **erro
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int return device vid
*/
OB_EXPORT int ob_device_info_get_vid(const ob_device_info *info, ob_error **error);
@@ -380,6 +396,7 @@ OB_EXPORT int ob_device_info_get_vid(const ob_device_info *info, ob_error **erro
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* return device uid
*/
OB_EXPORT const char *ob_device_info_get_uid(const ob_device_info *info, ob_error **error);
@@ -389,6 +406,7 @@ OB_EXPORT const char *ob_device_info_get_uid(const ob_device_info *info, ob_erro
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* return device serial number
*/
OB_EXPORT const char *ob_device_info_get_serial_number(const ob_device_info *info, ob_error **error);
@@ -398,6 +416,7 @@ OB_EXPORT const char *ob_device_info_get_serial_number(const ob_device_info *inf
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int return the firmware version number
*/
OB_EXPORT const char *ob_device_info_get_firmware_version(const ob_device_info *info, ob_error **error);
@@ -407,6 +426,7 @@ OB_EXPORT const char *ob_device_info_get_firmware_version(const ob_device_info *
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The connection type, currently supports: "USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet"
*/
OB_EXPORT const char *ob_device_info_get_connection_type(const ob_device_info *info, ob_error **error);
@@ -416,17 +436,38 @@ OB_EXPORT const char *ob_device_info_get_connection_type(const ob_device_info *i
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0"
*
* @param info Device Information
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The IP address, such as "192.168.1.10"
*/
OB_EXPORT const char *ob_device_info_get_ip_address(const ob_device_info *info, ob_error **error);
/**
* @brief Get the network device subnet mask
*
* @param[in] info Device information
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return const char* The subnet mask, such as "255.255.255.0"
*/
OB_EXPORT const char *ob_device_info_get_subnet_mask(const ob_device_info *info, ob_error **error);
/**
* @brief Get the network device gateway address
*
* @param[in] info Device information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The gateway address, such as "192.168.1.1"
*/
OB_EXPORT const char *ob_device_info_get_gateway(const ob_device_info *info, ob_error **error);
/**
* @brief Get the hardware version number
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The hardware version number
*/
OB_EXPORT const char *ob_device_info_get_hardware_version(const ob_device_info *info, ob_error **error);
@@ -434,9 +475,10 @@ OB_EXPORT const char *ob_device_info_get_hardware_version(const ob_device_info *
/**
* @brief Check if the device extension information exists.
*
* @param device The device object.
* @param info_key The key of the device extension information.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] device The device object.
* @param[in] info_key The key of the device extension information.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool Whether the device extension information exists.
*/
OB_EXPORT bool ob_device_is_extension_info_exist(const ob_device *device, const char *info_key, ob_error **error);
@@ -448,6 +490,7 @@ OB_EXPORT bool ob_device_is_extension_info_exist(const ob_device *device, const
* @param[in] device The device object.
* @param[in] info_key The key of the device extension information.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The device extension information
*/
OB_EXPORT const char *ob_device_get_extension_info(const ob_device *device, const char *info_key, ob_error **error);
@@ -457,6 +500,7 @@ OB_EXPORT const char *ob_device_get_extension_info(const ob_device *device, cons
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The minimum SDK version number supported by the device
*/
OB_EXPORT const char *ob_device_info_get_supported_min_sdk_version(const ob_device_info *info, ob_error **error);
@@ -466,6 +510,7 @@ OB_EXPORT const char *ob_device_info_get_supported_min_sdk_version(const ob_devi
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The ASIC name
*/
OB_EXPORT const char *ob_device_info_get_asicName(const ob_device_info *info, ob_error **error);
@@ -475,6 +520,7 @@ OB_EXPORT const char *ob_device_info_get_asicName(const ob_device_info *info, ob
*
* @param[in] info Device Information
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device_type The device type
*/
OB_EXPORT ob_device_type ob_device_info_get_device_type(const ob_device_info *info, ob_error **error);
@@ -492,6 +538,7 @@ OB_EXPORT void ob_delete_device_list(ob_device_list *list, ob_error **error);
*
* @param[in] list Device list object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the number of devices
*/
OB_EXPORT uint32_t ob_device_list_get_count(const ob_device_list *list, ob_error **error);
@@ -502,6 +549,7 @@ OB_EXPORT uint32_t ob_device_list_get_count(const ob_device_list *list, ob_error
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* return device name
*/
OB_EXPORT const char *ob_device_list_get_device_name(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -512,6 +560,7 @@ OB_EXPORT const char *ob_device_list_get_device_name(const ob_device_list *list,
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int return the device pid
*/
OB_EXPORT int ob_device_list_get_device_pid(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -522,6 +571,7 @@ OB_EXPORT int ob_device_list_get_device_pid(const ob_device_list *list, uint32_t
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int return device vid
*/
OB_EXPORT int ob_device_list_get_device_vid(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -532,6 +582,7 @@ OB_EXPORT int ob_device_list_get_device_vid(const ob_device_list *list, uint32_t
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* return the device uid
*/
OB_EXPORT const char *ob_device_list_get_device_uid(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -542,6 +593,7 @@ OB_EXPORT const char *ob_device_list_get_device_uid(const ob_device_list *list,
* @param[in] list Device list object.
* @param[in] index Device index.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The device UID.
*/
OB_EXPORT const char *ob_device_list_get_device_serial_number(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -552,6 +604,7 @@ OB_EXPORT const char *ob_device_list_get_device_serial_number(const ob_device_li
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* returns the device connection type, currently supports: "USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2",
* "Ethernet"
*/
@@ -562,25 +615,92 @@ OB_EXPORT const char *ob_device_list_get_device_connection_type(const ob_device_
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0".
*
* @param list Device list object
* @param index Device index
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* returns the device ip address, such as "192.168.1.10"
*/
OB_EXPORT const char *ob_device_list_get_device_ip_address(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get device local mac address
* @brief Get device subnet mask
*
* @attention Only valid for network devices, otherwise it will return "0:0:0:0:0:0".
* @attention Only valid for network devices, otherwise it will return "0.0.0.0".
*
* @param list Device list object
* @param index Device index
* @param error Pointer to an error object that will be set if an error occurs.
* @return const char* returns the device mac address
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* returns the device subnet mask, such as "255.255.255.0"
*/
OB_EXPORT const char *ob_device_list_get_device_subnet_mask(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get device gateway
*
* @attention Only valid for network devices, otherwise it will return "0.0.0.0".
*
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* returns the device gateway, such as "192.168.1.1"
*/
OB_EXPORT const char *ob_device_list_get_device_gateway(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get the MAC address of the host network interface corresponding to the network device.
*
* @attention Only valid for network devices. Returns "0:0:0:0:0:0" for non-network devices.
*
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The MAC address of the host network interface associated with the device.
*/
OB_EXPORT const char *ob_device_list_get_device_local_mac(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get the IP address of the host network interface corresponding to the network device.
*
* @attention Only valid for network devices. Returns "0.0.0.0" for non-network devices.
*
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The IP address of the host network interface associated with the device.
*/
OB_EXPORT const char *ob_device_list_get_device_local_ip(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get the subnet length of the host network interface corresponding to the network device.
*
* @attention Only valid for network devices. Returns 0 for non-network devices.
*
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const uint8_t The subnet length (0~32) of the host network interface associated with the device.
*/
OB_EXPORT uint8_t ob_device_list_get_device_local_subnet_length(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Get the gateway of the host network interface corresponding to the network device.
*
* @attention Only valid for network devices. Returns "0.0.0.0" for non-network devices.
*
* @param[in] list Device list object
* @param[in] index Device index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The gateway of the host network interface associated with the device.
*/
OB_EXPORT const char *ob_device_list_get_device_local_gateway(const ob_device_list *list, uint32_t index, ob_error **error);
/**
* @brief Create a device.
*
@@ -589,6 +709,7 @@ OB_EXPORT const char *ob_device_list_get_device_local_mac(const ob_device_list *
* @param[in] list Device list object.
* @param[in] index The index of the device to create.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device* The created device.
*
*/
@@ -602,6 +723,7 @@ OB_EXPORT ob_device *ob_device_list_get_device(const ob_device_list *list, uint3
* @param[in] list Device list object.
* @param[in] serial_number The serial number of the device to create.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device* The created device.
*/
OB_EXPORT ob_device *ob_device_list_get_device_by_serial_number(const ob_device_list *list, const char *serial_number, ob_error **error);
@@ -618,6 +740,7 @@ OB_EXPORT ob_device *ob_device_list_get_device_by_serial_number(const ob_device_
* @param[in] list Device list object.
* @param[in] uid The UID of the device to create.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device* The created device.
*/
OB_EXPORT ob_device *ob_device_list_get_device_by_uid(const ob_device_list *list, const char *uid, ob_error **error);
@@ -641,6 +764,7 @@ OB_EXPORT ob_camera_param_list *ob_device_get_calibration_camera_param_list(ob_d
*
* @param[in] param_list Camera parameter list
* @param[out] error Log error messages
*
* @return uint32_t The number of lists
*/
OB_EXPORT uint32_t ob_camera_param_list_get_count(ob_camera_param_list *param_list, ob_error **error);
@@ -651,6 +775,7 @@ OB_EXPORT uint32_t ob_camera_param_list_get_count(ob_camera_param_list *param_li
* @param[in] param_list Camera parameter list
* @param[in] index Parameter index
* @param[out] error Log error messages
*
* @return ob_camera_param The camera parameters. Since it returns the structure object directly, there is no need to provide a delete interface.
*/
OB_EXPORT ob_camera_param ob_camera_param_list_get_param(ob_camera_param_list *param_list, uint32_t index, ob_error **error);
@@ -688,4 +813,3 @@ OB_EXPORT void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_
#ifdef __cplusplus
}
#endif
@@ -16,11 +16,12 @@ extern "C" {
/**
* @brief Create a new error object.
*
* @param status The error status.
* @param message The error message.
* @param function The name of the API function that caused the error.
* @param args The error parameters.
* @param exception_type The type of exception that caused the error.
* @param[in] status The error status.
* @param[in] message The error message.
* @param[in] function The name of the API function that caused the error.
* @param[in] args The error parameters.
* @param[in] exception_type The type of exception that caused the error.
*
* @return ob_error* The new error object.
*/
OB_EXPORT ob_error *ob_create_error(ob_status status, const char *message, const char *function, const char *args, ob_exception_type exception_type);
@@ -18,16 +18,17 @@ extern "C" {
*
* @attention If the filter of the specified name is a private filter, and the creator of the filter have not been activated, the function will return NULL.
*
* @param name The name of the filter.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] name The name of the filter.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT ob_filter *ob_create_filter(const char *name, ob_error **error);
/**
* @brief Get the name of ob_filter
*
* @param filter ob_filter object
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] filter ob_filter object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return char The filter of name
*/
OB_EXPORT const char *ob_filter_get_name(const ob_filter *filter, ob_error **error);
@@ -36,8 +37,9 @@ OB_EXPORT const char *ob_filter_get_name(const ob_filter *filter, ob_error **err
* @brief Get the vendor specific code of a filter by filter name.
* @brief A private filter can define its own vendor specific code for specific purposes.
*
* @param name The name of the filter.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] name The name of the filter.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* Return the vendor specific code of the filter.
*/
OB_EXPORT const char *ob_filter_get_vendor_specific_code(const char *name, ob_error **error);
@@ -46,9 +48,9 @@ OB_EXPORT const char *ob_filter_get_vendor_specific_code(const char *name, ob_er
* @brief Create a private Filter object with activation key.
* @brief Some private filters require an activation key to be activated, its depends on the vendor of the filter.
*
* @param name The name of the filter.
* @param activation_key The activation key of the filter.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] name The name of the filter.
* @param[in] activation_key The activation key of the filter.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_filter* Return the private filter object.
*/
@@ -65,7 +67,8 @@ OB_EXPORT void ob_delete_filter(ob_filter *filter, ob_error **error);
/**
* @brief Get config schema of the filter
* @brief The returned string is a csv format string representing the configuration schema of the filter. The format of the string is:
* <parameter_name>, <parameter_type: "int", "float", "bool">, <minimum_value>, <maximum_value>, <value_step>, <default_value>, <parameter_description>
* `<parameter_name>`, `<parameter_type: "int", "float", "bool">`, `<minimum_value>`, `<maximum_value>`, `<value_step>`, `<default_value>`,
* `<parameter_description>`
*
* @param[in] filter The filter object to get the configuration schema for
* @param[out] error Pointer to an error object that will be set if an error occurs
@@ -80,8 +83,9 @@ OB_EXPORT const char *ob_filter_get_config_schema(const ob_filter *filter, ob_er
*
* @attention The returned list should be deleted by calling @ref ob_delete_filter_config_schema_list when it is no longer needed.
*
* @param filter The filter object to get the configuration schema for
* @param error Pointer to an error object that will be set if an error occurs
* @param[in] filter The filter object to get the configuration schema for
* @param[out] error Pointer to an error object that will be set if an error occurs
*
* @return ob_filter_config_schema_list* Return the filter config schema list of the filter
*/
OB_EXPORT ob_filter_config_schema_list *ob_filter_get_config_schema_list(const ob_filter *filter, ob_error **error);
@@ -89,8 +93,8 @@ OB_EXPORT ob_filter_config_schema_list *ob_filter_get_config_schema_list(const o
/**
* @brief Delete a list of filter config schema items.
*
* @param config_schema_list The list of filter config schema items to delete.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] config_schema_list The list of filter config schema items to delete.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_delete_filter_config_schema_list(ob_filter_config_schema_list *config_schema_list, ob_error **error);
@@ -115,6 +119,7 @@ OB_EXPORT void ob_filter_update_config(ob_filter *filter, uint8_t argc, const ch
* @param[in] filter A filter object.
* @param[in] config_name config name
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return double The value of the config.
*/
OB_EXPORT double ob_filter_get_config_value(const ob_filter *filter, const char *config_name, ob_error **error);
@@ -203,6 +208,7 @@ OB_EXPORT void ob_filter_push_frame(ob_filter *filter, const ob_frame *frame, ob
*
* @param[in] filter_list filter list
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t The number of list
*/
OB_EXPORT uint32_t ob_filter_list_get_count(const ob_filter_list *filter_list, ob_error **error);
@@ -213,6 +219,7 @@ OB_EXPORT uint32_t ob_filter_list_get_count(const ob_filter_list *filter_list, o
* @param[in] filter_list Filter list
* @param[in] index Filter index
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_filter The index of ob_filter
*/
OB_EXPORT ob_filter *ob_filter_list_get_filter(const ob_filter_list *filter_list, uint32_t index, ob_error **error);
@@ -228,8 +235,9 @@ OB_EXPORT void ob_delete_filter_list(ob_filter_list *filter_list, ob_error **err
/**
* @brief Get the number of config schema items in the config schema list
*
* @param config_schema_list Filter config schema list
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] config_schema_list Filter config schema list
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t The number of config schema items in the filter list
*/
OB_EXPORT uint32_t ob_filter_config_schema_list_get_count(const ob_filter_config_schema_list *config_schema_list, ob_error **error);
@@ -237,9 +245,9 @@ OB_EXPORT uint32_t ob_filter_config_schema_list_get_count(const ob_filter_config
/**
* @brief Get the config schema item by index
*
* @param config_schema_list Filter config schema list
* @param index Config schema item index
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] config_schema_list Filter config schema list
* @param[in] index Config schema item index
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return ob_filter_config_schema_item* The config schema item by index
*/
OB_EXPORT ob_filter_config_schema_item ob_filter_config_schema_list_get_item(const ob_filter_config_schema_list *config_schema_list, uint32_t index,
@@ -247,11 +255,11 @@ OB_EXPORT ob_filter_config_schema_item ob_filter_config_schema_list_get_item(con
/**
* @brief Set the align to stream profile for the align filter.
* @breif It is useful when the align target stream dose not started (without any frame to get intrinsics and extrinsics).
* @brief It is useful when the align target stream dose not started (without any frame to get intrinsics and extrinsics).
*
* @param filter A filter object.
* @param align_to_stream_profile The align target stream profile.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] filter A filter object.
* @param[in] align_to_stream_profile The align target stream profile.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_align_filter_set_align_to_stream_profile(ob_filter *filter, const ob_stream_profile *align_to_stream_profile, ob_error **error);
+58 -29
View File
@@ -20,10 +20,11 @@ extern "C" {
* @attention The frame object is created with a reference count of 1, and the reference count should be decreased by calling @ref ob_delete_frame() when it is
* no longer needed.
*
* @param frame_type The frame object type.
* @param format The frame object format.
* @param data_size The size of the frame object data.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] frame_type The frame object type.
* @param[in] format The frame object format.
* @param[in] data_size The size of the frame object data.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the frame object.
*/
OB_EXPORT ob_frame *ob_create_frame(ob_frame_type frame_type, ob_format format, uint32_t data_size, ob_error **error);
@@ -39,6 +40,7 @@ OB_EXPORT ob_frame *ob_create_frame(ob_frame_type frame_type, ob_format format,
* @param[in] should_copy_data If true, the data of the source frame object will be copied to the new frame object. If false, the new frame object will
* have a data buffer with random data.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the new frame object.
*/
OB_EXPORT ob_frame *ob_create_frame_from_other_frame(const ob_frame *other_frame, bool should_copy_data, ob_error **error);
@@ -49,8 +51,9 @@ OB_EXPORT ob_frame *ob_create_frame_from_other_frame(const ob_frame *other_frame
* @attention The frame object is created with a reference count of 1, and the reference count should be decreased by calling @ref ob_delete_frame() when it is
* no logger needed.
*
* @param stream_profile The stream profile to create the new frame object according to.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] stream_profile The stream profile to create the new frame object according to.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the new frame object.
*/
OB_EXPORT ob_frame *ob_create_frame_from_stream_profile(const ob_stream_profile *stream_profile, ob_error **error);
@@ -67,6 +70,7 @@ OB_EXPORT ob_frame *ob_create_frame_from_stream_profile(const ob_stream_profile
* @param[in] height Frame object height.
* @param[in] stride_bytes Row span in bytes. If 0, the stride is calculated based on the width and format.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return an empty frame object.
*/
OB_EXPORT ob_frame *ob_create_video_frame(ob_frame_type frame_type, ob_format format, uint32_t width, uint32_t height, uint32_t stride_bytes, ob_error **error);
@@ -85,6 +89,7 @@ OB_EXPORT ob_frame *ob_create_video_frame(ob_frame_type frame_type, ob_format fo
* @param[in] buffer_destroy_cb Destroy callback, will be called when the frame object is destroyed.
* @param[in] buffer_destroy_context Destroy context, user-defined context to be passed to the destroy callback.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the frame object.
*/
OB_EXPORT ob_frame *ob_create_frame_from_buffer(ob_frame_type frame_type, ob_format format, uint8_t *buffer, uint32_t buffer_size,
@@ -107,6 +112,7 @@ OB_EXPORT ob_frame *ob_create_frame_from_buffer(ob_frame_type frame_type, ob_for
* @param[in] buffer_destroy_cb Destroy callback, user-defined function to destroy the buffer.
* @param[in] buffer_destroy_context Destroy context, user-defined context to be passed to the destroy callback.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the frame object.
*/
OB_EXPORT ob_frame *ob_create_video_frame_from_buffer(ob_frame_type frame_type, ob_format format, uint32_t width, uint32_t height, uint32_t stride_bytes,
@@ -161,6 +167,7 @@ OB_EXPORT void ob_frame_copy_info(const ob_frame *src_frame, ob_frame *dst_frame
*
* @param[in] frame Frame object
* @param[out] error Log wrong message
*
* @return uint64_t return the frame index
*/
OB_EXPORT uint64_t ob_frame_get_index(const ob_frame *frame, ob_error **error);
@@ -170,6 +177,7 @@ OB_EXPORT uint64_t ob_frame_get_index(const ob_frame *frame, ob_error **error);
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_format return the frame format
*/
OB_EXPORT ob_format ob_frame_get_format(const ob_frame *frame, ob_error **error);
@@ -179,6 +187,7 @@ OB_EXPORT ob_format ob_frame_get_format(const ob_frame *frame, ob_error **error)
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame_type return the frame type
*/
OB_EXPORT ob_frame_type ob_frame_get_type(const ob_frame *frame, ob_error **error);
@@ -190,6 +199,7 @@ OB_EXPORT ob_frame_type ob_frame_get_type(const ob_frame *frame, ob_error **erro
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint64_t return the frame hardware timestamp in microseconds
*/
OB_EXPORT uint64_t ob_frame_get_timestamp_us(const ob_frame *frame, ob_error **error);
@@ -209,6 +219,7 @@ OB_EXPORT void ob_frame_set_timestamp_us(ob_frame *frame, uint64_t timestamp_us,
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint64_t return the frame system timestamp in microseconds
*/
OB_EXPORT uint64_t ob_frame_get_system_timestamp_us(const ob_frame *frame, ob_error **error);
@@ -216,9 +227,9 @@ OB_EXPORT uint64_t ob_frame_get_system_timestamp_us(const ob_frame *frame, ob_er
/**
* @brief Set the system timestamp of the frame in microseconds.
*
* @param frame Frame object
* @param system_timestamp_us frame system timestamp to set in microseconds.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] frame Frame object
* @param[in] system_timestamp_us frame system timestamp to set in microseconds.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_frame_set_system_timestamp_us(ob_frame *frame, uint64_t system_timestamp_us, ob_error **error);
@@ -234,6 +245,7 @@ OB_EXPORT void ob_frame_set_system_timestamp_us(ob_frame *frame, uint64_t system
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint64_t The global timestamp of the frame in microseconds.
*/
OB_EXPORT uint64_t ob_frame_get_global_timestamp_us(const ob_frame *frame, ob_error **error);
@@ -246,6 +258,7 @@ OB_EXPORT uint64_t ob_frame_get_global_timestamp_us(const ob_frame *frame, ob_er
*
* @param[in] frame The frame object from which to retrieve the data.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint8_t* Pointer to the frame data buffer.
*/
OB_EXPORT uint8_t *ob_frame_get_data(const ob_frame *frame, ob_error **error);
@@ -272,6 +285,7 @@ OB_EXPORT void ob_frame_update_data(ob_frame *frame, const uint8_t *data, uint32
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the frame data size
* If it is point cloud data, it return the number of bytes occupied by all point sets. If you need to find the number of points, you need to divide dataSize
* by the structure size of the corresponding point type.
@@ -286,6 +300,7 @@ OB_EXPORT uint32_t ob_frame_get_data_size(const ob_frame *frame, ob_error **erro
*
* @param[in] frame frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const uint8_t * return the metadata pointer of the frame
*/
OB_EXPORT uint8_t *ob_frame_get_metadata(const ob_frame *frame, ob_error **error);
@@ -296,6 +311,7 @@ OB_EXPORT uint8_t *ob_frame_get_metadata(const ob_frame *frame, ob_error **error
*
* @param[in] frame frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the metadata size of the frame
*/
OB_EXPORT uint32_t ob_frame_get_metadata_size(const ob_frame *frame, ob_error **error);
@@ -332,6 +348,7 @@ OB_EXPORT bool ob_frame_has_metadata(const ob_frame *frame, ob_frame_metadata_ty
* @param[in] frame frame object
* @param[in] type metadata type, refer to @ref ob_frame_metadata_type
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return int64_t return the metadata value of the frame
*/
OB_EXPORT int64_t ob_frame_get_metadata_value(const ob_frame *frame, ob_frame_metadata_type type, ob_error **error);
@@ -341,8 +358,8 @@ OB_EXPORT int64_t ob_frame_get_metadata_value(const ob_frame *frame, ob_frame_me
*
* @attention Require @ref ob_delete_stream_profile() to release the return stream profile.
*
* @param frame frame object
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] frame frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return ob_stream_profile* Return the stream profile of the frame, if the frame is not captured by a sensor stream, it will return NULL
*/
OB_EXPORT ob_stream_profile *ob_frame_get_stream_profile(const ob_frame *frame, ob_error **error);
@@ -350,9 +367,9 @@ OB_EXPORT ob_stream_profile *ob_frame_get_stream_profile(const ob_frame *frame,
/**
* @brief Set (override) the stream profile of the frame
*
* @param frame frame object
* @param stream_profile The stream profile to set for the frame.
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] frame frame object
* @param[in] stream_profile The stream profile to set for the frame.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_frame_set_stream_profile(ob_frame *frame, const ob_stream_profile *stream_profile, ob_error **error);
@@ -363,6 +380,7 @@ OB_EXPORT void ob_frame_set_stream_profile(ob_frame *frame, const ob_stream_prof
*
* @param[in] frame frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_sensor* return the sensor of the frame, if the frame is not captured by a sensor or the sensor stream has been destroyed, it will return NULL
*/
OB_EXPORT ob_sensor *ob_frame_get_sensor(const ob_frame *frame, ob_error **error);
@@ -372,8 +390,9 @@ OB_EXPORT ob_sensor *ob_frame_get_sensor(const ob_frame *frame, ob_error **error
*
* @attention Require @ref ob_delete_device() to release the return device.
*
* @param frame frame object
* @param[in] frame frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device* return the device of the frame, if the frame is not captured by a sensor stream or the device has been destroyed, it will return NULL
*/
OB_EXPORT ob_device *ob_frame_get_device(const ob_frame *frame, ob_error **error);
@@ -383,6 +402,7 @@ OB_EXPORT ob_device *ob_frame_get_device(const ob_frame *frame, ob_error **error
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the frame width
*/
OB_EXPORT uint32_t ob_video_frame_get_width(const ob_frame *frame, ob_error **error);
@@ -392,6 +412,7 @@ OB_EXPORT uint32_t ob_video_frame_get_width(const ob_frame *frame, ob_error **er
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the frame height
*/
OB_EXPORT uint32_t ob_video_frame_get_height(const ob_frame *frame, ob_error **error);
@@ -402,8 +423,9 @@ OB_EXPORT uint32_t ob_video_frame_get_height(const ob_frame *frame, ob_error **e
*
* @attention Always return OB_PIXEL_UNKNOWN for non-depth frame currently if user has not set the pixel type by @ref ob_video_frame_set_pixel_type()
*
* @param frame Frame object
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_pixel_type return the pixel format of the frame.
*/
OB_EXPORT ob_pixel_type ob_video_frame_get_pixel_type(const ob_frame *frame, ob_error **error);
@@ -411,9 +433,9 @@ OB_EXPORT ob_pixel_type ob_video_frame_get_pixel_type(const ob_frame *frame, ob_
/**
* @brief Set video frame pixel format
*
* @param frame Frame object
* @param pixel_type the pixel format of the frame
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] frame Frame object
* @param[in] pixel_type the pixel format of the frame
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_video_frame_set_pixel_type(ob_frame *frame, ob_pixel_type pixel_type, ob_error **error);
@@ -423,6 +445,7 @@ OB_EXPORT void ob_video_frame_set_pixel_type(ob_frame *frame, ob_pixel_type pixe
*
* @param[in] frame video frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint8_t return the effective number of pixels in the pixel, or 0 if it is an unsupported format
*/
OB_EXPORT uint8_t ob_video_frame_get_pixel_available_bit_size(const ob_frame *frame, ob_error **error);
@@ -437,21 +460,13 @@ OB_EXPORT uint8_t ob_video_frame_get_pixel_available_bit_size(const ob_frame *fr
*/
OB_EXPORT void ob_video_frame_set_pixel_available_bit_size(ob_frame *frame, uint8_t bit_size, ob_error **error);
/**
* @brief Get the source sensor type of the ir frame (left or right for dual camera)
*
* @param frame Frame object
* @param ob_error Pointer to an error object that will be set if an error occurs.
* @return ob_sensor_type return the source sensor type of the ir frame
*/
OB_EXPORT ob_sensor_type ob_ir_frame_get_source_sensor_type(const ob_frame *frame, ob_error **ob_error);
/**
* @brief Get the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters.
* For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm.
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return float The value scale of the depth frame
*/
OB_EXPORT float ob_depth_frame_get_value_scale(const ob_frame *frame, ob_error **error);
@@ -473,6 +488,7 @@ OB_EXPORT void ob_depth_frame_set_value_scale(ob_frame *frame, float value_scale
*
* @param[in] frame Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return float The coordinate value scale of the points frame
*/
OB_EXPORT float ob_points_frame_get_coordinate_value_scale(const ob_frame *frame, ob_error **error);
@@ -482,6 +498,7 @@ OB_EXPORT float ob_points_frame_get_coordinate_value_scale(const ob_frame *frame
*
* @param[in] frame Accelerometer frame.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_accel_value Return the accelerometer data.
*/
OB_EXPORT ob_accel_value ob_accel_frame_get_value(const ob_frame *frame, ob_error **error);
@@ -491,6 +508,7 @@ OB_EXPORT ob_accel_value ob_accel_frame_get_value(const ob_frame *frame, ob_erro
*
* @param[in] frame Accelerometer frame.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return float Return the temperature value.
*/
OB_EXPORT float ob_accel_frame_get_temperature(const ob_frame *frame, ob_error **error);
@@ -500,6 +518,7 @@ OB_EXPORT float ob_accel_frame_get_temperature(const ob_frame *frame, ob_error *
*
* @param[in] frame Gyroscope frame.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_gyro_value Return the gyroscope data.
*/
OB_EXPORT ob_gyro_value ob_gyro_frame_get_value(const ob_frame *frame, ob_error **error);
@@ -509,6 +528,7 @@ OB_EXPORT ob_gyro_value ob_gyro_frame_get_value(const ob_frame *frame, ob_error
*
* @param[in] frame Gyroscope frame.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return float Return the temperature value.
*/
OB_EXPORT float ob_gyro_frame_get_temperature(const ob_frame *frame, ob_error **error);
@@ -520,6 +540,7 @@ OB_EXPORT float ob_gyro_frame_get_temperature(const ob_frame *frame, ob_error **
*
* @param[in] frameset frameset object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the number of frames
*/
OB_EXPORT uint32_t ob_frameset_get_count(const ob_frame *frameset, ob_error **error);
@@ -531,6 +552,7 @@ OB_EXPORT uint32_t ob_frameset_get_count(const ob_frame *frameset, ob_error **er
*
* @param[in] frameset Frameset object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the depth frame.
*/
OB_EXPORT ob_frame *ob_frameset_get_depth_frame(const ob_frame *frameset, ob_error **error);
@@ -542,6 +564,7 @@ OB_EXPORT ob_frame *ob_frameset_get_depth_frame(const ob_frame *frameset, ob_err
*
* @param[in] frameset Frameset object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the color frame.
*/
OB_EXPORT ob_frame *ob_frameset_get_color_frame(const ob_frame *frameset, ob_error **error);
@@ -553,6 +576,7 @@ OB_EXPORT ob_frame *ob_frameset_get_color_frame(const ob_frame *frameset, ob_err
*
* @param[in] frameset Frameset object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the infrared frame.
*/
OB_EXPORT ob_frame *ob_frameset_get_ir_frame(const ob_frame *frameset, ob_error **error);
@@ -564,6 +588,7 @@ OB_EXPORT ob_frame *ob_frameset_get_ir_frame(const ob_frame *frameset, ob_error
*
* @param[in] frameset Frameset object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the point cloud frame.
*/
OB_EXPORT ob_frame *ob_frameset_get_points_frame(const ob_frame *frameset, ob_error **error);
@@ -576,6 +601,7 @@ OB_EXPORT ob_frame *ob_frameset_get_points_frame(const ob_frame *frameset, ob_er
* @param[in] frameset Frameset object.
* @param[in] frame_type Frame type.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the frame of the specified type, or nullptr if it does not exist.
*/
OB_EXPORT ob_frame *ob_frameset_get_frame(const ob_frame *frameset, ob_frame_type frame_type, ob_error **error);
@@ -586,6 +612,7 @@ OB_EXPORT ob_frame *ob_frameset_get_frame(const ob_frame *frameset, ob_frame_typ
* @param[in] frameset Frameset object.
* @param[in] index The index of the frame.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* Return the frame at the specified index, or nullptr if it does not exist.
*/
OB_EXPORT ob_frame *ob_frameset_get_frame_by_index(const ob_frame *frameset, uint32_t index, ob_error **error);
@@ -608,6 +635,7 @@ OB_EXPORT void ob_frameset_push_frame(ob_frame *frameset, const ob_frame *frame,
*
* @param[in] frame point cloud Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the point cloud frame width
*/
OB_EXPORT uint32_t ob_point_cloud_frame_get_width(const ob_frame *frame, ob_error **error);
@@ -617,6 +645,7 @@ OB_EXPORT uint32_t ob_point_cloud_frame_get_width(const ob_frame *frame, ob_erro
*
* @param[in] frame point cloud Frame object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the point cloud frame height
*/
OB_EXPORT uint32_t ob_point_cloud_frame_get_height(const ob_frame *frame, ob_error **error);
@@ -34,6 +34,7 @@ extern "C" {
* ```
* @param[in] device The device handle.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint16_t return the supported multi device sync mode bitmap of the device.
*/
OB_EXPORT uint16_t ob_device_get_supported_multi_device_sync_mode_bitmap(const ob_device *device, ob_error **error);
@@ -52,6 +53,7 @@ OB_EXPORT void ob_device_set_multi_device_sync_config(ob_device *device, const o
*
* @param[in] device The device handle.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_multi_device_sync_config return the multi device sync configuration of the device.
*/
OB_EXPORT ob_multi_device_sync_config ob_device_get_multi_device_sync_config(const ob_device *device, ob_error **error);
@@ -61,7 +63,7 @@ OB_EXPORT ob_multi_device_sync_config ob_device_get_multi_device_sync_config(con
* @brief The device will start one time capture after receiving the capture command when it is in the @ref OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING
*
* @attention The frequency of the user call this function multiplied by the number of frames per trigger should be less than the frame rate of the stream. The
* number of frames per trigger can be set by @ref framesPerTrigger.
* number of frames per trigger can be set by @ref ob_multi_device_sync_config::framesPerTrigger.
* @attention For some models, receive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling this
* function should not be too high, please refer to the product manual for the specific supported frequency.
* @attention If the device is not in the @ref OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING mode, device will ignore the capture command.
@@ -85,6 +87,7 @@ OB_EXPORT void ob_device_set_timestamp_reset_config(ob_device *device, const ob_
*
* @param[in] device The device handle.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device_timestamp_reset_config return the timestamp reset configuration of the device.
*/
OB_EXPORT ob_device_timestamp_reset_config ob_device_get_timestamp_reset_config(ob_device *device, ob_error **error);
@@ -19,26 +19,26 @@
extern "C" {
#endif
typedef struct ob_context_t ob_context;
typedef struct ob_device_t ob_device;
typedef struct ob_device_info_t ob_device_info;
typedef struct ob_device_list_t ob_device_list;
typedef struct ob_record_device_t ob_record_device;
typedef struct ob_playback_device_t ob_playback_device;
typedef struct ob_camera_param_list_t ob_camera_param_list;
typedef struct ob_sensor_t ob_sensor;
typedef struct ob_sensor_list_t ob_sensor_list;
typedef struct ob_stream_profile_t ob_stream_profile;
typedef struct ob_stream_profile_list_t ob_stream_profile_list;
typedef struct ob_frame_t ob_frame;
typedef struct ob_filter_t ob_filter;
typedef struct ob_filter_list_t ob_filter_list;
typedef struct ob_pipeline_t ob_pipeline;
typedef struct ob_config_t ob_config;
typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
typedef struct ob_device_preset_list_t ob_device_preset_list;
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list;
typedef struct ob_context_t ob_context;
typedef struct ob_device_t ob_device;
typedef struct ob_device_info_t ob_device_info;
typedef struct ob_device_list_t ob_device_list;
typedef struct ob_record_device_t ob_record_device;
typedef struct ob_playback_device_t ob_playback_device;
typedef struct ob_camera_param_list_t ob_camera_param_list;
typedef struct ob_sensor_t ob_sensor;
typedef struct ob_sensor_list_t ob_sensor_list;
typedef struct ob_stream_profile_t ob_stream_profile;
typedef struct ob_stream_profile_list_t ob_stream_profile_list;
typedef struct ob_frame_t ob_frame;
typedef struct ob_filter_t ob_filter;
typedef struct ob_filter_list_t ob_filter_list;
typedef struct ob_pipeline_t ob_pipeline;
typedef struct ob_config_t ob_config;
typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
typedef struct ob_device_preset_list_t ob_device_preset_list;
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list;
typedef struct ob_preset_resolution_config_list_t ob_preset_resolution_config_list;
#define OB_WIDTH_ANY 0
@@ -237,7 +237,7 @@ typedef enum {
OB_FORMAT_RW16 = 33, /**< RAW16 format */
OB_FORMAT_Y12C4 = 34, /**< Y12C4 format */
OB_FORMAT_LIDAR_POINT = 35, /**< XYZ 3D coordinate point format with LiDAR information, @ref OBLiDARPoint */
OB_FORMAT_LIDAR_SPHERE_POINT = 36, /**< XYZ 3D coordinate point format with LiDAR information, @ref OBLiDARSpherePoint */
OB_FORMAT_LIDAR_SPHERE_POINT = 36, /**< Spherical coordinate point format with LiDAR information, @ref OBLiDARSpherePoint */
OB_FORMAT_LIDAR_SCAN = 37, /**< LiDAR single-line scan mode data format, @ref OBLiDARScanPoint */
OB_FORMAT_LIDAR_CALIBRATION = 38, /**< LiDAR calibration mode point format */
} OBFormat,
@@ -277,6 +277,8 @@ typedef enum {
ERR_MISMATCH = -9, /**< Mismatch firmware error */
ERR_UNSUPPORT_DEV = -10, /**< Unsupported device error */
ERR_INVALID_COUNT = -11, /**< invalid firmware/preset count */
ERR_FILE_READ = -12, /**< Read image file error */
ERR_TRANSFER = -13 /**< Transfer failed */
} OBUpgradeState,
OBFwUpdateState, ob_upgrade_state, ob_fw_update_state;
@@ -837,7 +839,7 @@ typedef struct {
float x; ///< X coordinate, unit mm
float y; ///< Y coordinate, unit mm
float z; ///< Z coordinate, unit mm
uint8_t intensity; ///< intensity
uint8_t reflectivity; ///< reflectivity
uint8_t tag; ///< point state
} OBLiDARPoint, ob_lidar_point;
@@ -848,7 +850,7 @@ typedef struct {
float distance; ///< distance, unit: mm
float theta; ///< azimuth angle, unit: degrees
float phi; ///< zenith angle, unit: degrees
uint8_t intensity; ///< intensity
uint8_t reflectivity; ///< reflectivity
uint8_t tag; ///< tag
} OBLiDARSpherePoint, ob_lidar_sphere_point;
@@ -1064,6 +1066,16 @@ typedef enum {
} OBHoleFillingMode,
ob_hole_filling_mode;
typedef struct {
uint8_t radius; // window_size
} OBSpatialFastFilterParams, ob_spatial_fast_filter_params;
typedef struct {
uint8_t radius; // window_size
uint8_t magnitude; // magnitude
uint16_t disp_diff; // smooth_delta
} OBSpatialModerateFilterParams, ob_spatial_moderate_filter_params;
typedef struct {
uint8_t magnitude; // magnitude
float alpha; // smooth_alpha
@@ -1297,8 +1309,8 @@ typedef enum {
* @brief primary mode
* @brief The device is the primary device in the multi-device system, it will output the trigger signal via VSYNC_OUT pin on synchronization port by
* default.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref
* OBMultiDeviceSyncConfig::colorDelayUs, @ref OBMultiDeviceSyncConfig::depthDelayUs or @ref OBMultiDeviceSyncConfig::trigger2ImageDelayUs.
*/
OB_MULTI_DEVICE_SYNC_MODE_PRIMARY = 1 << 2,
@@ -1306,8 +1318,8 @@ typedef enum {
* @brief secondary mode
* @brief The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It
* will out the trigger signal via VSYNC_OUT pin on synchronization port by default.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref
* OBMultiDeviceSyncConfig::colorDelayUs, @ref OBMultiDeviceSyncConfig::depthDelayUs or @ref OBMultiDeviceSyncConfig::trigger2ImageDelayUs.
* @brief After starting the stream, the device will wait for the trigger signal to start capturing images, and will stop capturing images when the trigger
* signal is stopped.
*
@@ -1319,8 +1331,8 @@ typedef enum {
* @brief secondary synced mode
* @brief The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It
* will out the trigger signal via VSYNC_OUT pin on synchronization port by default.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref
* OBMultiDeviceSyncConfig::colorDelayUs, @ref OBMultiDeviceSyncConfig::depthDelayUs or @ref OBMultiDeviceSyncConfig::trigger2ImageDelayUs.
* @brief After starting the stream, the device will be immediately start capturing images, and will adjust the capture time when the trigger signal is
* received to synchronize with the primary device. If the trigger signal is stopped, the device will still capture images.
*
@@ -1332,9 +1344,9 @@ typedef enum {
* @brief software triggering mode
* @brief The device will start one time image capture after receiving the capture command and will output the trigger signal via VSYNC_OUT pin by default.
* The capture command can be sent form host by call @ref ob_device_trigger_capture. The number of images captured each time can be set by @ref
* framesPerTrigger.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* OBMultiDeviceSyncConfig::framesPerTrigger.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref
* OBMultiDeviceSyncConfig::colorDelayUs, @ref OBMultiDeviceSyncConfig::depthDelayUs or @ref OBMultiDeviceSyncConfig::trigger2ImageDelayUs.
*
* @brief The frequency of the user call @ref ob_device_trigger_capture to send the capture command multiplied by the number of frames per trigger should be
* less than the frame rate of the stream profile which is set when starting the stream.
@@ -1344,9 +1356,9 @@ typedef enum {
/**
* @brief hardware triggering mode
* @brief The device will start one time image capture after receiving the trigger signal via VSYNC_IN pin on synchronization port and will output the
* trigger signal via VSYNC_OUT pin by default. The number of images captured each time can be set by @ref framesPerTrigger.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref colorDelayUs, @ref
* depthDelayUs or @ref trigger2ImageDelayUs.
* trigger signal via VSYNC_OUT pin by default. The number of images captured each time can be set by @ref OBMultiDeviceSyncConfig::framesPerTrigger.
* @brief The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by @ref
* OBMultiDeviceSyncConfig::colorDelayUs, @ref OBMultiDeviceSyncConfig::depthDelayUs or @ref OBMultiDeviceSyncConfig::trigger2ImageDelayUs.
*
* @attention The frequency of the trigger signal multiplied by the number of frames per trigger should be less than the frame rate of the stream profile
* which is set when starting the stream.
@@ -1511,13 +1523,13 @@ typedef enum {
* @brief Configuration Item for the filter
*/
typedef struct {
const char *name; ///< Name of the configuration item
const char * name; ///< Name of the configuration item
OBFilterConfigValueType type; ///< Value type of the configuration item
double min; ///< Minimum value casted to double
double max; ///< Maximum value casted to double
double step; ///< Step value casted to double
double def; ///< Default value casted to double
const char *desc; ///< Description of the configuration item
const char * desc; ///< Description of the configuration item
} OBFilterConfigSchemaItem, ob_filter_config_schema_item;
/**
@@ -1780,6 +1792,16 @@ typedef enum {
} ob_playback_status,
OBPlaybackStatus;
/**
* @brief Intra-camera Sync Reference based on the exposure start time, the exposure middle time, or the exposure end time.
*/
typedef enum {
START_OF_EXPOSURE = 0, /**< start of exposure */
MIDDLE_OF_EXPOSURE, /**< middle of exposure */
END_OF_EXPOSURE, /**< end of exposure */
} ob_intra_camera_sync_reference,
OBIntraCameraSyncReference;
// For compatibility
#define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL
#define OB_FRAME_METADATA_TYPE_EMITTER_MODE OB_FRAME_METADATA_TYPE_LASER_STATUS
@@ -1787,64 +1809,64 @@ typedef enum {
/**
* @brief Callback for file transfer
*
* @param state Transmission status
* @param message Transfer status information
* @param percent Transfer progress percentage
* @param user_data User-defined data
* @param[in] state Transmission status
* @param[in] message Transfer status information
* @param[in] percent Transfer progress percentage
* @param[in] user_data User-defined data
*/
typedef void (*ob_file_send_callback)(ob_file_tran_state state, const char *message, uint8_t percent, void *user_data);
/**
* @brief Callback for firmware upgrade
*
* @param state Upgrade status
* @param message Upgrade status information
* @param percent Upgrade progress percentage
* @param user_data User-defined data
* @param[in] state Upgrade status
* @param[in] message Upgrade status information
* @param[in] percent Upgrade progress percentage
* @param[in] user_data User-defined data
*/
typedef void (*ob_device_fw_update_callback)(ob_fw_update_state state, const char *message, uint8_t percent, void *user_data);
/**
* @brief Callback for device status
*
* @param state Device status
* @param message Device status information
* @param user_data User-defined data
* @param[in] state Device status
* @param[in] message Device status information
* @param[in] user_data User-defined data
*/
typedef void (*ob_device_state_callback)(ob_device_state state, const char *message, void *user_data);
/**
* @brief Callback for writing data
*
* @param state Write data status
* @param percent Write data percentage
* @param user_data User-defined data
* @param[in] state Write data status
* @param[in] percent Write data percentage
* @param[in] user_data User-defined data
*/
typedef void (*ob_set_data_callback)(ob_data_tran_state state, uint8_t percent, void *user_data);
/**
* @brief Callback for reading data
*
* @param state Read data status
* @param dataChunk Read the returned data block
* @param user_data User-defined data
* @param[in] state Read data status
* @param[in] dataChunk Read the returned data block
* @param[in] user_data User-defined data
*/
typedef void (*ob_get_data_callback)(ob_data_tran_state state, ob_data_chunk *dataChunk, void *user_data);
/**
* @brief Callback for media status (recording and playback)
*
* @param state Condition
* @param user_data User-defined data
* @param[in] state Condition
* @param[in] user_data User-defined data
*/
typedef void (*ob_media_state_callback)(ob_media_state state, void *user_data);
/**
* @brief Callback for device change
*
* @param removed List of deleted (dropped) devices
* @param added List of added (online) devices
* @param user_data User-defined data
* @param[in] removed List of deleted (dropped) devices
* @param[in] added List of added (online) devices
* @param[in] user_data User-defined data
*/
typedef void (*ob_device_changed_callback)(ob_device_list *removed, ob_device_list *added, void *user_data);
@@ -1854,8 +1876,8 @@ typedef void (*ob_device_changed_callback)(ob_device_list *removed, ob_device_li
/**
* @brief Callback for frame
*
* @param frame Frame object
* @param user_data User-defined data
* @param[in] frame Frame object
* @param[in] user_data User-defined data
*/
typedef void (*ob_frame_callback)(ob_frame *frame, void *user_data);
#define ob_filter_callback ob_frame_callback
@@ -1864,25 +1886,25 @@ typedef void (*ob_frame_callback)(ob_frame *frame, void *user_data);
/**
* @brief Callback for frameset
*
* @param frameset Frameset object
* @param user_data User-defined data
* @param[in] frameset Frameset object
* @param[in] user_data User-defined data
*/
typedef void (*ob_frameset_callback)(ob_frame *frameset, void *user_data);
/**
* @brief Customize the delete callback
*
* @param buffer Data that needs to be deleted
* @param user_data User-defined data
* @param[in] buffer Data that needs to be deleted
* @param[in] user_data User-defined data
*/
typedef void(ob_frame_destroy_callback)(uint8_t *buffer, void *user_data);
/**
* @brief Callback for receiving log
*
* @param severity Current log level
* @param message Log message
* @param user_data User-defined data
* @param[in] severity Current log level
* @param[in] message Log message
* @param[in] user_data User-defined data
*/
typedef void(ob_log_callback)(ob_log_severity severity, const char *message, void *user_data);
@@ -1890,7 +1912,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
/**
* @brief Check if the sensor_type is a video sensor
*
* @param sensor_type Sensor type to check
* @param[in] sensor_type Sensor type to check
* @return True if sensor_type is a video sensor, false otherwise
*/
#define ob_is_video_sensor_type(sensor_type) \
@@ -1900,7 +1922,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
/**
* @brief check if the stream_type is a video stream
*
* @param stream_type Stream type to check
* @param[in] stream_type Stream type to check
* @return True if stream_type is a video stream, false otherwise
*/
#define ob_is_video_stream_type(stream_type) \
@@ -1910,7 +1932,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
/**
* @brief Check if sensor_type is an IR sensor
*
* @param sensor_type Sensor type to check
* @param[in] sensor_type Sensor type to check
* @return True if sensor_type is an IR sensor, false otherwise
*/
#define is_ir_sensor(sensor_type) (sensor_type == OB_SENSOR_IR || sensor_type == OB_SENSOR_IR_LEFT || sensor_type == OB_SENSOR_IR_RIGHT)
@@ -1919,7 +1941,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
/**
* @brief Check if stream_type is an IR stream
*
* @param stream_type Stream type to check
* @param[in] stream_type Stream type to check
* @return True if stream_type is an IR stream, false otherwise
*/
#define is_ir_stream(stream_type) (stream_type == OB_STREAM_IR || stream_type == OB_STREAM_IR_LEFT || stream_type == OB_STREAM_IR_RIGHT)
@@ -1928,7 +1950,7 @@ typedef void (*ob_playback_status_changed_callback)(ob_playback_status status, v
/**
* @brief Check if frame_type is an IR frame
*
* @param frame_type Frame type to check
* @param[in] frame_type Frame type to check
* @return True if frame_type is an IR frame, false otherwise
*/
#define is_ir_frame(frame_type) (frame_type == OB_FRAME_IR || frame_type == OB_FRAME_IR_LEFT || frame_type == OB_FRAME_IR_RIGHT)
@@ -19,6 +19,7 @@ extern "C" {
* @brief Create a pipeline object
*
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_pipeline* return the pipeline object
*/
OB_EXPORT ob_pipeline *ob_create_pipeline(ob_error **error);
@@ -28,6 +29,7 @@ OB_EXPORT ob_pipeline *ob_create_pipeline(ob_error **error);
*
* @param[in] dev Device object used to create pipeline
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_pipeline* return the pipeline object
*/
OB_EXPORT ob_pipeline *ob_create_pipeline_with_device(const ob_device *dev, ob_error **error);
@@ -61,7 +63,7 @@ OB_EXPORT void ob_pipeline_start_with_config(ob_pipeline *pipeline, const ob_con
* @brief Start the pipeline and set the frame collection data callback
*
* @attention After start the pipeline with this interface, the frames will be output to the callback function and cannot be obtained frames by call
* @ob_pipeline_wait_for_frameset
* @ref ob_pipeline_wait_for_frameset
*
* @param[in] pipeline pipeline object
* @param[in] config Parameters to be configured
@@ -86,6 +88,7 @@ OB_EXPORT void ob_pipeline_stop(ob_pipeline *pipeline, ob_error **error);
*
* @param[in] pipeline The pipeline object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_config* The configuration object
*/
OB_EXPORT ob_config *ob_pipeline_get_config(const ob_pipeline *pipeline, ob_error **error);
@@ -105,6 +108,7 @@ OB_EXPORT void ob_pipeline_switch_config(ob_pipeline *pipeline, ob_config *confi
* @param[in] pipeline The pipeline object
* @param[in] timeout_ms The timeout for waiting (in milliseconds)
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_frame* The frameset that was waited for. A frameset is a special frame that can be used to obtain independent frames from the set.
*/
OB_EXPORT ob_frame *ob_pipeline_wait_for_frameset(ob_pipeline *pipeline, uint32_t timeout_ms, ob_error **error);
@@ -114,6 +118,7 @@ OB_EXPORT ob_frame *ob_pipeline_wait_for_frameset(ob_pipeline *pipeline, uint32_
*
* @param[in] pipeline The pipeline object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_device* The device object
*/
OB_EXPORT ob_device *ob_pipeline_get_device(const ob_pipeline *pipeline, ob_error **error);
@@ -124,6 +129,7 @@ OB_EXPORT ob_device *ob_pipeline_get_device(const ob_pipeline *pipeline, ob_erro
* @param[in] pipeline The pipeline object
* @param[in] sensorType The sensor type. The supported sensor types can be obtained through the ob_device_get_sensor_list() interface.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile_list* The stream profile list
*/
OB_EXPORT ob_stream_profile_list *ob_pipeline_get_stream_profile_list(const ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error);
@@ -153,6 +159,7 @@ OB_EXPORT void ob_pipeline_disable_frame_sync(ob_pipeline *pipeline, ob_error **
* @param[in] color_profile The input profile of the color sensor
* @param[in] align_mode The input align mode
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile_list* The list of D2C-enabled depth sensor resolutions
*/
OB_EXPORT ob_stream_profile_list *ob_get_d2c_depth_profile_list(const ob_pipeline *pipeline, const ob_stream_profile *color_profile, ob_align_mode align_mode,
@@ -162,6 +169,7 @@ OB_EXPORT ob_stream_profile_list *ob_get_d2c_depth_profile_list(const ob_pipelin
* @brief Create the pipeline configuration
*
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_config* The configuration object
*/
OB_EXPORT ob_config *ob_create_config(ob_error **error);
@@ -249,8 +257,9 @@ OB_EXPORT void ob_config_enable_lidar_stream(ob_config *config, ob_lidar_scan_ra
/**
* @brief Get the enabled stream profile list in the pipeline configuration
*
* @param config The pipeline configuration object
* @param error Pointer to an error object that will be set if an error occurs.
* @param[in] config The pipeline configuration object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile_list* The enabled stream profile list, should be released by @ref ob_delete_stream_profile_list after use
*/
OB_EXPORT ob_stream_profile_list *ob_config_get_enabled_stream_profile_list(const ob_config *config, ob_error **error);
@@ -308,6 +317,7 @@ OB_EXPORT void ob_config_set_frame_aggregate_output_mode(ob_config *config, ob_f
*
* @param[in] pipeline pipeline object
* @param[out] error Log error messages
*
* @return ob_camera_param The camera internal parameters
*/
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **error);
@@ -321,6 +331,7 @@ OB_EXPORT ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob
* @param[in] depthWidth depth width
* @param[in] depthHeight depth height
* @param[out] error Log error messages
*
* @return ob_camera_param returns camera internal parameters
*/
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth,
@@ -332,6 +343,7 @@ OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline
* @param[in] pipeline pipeline object
* @param[in] config The pipeline configuration
* @param[out] error Log error messages
*
* @return ob_calibration_param The calibration parameters
*/
OB_EXPORT ob_calibration_param ob_pipeline_get_calibration_param(ob_pipeline *pipeline, ob_config *config, ob_error **error);
@@ -463,6 +463,11 @@ typedef enum {
*/
OB_PROP_DISP_SEARCH_OFFSET_INT = 196,
/**
* @brief cpu temperature correction . true: calibrate temperature
*/
OB_PROP_CPU_TEMPERATURE_CALIBRATION_BOOL = 199,
/**
* @brief Repower device (cut off power and power on again)
*
@@ -545,6 +550,12 @@ typedef enum {
*/
OB_PROP_CONFIDENCE_ROTATE_INT = 231,
/**
* @brief Intra-camera Sync Reference based on the exposure start time, the exposure middle time, or the exposure end time. the definition in @ref
* OBIntraCameraSyncReference
*/
OB_PROP_INTRA_CAMERA_SYNC_REFERENCE_INT = 236,
/**
* @brief Baseline calibration parameters
*/
@@ -844,6 +855,11 @@ typedef enum {
*/
OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL = 3012,
/**
* @brief Depth Stream Industry Working Mode Settings, currently only supported by DCW2.
*/
OB_PROP_DEPTH_INDUSTRY_MODE_INT = 3024,
/**
* @brief Read the current network bandwidth type of the network device, whether it is Gigabit Ethernet or Fast Ethernet, such as G335LE.
*/
@@ -865,6 +881,12 @@ typedef enum {
OB_PROP_DEBUG_ESGM_CONFIDENCE_FLOAT = 5013,
/**
* @brief Color camera CCI denoising level. 0: Auto; 1-8: higher values indicate stronger denoising.
* @note This setting has no effect when AE (Auto Exposure) is disabled.
*/
OB_PROP_COLOR_DENOISING_LEVEL_INT = 5525,
/*
* @brief LiDAR: set/get IP address
*/
OB_RAW_DATA_LIDAR_IP_ADDRESS = 8000,
@@ -885,159 +907,74 @@ typedef enum {
OB_RAW_DATA_LIDAR_SUBNET_MASK = 8003,
/**
* @brief LiDAR: set/get scan speed
* @brief LiDAR: set/get work mode
*/
OB_PROP_LIDAR_SCAN_SPEED_INT = 8004,
/**
* @brief LiDAR: set/get scan direction
*/
OB_PROP_LIDAR_SCAN_DIRECTION_INT = 8005,
/**
* @brief LiDAR: set/get transfer protocol
*/
OB_PROP_LIDAR_TRANSFER_PROTOCOL_INT = 8006,
/**
* @brief LiDAR: set/get transfer protocol
*/
OB_PROP_LIDAR_WORK_MODE_INT = 8007,
/**
* @brief LiDAR: initiate device connection
*/
OB_PROP_LIDAR_INITIATE_DEVICE_CONNECTION_INT = 8008,
/**
* @brief LiDAR: set/get serial number
*/
OB_RAW_DATA_LIDAR_SERIAL_NUMBER = 8009,
/**
* @brief LiDAR: set/get echo mode
*/
OB_PROP_LIDAR_ECHO_MODE_INT = 8010,
OB_PROP_LIDAR_WORK_MODE_INT = 8004,
/**
* @brief LiDAR: apply configs
*/
OB_PROP_LIDAR_APPLY_CONFIGS_INT = 8011,
OB_PROP_LIDAR_APPLY_CONFIGS_INT = 8005,
/**
* @brief LiDAR: set/get tail filter level
*/
OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT = 8012,
OB_PROP_LIDAR_TAIL_FILTER_LEVEL_INT = 8006,
/**
* @brief LiDAR: set/get mems fov size
*/
OB_PROP_LIDAR_MEMS_FOV_SIZE_FLOAT = 8013,
OB_PROP_LIDAR_MEMS_FOV_SIZE_FLOAT = 8007,
/**
* @brief LiDAR: set/get mems frequency
*/
OB_PROP_LIDAR_MEMS_FRENQUENCY_FLOAT = 8014,
/**
* @brief LiDAR: set / get mems fov factor
*/
OB_PROP_LIDAR_MEMS_FOV_FACTOR_FLOAT = 8015,
/**
* @brief LiDAR: mems on/off
*/
OB_PROP_LIDAR_MEMS_ON_OFF_INT = 8016,
/**
* @brief LiDAR: restart mems
*/
OB_PROP_LIDAR_RESTART_MEMS_INT = 8017,
/**
* @brief LiDAR: save mems param
*/
OB_PROP_LIDAR_SAVE_MEMS_PARAM_INT = 8018,
OB_PROP_LIDAR_MEMS_FRENQUENCY_FLOAT = 8008,
/**
* @brief LiDAR: get product model
*/
OB_RAW_DATA_LIDAR_PRODUCT_MODEL = 8019,
OB_RAW_DATA_LIDAR_PRODUCT_MODEL = 8009,
/**
* @brief LiDAR: get firmware version
*/
OB_RAW_DATA_LIDAR_FIRMWARE_VERSION = 8020,
OB_RAW_DATA_LIDAR_FIRMWARE_VERSION = 8010,
/**
* @brief LiDAR: get fpga version
*/
OB_RAW_DATA_LIDAR_FPGA_VERSION = 8021,
/**
* @brief LiDAR: get status info
*/
OB_STRUCT_LIDAR_STATUS_INFO = 8022,
OB_RAW_DATA_LIDAR_FPGA_VERSION = 8011,
/**
* @brief LiDAR: get warning info
*/
OB_PROP_LIDAR_WARNING_INFO_INT = 8023,
OB_PROP_LIDAR_WARNING_INFO_INT = 8012,
/**
* @brief LiDAR: get realtime motor spin speed
* @brief LiDAR: get realtime motor spin speed, unit:0.01rpm
*/
OB_PROP_LIDAR_MOTOR_SPIN_SPEED_INT = 8024,
OB_PROP_LIDAR_MOTOR_SPIN_SPEED_INT = 8013,
/**
* @brief LiDAR: get mcu temperature
* @brief LiDAR: get mcu temperature, uint: 0.01degrees delsius
*/
OB_PROP_LIDAR_MCU_TEMPERATURE_FLOAT = 8025,
OB_PROP_LIDAR_MCU_TEMPERATURE_INT = 8014,
/**
* @brief LiDAR: get fpga temperature
* @brief LiDAR: get apd temperature, uint: 0.01degrees delsius
*/
OB_PROP_LIDAR_FPGA_TEMPERATURE_FLOAT = 8026,
/**
* @brief LiDAR: get motor version
*/
OB_RAW_DATA_LIDAR_MOTOR_VERSION = 8027,
/**
* @brief LiDAR: get apd high voltage
*/
OB_PROP_LIDAR_APD_HIGH_VOLTAGE_FLOAT = 8028,
/**
* @brief LiDAR: get apd temperature
*/
OB_PROP_LIDAR_APD_TEMPERATURE_FLOAT = 8029,
/**
* @brief LiDAR: get tx high power voltage
*/
OB_PROP_LIDAR_TX_HIGH_POWER_VOLTAGE_FLOAT = 8030,
/**
* @brief LiDAR: get tx lower power voltage
*/
OB_PROP_LIDAR_TX_LOWER_POWER_VOLTAGE_FLOAT = 8031,
/**
* @brief LiDAR: get mems version
*/
OB_RAW_DATA_LIDAR_MEMS_VERSION = 8032,
OB_PROP_LIDAR_APD_TEMPERATURE_INT = 8015,
/**
* @brief LiDAR: get/set specific mode
*/
OB_PROP_LIDAR_SPECIFIC_MODE_INT = 8033,
OB_PROP_LIDAR_SPECIFIC_MODE_INT = 8016,
/**
* @brief LiDAR: get/set repetitive scan mode
*/
OB_PROP_LIDAR_REPETITIVE_SCAN_MODE_INT = 8034,
OB_PROP_LIDAR_REPETITIVE_SCAN_MODE_INT = 8017,
} OBPropertyID,
ob_property_id;
@@ -22,6 +22,7 @@ extern "C" {
* @param[in] file_path The file path to record to.
* @param[in] compression_enabled Whether to enable compression for the recording.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return A pointer to the newly created recording device, or NULL if an error occurred.
*/
OB_EXPORT ob_record_device *ob_create_record_device(ob_device *device, const char *file_path, bool compression_enabled, ob_error **error);
@@ -55,6 +56,7 @@ OB_EXPORT void ob_record_device_resume(ob_record_device *recorder, ob_error **er
*
* @param[in] file_path The file path to playback from.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return A pointer to the newly created playback device, or NULL if an error occurred.
*/
OB_EXPORT ob_device *ob_create_playback_device(const char *file_path, ob_error **error);
@@ -98,6 +100,7 @@ OB_EXPORT void ob_playback_device_set_playback_rate(ob_device *player, const flo
*
* @param[in] player The playback device to get the status for.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The current playback status of the played data.
*/
OB_EXPORT ob_playback_status ob_playback_device_get_current_playback_status(ob_device *player, ob_error **error);
@@ -107,6 +110,7 @@ OB_EXPORT ob_playback_status ob_playback_device_get_current_playback_status(ob_d
*
* @param[in] player The playback device to set the callback for.
* @param[in] callback The callback function to receive playback status updates.
* @param[in] user_data Pointer to user data that can be passed to and retrieved from the callback function
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_playback_device_set_playback_status_changed_callback(ob_device *player, ob_playback_status_changed_callback callback, void *user_data,
@@ -117,6 +121,7 @@ OB_EXPORT void ob_playback_device_set_playback_status_changed_callback(ob_device
*
* @param[in] player The playback device to get the position for.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The current playback position of the played data, in milliseconds.
*/
OB_EXPORT uint64_t ob_playback_device_get_position(ob_device *player, ob_error **error);
@@ -126,6 +131,7 @@ OB_EXPORT uint64_t ob_playback_device_get_position(ob_device *player, ob_error *
*
* @param[in] player The playback device to get the duration for.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The duration of the played data, in milliseconds.
*/
OB_EXPORT uint64_t ob_playback_device_get_duration(ob_device *player, ob_error **error);
@@ -18,6 +18,7 @@ extern "C" {
*
* @param[in] sensor The sensor object.
* @param[out] error Logs error messages.
*
* @return The sensor type.
*/
OB_EXPORT ob_sensor_type ob_sensor_get_type(const ob_sensor *sensor, ob_error **error);
@@ -27,6 +28,7 @@ OB_EXPORT ob_sensor_type ob_sensor_get_type(const ob_sensor *sensor, ob_error **
*
* @param[in] sensor The sensor object.
* @param[out] error Logs error messages.
*
* @return A list of stream profiles.
*/
OB_EXPORT ob_stream_profile_list *ob_sensor_get_stream_profile_list(const ob_sensor *sensor, ob_error **error);
@@ -82,6 +84,7 @@ OB_EXPORT ob_filter_list *ob_sensor_create_recommended_filter_list(const ob_sens
*
* @param[in] sensor_list The list of sensor objects.
* @param[out] error Logs error messages.
*
* @return The number of sensors in the list.
*/
OB_EXPORT uint32_t ob_sensor_list_get_count(const ob_sensor_list *sensor_list, ob_error **error);
@@ -92,6 +95,7 @@ OB_EXPORT uint32_t ob_sensor_list_get_count(const ob_sensor_list *sensor_list, o
* @param[in] sensor_list The list of sensor objects.
* @param[in] index The index of the sensor on the list.
* @param[out] error Logs error messages.
*
* @return The sensor type.
*/
OB_EXPORT ob_sensor_type ob_sensor_list_get_sensor_type(const ob_sensor_list *sensor_list, uint32_t index, ob_error **error);
@@ -102,6 +106,7 @@ OB_EXPORT ob_sensor_type ob_sensor_list_get_sensor_type(const ob_sensor_list *se
* @param[in] sensor_list The list of sensor objects.
* @param[in] sensorType The sensor type to be obtained.
* @param[out] error Logs error messages.
*
* @return The sensor pointer. If the specified type of sensor does not exist, it will return null.
*/
OB_EXPORT ob_sensor *ob_sensor_list_get_sensor_by_type(const ob_sensor_list *sensor_list, ob_sensor_type sensorType, ob_error **error);
@@ -112,6 +117,7 @@ OB_EXPORT ob_sensor *ob_sensor_list_get_sensor_by_type(const ob_sensor_list *sen
* @param[in] sensor_list The list of sensor objects.
* @param[in] index The index of the sensor on the list.
* @param[out] error Logs error messages.
*
* @return The sensor object.
*/
OB_EXPORT ob_sensor *ob_sensor_list_get_sensor(const ob_sensor_list *sensor_list, uint32_t index, ob_error **error);
@@ -17,7 +17,10 @@ extern "C" {
/**
* @brief Create a stream profile object
*
* @param[in] type Stream type
* @param[in] format Stream format
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile* return the stream profile object
*/
OB_EXPORT ob_stream_profile *ob_create_stream_profile(ob_stream_type type, ob_format format, ob_error **error);
@@ -31,6 +34,7 @@ OB_EXPORT ob_stream_profile *ob_create_stream_profile(ob_stream_type type, ob_fo
* @param[in] height Stream height
* @param[in] fps Stream frame rate
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile* return the video stream profile object
*/
OB_EXPORT ob_stream_profile *ob_create_video_stream_profile(ob_stream_type type, ob_format format, uint32_t width, uint32_t height, uint32_t fps,
@@ -42,6 +46,7 @@ OB_EXPORT ob_stream_profile *ob_create_video_stream_profile(ob_stream_type type,
* @param[in] full_scale_range Accel full scale range
* @param[in] sample_rate Accel sample rate
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile* return the accel stream profile object
*/
OB_EXPORT ob_stream_profile *ob_create_accel_stream_profile(ob_accel_full_scale_range full_scale_range, ob_accel_sample_rate sample_rate, ob_error **error);
@@ -52,6 +57,7 @@ OB_EXPORT ob_stream_profile *ob_create_accel_stream_profile(ob_accel_full_scale_
* @param[in] full_scale_range Gyro full scale range
* @param[in] sample_rate Gyro sample rate
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_profile* return the accel stream profile object
*/
OB_EXPORT ob_stream_profile *ob_create_gyro_stream_profile(ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate, ob_error **error);
@@ -100,6 +106,7 @@ OB_EXPORT void ob_delete_stream_profile(const ob_stream_profile *profile, ob_err
*
* @param[in] profile Stream profile object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_format return the format of the stream
*/
OB_EXPORT ob_format ob_stream_profile_get_format(const ob_stream_profile *profile, ob_error **error);
@@ -118,6 +125,7 @@ OB_EXPORT void ob_stream_profile_set_format(ob_stream_profile *profile, ob_forma
*
* @param[in] profile Stream profile object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_stream_type stream type
*/
OB_EXPORT ob_stream_type ob_stream_profile_get_type(const ob_stream_profile *profile, ob_error **error);
@@ -137,6 +145,7 @@ OB_EXPORT void ob_stream_profile_set_type(const ob_stream_profile *profile, ob_s
* @param[in] source Source stream profile
* @param[in] target Target stream profile
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_extrinsic The extrinsic
*/
OB_EXPORT ob_extrinsic ob_stream_profile_get_extrinsic_to(const ob_stream_profile *source, ob_stream_profile *target, ob_error **error);
@@ -155,9 +164,9 @@ OB_EXPORT void ob_stream_profile_set_extrinsic_to(ob_stream_profile *source, con
* @brief Set the extrinsic for source stream to target stream type
*
* @param[in] source Source stream profile
* @param[in] type Target stream type
* @param[in] type Target stream type
* @param[in] extrinsic The extrinsic
* @param[out] error Pointer to an error object that will be set if an error occurs.
* @return ob_extrinsic The extrinsic
*/
OB_EXPORT void ob_stream_profile_set_extrinsic_to_type(ob_stream_profile *source, const ob_stream_type type, ob_extrinsic extrinsic, ob_error **error);
@@ -166,6 +175,7 @@ OB_EXPORT void ob_stream_profile_set_extrinsic_to_type(ob_stream_profile *source
*
* @param[in] profile Stream profile object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the frame rate of the stream
*/
OB_EXPORT uint32_t ob_video_stream_profile_get_fps(const ob_stream_profile *profile, ob_error **error);
@@ -175,6 +185,7 @@ OB_EXPORT uint32_t ob_video_stream_profile_get_fps(const ob_stream_profile *prof
*
* @param[in] profile Stream profile object , If the profile is not a video stream configuration, an error will be returned
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the width of the stream
*/
OB_EXPORT uint32_t ob_video_stream_profile_get_width(const ob_stream_profile *profile, ob_error **error);
@@ -193,6 +204,7 @@ OB_EXPORT void ob_video_stream_profile_set_width(ob_stream_profile *profile, uin
*
* @param[in] profile Stream profile object , If the profile is not a video stream configuration, an error will be returned
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t return the height of the stream
*/
OB_EXPORT uint32_t ob_video_stream_profile_get_height(const ob_stream_profile *profile, ob_error **error);
@@ -211,6 +223,7 @@ OB_EXPORT void ob_video_stream_profile_set_height(ob_stream_profile *profile, ui
*
* @param[in] profile Stream profile object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_camera_intrinsic Return the intrinsic of the stream
*/
OB_EXPORT ob_camera_intrinsic ob_video_stream_profile_get_intrinsic(const ob_stream_profile *profile, ob_error **error);
@@ -229,6 +242,7 @@ OB_EXPORT void ob_video_stream_profile_set_intrinsic(ob_stream_profile *profile,
*
* @param[in] profile Stream profile object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_camera_distortion Return the distortion of the stream
*/
OB_EXPORT ob_camera_distortion ob_video_stream_profile_get_distortion(const ob_stream_profile *profile, ob_error **error);
@@ -247,6 +261,7 @@ OB_EXPORT void ob_video_stream_profile_set_distortion(ob_stream_profile *profile
*
* @param[in] profile Stream profile object
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_disparity_param Return the disparity process param of the stream
*/
OB_EXPORT ob_disparity_param ob_disparity_based_stream_profile_get_disparity_param(const ob_stream_profile *profile, ob_error **error);
@@ -265,6 +280,7 @@ OB_EXPORT void ob_disparity_based_stream_profile_set_disparity_param(ob_stream_p
*
* @param[in] profile Stream profile object. If the profile is not for the accelerometer stream, an error will be returned.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The full-scale range of the accelerometer stream.
*/
OB_EXPORT ob_accel_full_scale_range ob_accel_stream_profile_get_full_scale_range(const ob_stream_profile *profile, ob_error **error);
@@ -274,6 +290,7 @@ OB_EXPORT ob_accel_full_scale_range ob_accel_stream_profile_get_full_scale_range
*
* @param[in] profile Stream profile object. If the profile is not for the accelerometer stream, an error will be returned.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The sampling frequency of the accelerometer frame.
*/
OB_EXPORT ob_accel_sample_rate ob_accel_stream_profile_get_sample_rate(const ob_stream_profile *profile, ob_error **error);
@@ -283,6 +300,7 @@ OB_EXPORT ob_accel_sample_rate ob_accel_stream_profile_get_sample_rate(const ob_
*
* @param[in] profile Stream profile object. If the profile is not for the accelerometer stream, an error will be returned.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_accel_intrinsic Return the intrinsic of the accelerometer stream.
*/
OB_EXPORT ob_accel_intrinsic ob_accel_stream_profile_get_intrinsic(const ob_stream_profile *profile, ob_error **error);
@@ -301,6 +319,7 @@ OB_EXPORT void ob_accel_stream_profile_set_intrinsic(ob_stream_profile *profile,
*
* @param[in] profile Stream profile object. If the profile is not for the gyroscope stream, an error will be returned.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The full-scale range of the gyroscope stream.
*/
OB_EXPORT ob_gyro_full_scale_range ob_gyro_stream_profile_get_full_scale_range(const ob_stream_profile *profile, ob_error **error);
@@ -310,6 +329,7 @@ OB_EXPORT ob_gyro_full_scale_range ob_gyro_stream_profile_get_full_scale_range(c
*
* @param[in] profile Stream profile object. If the profile is not for the gyroscope stream, an error will be returned.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The sampling frequency of the gyroscope stream.
*/
OB_EXPORT ob_gyro_sample_rate ob_gyro_stream_profile_get_sample_rate(const ob_stream_profile *profile, ob_error **error);
@@ -319,6 +339,7 @@ OB_EXPORT ob_gyro_sample_rate ob_gyro_stream_profile_get_sample_rate(const ob_st
*
* @param[in] profile Stream profile object. If the profile is not for the gyroscope stream, an error will be returned.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_gyro_intrinsic Return the intrinsic of the gyroscope stream.
*/
OB_EXPORT ob_gyro_intrinsic ob_gyro_stream_get_intrinsic(const ob_stream_profile *profile, ob_error **error);
@@ -346,6 +367,7 @@ OB_EXPORT ob_lidar_scan_rate ob_lidar_stream_profile_get_scan_rate(const ob_stre
*
* @param[in] profile_list StreamProfile list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The number of StreamProfile lists.
*/
OB_EXPORT uint32_t ob_stream_profile_list_get_count(const ob_stream_profile_list *profile_list, ob_error **error);
@@ -358,6 +380,7 @@ OB_EXPORT uint32_t ob_stream_profile_list_get_count(const ob_stream_profile_list
* @param[in] profile_list StreamProfile lists.
* @param[in] index Index.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The matching profile.
*/
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_profile(const ob_stream_profile_list *profile_list, int index, ob_error **error);
@@ -374,6 +397,7 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_profile(const ob_stream_
* @param[in] format Format. If you don't need to add matching conditions, you can pass OB_FORMAT_ANY.
* @param[in] fps Frame rate. If you don't need to add matching conditions, you can pass OB_FPS_ANY.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The matching profile.
*/
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(const ob_stream_profile_list *profile_list, int width, int height,
@@ -389,6 +413,7 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(con
* @param[in] full_scale_range Full-scale range. If you don't need to add matching conditions, you can pass 0.
* @param[in] sample_rate Sample rate. If you don't need to add matching conditions, you can pass 0.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The matching profile.
*/
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_accel_stream_profile(const ob_stream_profile_list *profile_list,
@@ -405,6 +430,7 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_accel_stream_profile(con
* @param[in] full_scale_range Full-scale range. If you don't need to add matching conditions, you can pass 0.
* @param[in] sample_rate Sample rate. If you don't need to add matching conditions, you can pass 0.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return The matching profile.
*/
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_gyro_stream_profile(const ob_stream_profile_list *profile_list,
@@ -13,6 +13,7 @@ extern "C" {
* @brief Convert OBFormat to " char* " type and then return.
*
* @param[in] type OBFormat type.
*
* @return OBFormat of "char*" type.
*/
OB_EXPORT const char* ob_format_type_to_string(OBFormat type);
@@ -21,6 +22,7 @@ OB_EXPORT const char* ob_format_type_to_string(OBFormat type);
* @brief Convert OBFrameType to " char* " type and then return.
*
* @param[in] type OBFrameType type.
*
* @return OBFrameType of "char*" type.
*/
OB_EXPORT const char* ob_frame_type_to_string(OBFrameType type);
@@ -29,6 +31,7 @@ OB_EXPORT const char* ob_frame_type_to_string(OBFrameType type);
* @brief Convert OBStreamType to " char* " type and then return.
*
* @param[in] type OBStreamType type.
*
* @return OBStreamType of "char*" type.
*/
OB_EXPORT const char* ob_stream_type_to_string(OBStreamType type);
@@ -37,6 +40,7 @@ OB_EXPORT const char* ob_stream_type_to_string(OBStreamType type);
* @brief Convert OBSensorType to " char* " type and then return.
*
* @param[in] type OBSensorType type.
*
* @return OBSensorType of "char*" type.
*/
OB_EXPORT const char* ob_sensor_type_to_string(OBSensorType type);
@@ -45,6 +49,7 @@ OB_EXPORT const char* ob_sensor_type_to_string(OBSensorType type);
* @brief Convert OBIMUSampleRate to " char* " type and then return.
*
* @param[in] type OBIMUSampleRate type.
*
* @return OBIMUSampleRate of "char*" type.
*/
OB_EXPORT const char* ob_imu_rate_type_to_string(OBIMUSampleRate type);
@@ -53,6 +58,7 @@ OB_EXPORT const char* ob_imu_rate_type_to_string(OBIMUSampleRate type);
* @brief Convert OBGyroFullScaleRange to " char* " type and then return.
*
* @param[in] type OBGyroFullScaleRange type.
*
* @return OBGyroFullScaleRange of "char*" type.
*/
OB_EXPORT const char* ob_gyro_range_type_to_string(OBGyroFullScaleRange type);
@@ -61,6 +67,7 @@ OB_EXPORT const char* ob_gyro_range_type_to_string(OBGyroFullScaleRange type);
* @brief Convert OBAccelFullScaleRange to " char* " type and then return.
*
* @param[in] type OBAccelFullScaleRange type.
*
* @return OBAccelFullScaleRange of "char*" type.
*/
OB_EXPORT const char* ob_accel_range_type_to_string(OBAccelFullScaleRange type);
@@ -77,6 +84,7 @@ OB_EXPORT const char *ob_lidar_scan_rate_type_to_string(OBLiDARScanRate type);
* @brief Convert OBFrameMetadataType to " char* " type and then return.
*
* @param[in] type OBFrameMetadataType type.
*
* @return OBFrameMetadataType of "char*" type.
*/
OB_EXPORT const char* ob_meta_data_type_to_string(OBFrameMetadataType type);
@@ -85,6 +93,7 @@ OB_EXPORT const char* ob_meta_data_type_to_string(OBFrameMetadataType type);
* @brief Convert OBStreamType to OBSensorType.
*
* @param[in] type The sensor type to convert.
*
* @return OBStreamType The corresponding stream type.
*/
OB_EXPORT OBStreamType ob_sensor_type_to_stream_type(OBSensorType type);
@@ -92,7 +101,8 @@ OB_EXPORT OBStreamType ob_sensor_type_to_stream_type(OBSensorType type);
/**
* @brief Convert OBFormat to " char* " type and then return.
*
* @param format The OBFormat to convert.
* @param[in] format The OBFormat to convert.
*
* @return The string.
*/
OB_EXPORT const char *ob_format_to_string(OBFormat format);
@@ -119,6 +119,18 @@ OB_EXPORT bool ob_calibration_2d_to_2d(const ob_calibration_param calibration_pa
* @return bool save point cloud result
*/
OB_EXPORT bool ob_save_pointcloud_to_ply(const char *file_name, ob_frame *frame, bool save_binary, bool use_mesh, float mesh_threshold, ob_error **error);
/**
* @brief save LiDAR point cloud to ply file.
*
* @param[in] file_name Point cloud save path
* @param[in] frame LiDAR point cloud frame
* @param[in] save_binary Binary or textual,true: binary, false: textual
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool save LiDAR point cloud result
*/
OB_EXPORT bool ob_save_lidar_pointcloud_to_ply(const char *file_name, ob_frame *frame, bool save_binary, ob_error **error);
#ifdef __cplusplus
}
#endif
@@ -19,36 +19,37 @@ extern "C" {
*
* @return int The SDK version number.
*/
OB_EXPORT int ob_get_version();
OB_EXPORT int ob_get_version(void);
/**
* @brief Get the SDK major version number.
*
* @return int The SDK major version number.
*/
OB_EXPORT int ob_get_major_version();
OB_EXPORT int ob_get_major_version(void);
/**
* @brief Get the SDK minor version number.
*
* @return int The SDK minor version number.
*/
OB_EXPORT int ob_get_minor_version();
OB_EXPORT int ob_get_minor_version(void);
/**
* @brief Get the SDK patch version number.
*
* @return int The SDK patch version number.
*/
OB_EXPORT int ob_get_patch_version();
OB_EXPORT int ob_get_patch_version(void);
/**
* @brief Get the SDK stage version.
*
* @attention The returned char* does not need to be freed.
*
* @return const char* The SDK stage version.
*/
OB_EXPORT const char *ob_get_stage_version();
OB_EXPORT const char *ob_get_stage_version(void);
#ifdef __cplusplus
}