update OrbbecSDK version to 2.6.0

This commit is contained in:
ob-yalian
2025-11-20 10:13:09 +08:00
parent 7d517ead74
commit f48776648d
44 changed files with 965 additions and 436 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,7 +87,6 @@ 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);
@@ -91,9 +94,10 @@ OB_EXPORT void ob_delete_depth_work_mode_list(ob_depth_work_mode_list *work_mode
* @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,66 +249,73 @@ 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[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @param device The device object.
* @param error Log error messages.
* @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_list,
uint32_t index, ob_error **error);
@@ -300,8 +323,8 @@ OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_i
/**
* @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);
@@ -67,15 +70,16 @@ OB_EXPORT void ob_enable_net_device_enumeration(ob_context *context, bool enable
* @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 DeviceList::uid(), or specify it manually
* 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
* @note This applies to all GigE Vision devices
*/
OB_EXPORT bool ob_force_ip_config(const char *deviceUid, ob_net_ip_config config, ob_error **error);
OB_EXPORT bool ob_force_ip_config(const char *macAddress, ob_net_ip_config config, ob_error **error);
/**
* @brief Create a network device object
@@ -84,12 +88,14 @@ OB_EXPORT bool ob_force_ip_config(const char *deviceUid, ob_net_ip_config config
* @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.
*
@@ -143,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
*
@@ -167,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);
@@ -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,7 +426,8 @@ 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"
*
* @return const char* The connection type, currently supports: "USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet", "GMSL2"
*/
OB_EXPORT const char *ob_device_info_get_connection_type(const ob_device_info *info, ob_error **error);
@@ -416,8 +436,9 @@ 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);
@@ -436,6 +457,7 @@ OB_EXPORT const char *ob_device_info_get_subnet_mask(const ob_device_info *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 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);
@@ -445,6 +467,7 @@ OB_EXPORT const char *ob_device_info_get_gateway(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 const char* The hardware version number
*/
OB_EXPORT const char *ob_device_info_get_hardware_version(const ob_device_info *info, ob_error **error);
@@ -452,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);
@@ -466,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);
@@ -475,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);
@@ -484,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);
@@ -493,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);
@@ -510,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);
@@ -520,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);
@@ -530,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);
@@ -540,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);
@@ -550,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);
@@ -560,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);
@@ -570,8 +604,9 @@ 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"
* "Ethernet", "GMSL2"
*/
OB_EXPORT const char *ob_device_list_get_device_connection_type(const ob_device_list *list, uint32_t index, ob_error **error);
@@ -580,9 +615,10 @@ 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);
@@ -595,6 +631,7 @@ OB_EXPORT const char *ob_device_list_get_device_ip_address(const ob_device_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* 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);
@@ -607,6 +644,7 @@ OB_EXPORT const char *ob_device_list_get_device_subnet_mask(const ob_device_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* 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);
@@ -616,9 +654,10 @@ OB_EXPORT const char *ob_device_list_get_device_gateway(const ob_device_list *li
*
* @attention Only valid for network devices. Returns "0:0:0:0:0:0" for non-network devices.
*
* @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* 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);
@@ -631,6 +670,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 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);
@@ -643,6 +683,7 @@ OB_EXPORT const char *ob_device_list_get_device_local_ip(const ob_device_list *l
* @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);
@@ -655,6 +696,7 @@ OB_EXPORT uint8_t ob_device_list_get_device_local_subnet_length(const ob_device_
* @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);
@@ -667,6 +709,7 @@ OB_EXPORT const char *ob_device_list_get_device_local_gateway(const ob_device_li
* @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.
*
*/
@@ -680,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);
@@ -696,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);
@@ -719,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);
@@ -729,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);
@@ -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,
@@ -249,9 +257,9 @@ 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.
* @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);
@@ -269,6 +269,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;
@@ -1253,8 +1255,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,
@@ -1262,8 +1264,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.
*
@@ -1275,8 +1277,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.
*
@@ -1288,9 +1290,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.
@@ -1300,9 +1302,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.
@@ -1753,64 +1755,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);
@@ -1820,8 +1822,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
@@ -1830,25 +1832,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);
@@ -1856,7 +1858,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) \
@@ -1866,7 +1868,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) \
@@ -1876,7 +1878,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)
@@ -1885,7 +1887,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)
@@ -1894,7 +1896,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);
@@ -239,8 +247,9 @@ OB_EXPORT void ob_config_enable_gyro_stream(ob_config *config, ob_gyro_full_scal
/**
* @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);
@@ -298,6 +307,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);
@@ -311,6 +321,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,
@@ -322,6 +333,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)
*
@@ -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);
@@ -90,6 +96,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);
@@ -108,6 +115,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);
@@ -127,6 +135,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);
@@ -145,9 +154,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);
@@ -156,6 +165,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);
@@ -165,6 +175,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);
@@ -183,6 +194,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);
@@ -201,6 +213,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);
@@ -219,6 +232,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);
@@ -237,6 +251,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);
@@ -255,6 +270,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);
@@ -264,6 +280,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);
@@ -273,6 +290,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);
@@ -291,6 +309,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);
@@ -300,6 +319,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);
@@ -309,6 +329,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);
@@ -327,6 +348,7 @@ OB_EXPORT void ob_gyro_stream_set_intrinsic(ob_stream_profile *profile, ob_gyro_
*
* @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);
@@ -339,6 +361,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);
@@ -355,6 +378,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,
@@ -370,6 +394,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,
@@ -386,6 +411,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);
@@ -69,6 +76,7 @@ OB_EXPORT const char* ob_accel_range_type_to_string(OBAccelFullScaleRange 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);
@@ -77,6 +85,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);
@@ -84,7 +93,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);
@@ -44,6 +44,7 @@ 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.