C Reference

Macros

OB_EXTENSION_API
DEPRECATED
ob_filter_callback
ob_playback_callback

Structures

struct ob_error

The error class exposed by the SDK, users can get detailed error information according to the erro .

struct OBAccelValue

Data structures for accelerometers and gyroscopes .

struct OBBoolPropertyRange

Boolean-scoped structure .

struct OBCameraDistortion

Distortion Parameters .

struct OBCameraIntrinsic

Camera internal parameters .

struct OBCameraParam

Camera parameters .

struct OBColorPoint

3D point structure with color information

struct OBD2CTransform

Rotation/Transformation .

struct OBDataChunk

Data block structure for data block transmission .

struct OBDeviceTemperature

Get the temperature parameters of the device (unit: Celsius) .

struct OBFloatPropertyRange

Float range structure .

struct OBIntPropertyRange

Int range structure .

struct OBMultiDeviceSyncConfig

Multi-device synchronization configuration .

struct OBPoint

3D point structure in SDK

struct OBPropertyItem

Used to describe the characteristics of each property .

struct OBRect

rectangle

struct OBTofExposureThresholdControl

TOF Exposure Threshold .

Enumerations

enum OBPermissionType

the permission type of api or property

Values:

enumerator OB_PERMISSION_DENY

no permission

enumerator OB_PERMISSION_READ

can read

enumerator OB_PERMISSION_WRITE

can write

enumerator OB_PERMISSION_READ_WRITE

can read and write

enum OBStatus

error code

Values:

enumerator OB_STATUS_OK

status ok

enumerator OB_STATUS_ERROR

status error

enum OBLogSeverity

log level, the higher the level, the stronger the log filter

Values:

enumerator OB_LOG_SEVERITY_DEBUG

debug

enumerator OB_LOG_SEVERITY_INFO

information

enumerator OB_LOG_SEVERITY_WARN

warning

enumerator OB_LOG_SEVERITY_ERROR

error

enumerator OB_LOG_SEVERITY_FATAL

fatal error

enumerator OB_LOG_SEVERITY_NONE

none (close LOG)

enum OBExceptionType

The exception types in the SDK, through the exception type, you can easily determine the specific type of error. For detailed error API interface functions and error logs, please refer to the information of ob_error .

Values:

enumerator OB_EXCEPTION_TYPE_UNKNOWN

Unknown error, an error not clearly defined by the SDK

enumerator OB_EXCEPTION_TYPE_CAMERA_DISCONNECTED

SDK device disconnection exception

enumerator OB_EXCEPTION_TYPE_PLATFORM

An error in the SDK adaptation platform layer means an error in the implementation of a specific system platform

enumerator OB_EXCEPTION_TYPE_INVALID_VALUE

Invalid parameter type exception, need to check input parameter

enumerator OB_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE

Exception caused by API version mismatch

enumerator OB_EXCEPTION_TYPE_NOT_IMPLEMENTED

SDK and firmware have not yet implemented functions

enumerator OB_EXCEPTION_TYPE_IO

SDK access IO exception error

enumerator OB_EXCEPTION_TYPE_MEMORY

SDK access and use memory errors, which means that the frame fails to allocate memory

enumerator OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION

Unsupported operation type error by SDK or RGBD device

enum OBSensorType

Enumeration value describing the sensor type .

Values:

enumerator OB_SENSOR_UNKNOWN

Unknown type sensor

enumerator OB_SENSOR_IR

IR

enumerator OB_SENSOR_COLOR

Color

enumerator OB_SENSOR_DEPTH

Depth

enumerator OB_SENSOR_ACCEL

Accel

enumerator OB_SENSOR_GYRO

Gyro

enum OBStreamType

Enumeration value describing the type of data stream .

Values:

enumerator OB_STREAM_VIDEO

Video stream (infrared, color, depth streams are all video streams)

enumerator OB_STREAM_IR

IR stream

enumerator OB_STREAM_COLOR

color stream

enumerator OB_STREAM_DEPTH

depth stream

enumerator OB_STREAM_ACCEL

Accelerometer data stream

enumerator OB_STREAM_GYRO

Gyroscope data stream

enum OBFrameType

Describe the Frame type enumeration value .

Values:

enumerator OB_FRAME_VIDEO

Describes the Frame type enumeration value

enumerator OB_FRAME_IR

IR frame

enumerator OB_FRAME_COLOR

color stream

enumerator OB_FRAME_DEPTH

depth stream

enumerator OB_FRAME_ACCEL

Accelerometer data frame

enumerator OB_FRAME_SET

Frame collection (internally contains a variety of data frames)

enumerator OB_FRAME_POINTS

point cloud frame

enumerator OB_FRAME_GYRO

Gyroscope data frame

enum OBFormat

Enumeration value describing the pixel format .

Values:

enumerator OB_FORMAT_YUYV

YUYV format

enumerator OB_FORMAT_YUY2

YUY2 format (the actual format is the same as YUYV)

enumerator OB_FORMAT_UYVY

UYVY format

enumerator OB_FORMAT_NV12

NV12 format

enumerator OB_FORMAT_NV21

NV21 format

enumerator OB_FORMAT_MJPG

MJPG encoding format

enumerator OB_FORMAT_H264

H.264 encoding format

enumerator OB_FORMAT_H265

H.265 encoding format

enumerator OB_FORMAT_Y16

Y16 format, single channel 16bit depth

enumerator OB_FORMAT_Y8

Y8 format, single channel 8bit depth

enumerator OB_FORMAT_Y10

Y10 format, single channel 10bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_Y11

Y11 format, single channel 11bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_Y12

Y12 format, single channel 12bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_GRAY

GRAY (the actual format is the same as YUYV)

enumerator OB_FORMAT_HEVC

HEVC encoding format (the actual format is the same as H265)

enumerator OB_FORMAT_I420

I420 format

enumerator OB_FORMAT_ACCEL

Acceleration data format

enumerator OB_FORMAT_GYRO

Gyroscope Data Format

enumerator OB_FORMAT_POINT

xyz 3D coordinate point format

enumerator OB_FORMAT_RGB_POINT

xyz 3D coordinate point format with RGB information

enumerator OB_FORMAT_RLE

RLE pressure test format (SDK will be unpacked into Y16 by default)

enumerator OB_FORMAT_RGB888

RGB888 format

enumerator OB_FORMAT_BGR

BGR format (actual BRG888)

enumerator OB_FORMAT_Y14

Y14 format, single channel 14bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_UNKNOWN

unknown format

enum OBUpgradeState

Firmware upgrade status .

Values:

enumerator STAT_FILE_TRANSFER

file transfer

enumerator STAT_DONE

update completed

enumerator STAT_IN_PROGRESS

upgrade in process

enumerator STAT_START

start the upgrade

enumerator STAT_VERIFY_IMAGE

Image file verification

enumerator ERR_VERIFY

Verification failed

enumerator ERR_PROGRAM

Program execution failed

enumerator ERR_ERASE

Flash parameter failed

enumerator ERR_FLASH_TYPE

Flash type error

enumerator ERR_IMAGE_SIZE

Image file size error

enumerator ERR_OTHER

other errors

enumerator ERR_DDR

DDR access error

enumerator ERR_TIMEOUT

timeout error

enum OBFileTranState

file transfer status

Values:

enumerator FILE_TRAN_STAT_TRANSFER

file transfer

enumerator FILE_TRAN_STAT_DONE

file transfer succeeded

enumerator FILE_TRAN_STAT_PREPAR

preparing

enumerator FILE_TRAN_ERR_DDR

DDR access failed

enumerator FILE_TRAN_ERR_NOT_ENOUGH_SPACE

Insufficient target space error

enumerator FILE_TRAN_ERR_PATH_NOT_WRITABLE

Destination path is not writable

enumerator FILE_TRAN_ERR_MD5_ERROR

MD5 checksum error

enumerator FILE_TRAN_ERR_WRITE_FLASH_ERROR

write flash error

enumerator FILE_TRAN_ERR_TIMEOUT

timeout error

enum OBDataTranState

data transfer status

Values:

enumerator DATA_TRAN_STAT_STOPPED

data transfer stoped

enumerator DATA_TRAN_STAT_DONE

data transfer completed

enumerator DATA_TRAN_STAT_VERIFYING

data verifying

enumerator DATA_TRAN_STAT_TRANSFERRING

data transferring

enumerator DATA_TRAN_ERR_BUSY

Transmission is busy

enumerator DATA_TRAN_ERR_UNSUPPORTED

not support

enumerator DATA_TRAN_ERR_TRAN_FAILED

transfer failed

enumerator DATA_TRAN_ERR_VERIFY_FAILED

Test failed

enumerator DATA_TRAN_ERR_OTHER

other errors

enum OBAlignMode

alignment mode

Values:

enumerator ALIGN_DISABLE

turn off alignment

enumerator ALIGN_D2C_HW_MODE

Hardware D2C alignment mode

enumerator ALIGN_D2C_SW_MODE

Software D2C alignment mode

enum OBConvertFormat

format conversion type enumeration

Values:

enumerator FORMAT_YUYV_TO_RGB888

YUYV to RGB888

enumerator FORMAT_I420_TO_RGB888

I420 to RGB888

enumerator FORMAT_NV21_TO_RGB888

NV21 to RGB888

enumerator FORMAT_NV12_TO_RGB888

NV12 to RGB888

enumerator FORMAT_MJPEG_TO_I420

MJPG to I420

enumerator FORMAT_RGB888_TO_BGR

RGB888 to BGR

enumerator FORMAT_MJPEG_TO_NV21

MJPG to NV21

enumerator FORMAT_MJPEG_TO_RGB888

MJPG to RGB888

enum OBGyroSampleRate

Enumeration of IMU sample rate values ​​(gyroscope or accelerometer) .

Values:

enumerator OB_SAMPLE_RATE_1_5625_HZ

1.5625Hz

enumerator OB_SAMPLE_RATE_3_125_HZ

3.125Hz

enumerator OB_SAMPLE_RATE_6_25_HZ

6.25Hz

enumerator OB_SAMPLE_RATE_12_5_HZ

12.5Hz

enumerator OB_SAMPLE_RATE_25_HZ

25Hz

enumerator OB_SAMPLE_RATE_50_HZ

50Hz

enumerator OB_SAMPLE_RATE_100_HZ

100Hz

enumerator OB_SAMPLE_RATE_200_HZ

200Hz

enumerator OB_SAMPLE_RATE_500_HZ

500Hz

enumerator OB_SAMPLE_RATE_1_KHZ

1KHz

enumerator OB_SAMPLE_RATE_2_KHZ

2KHz

enumerator OB_SAMPLE_RATE_4_KHZ

4KHz

enumerator OB_SAMPLE_RATE_8_KHZ

8KHz

enumerator OB_SAMPLE_RATE_16_KHZ

16KHz

enumerator OB_SAMPLE_RATE_32_KHZ

32Hz

enum OBGyroFullScaleRange

Enumeration of gyroscope ranges .

Values:

enumerator OB_GYRO_FS_16dps

16 degrees per second

enumerator OB_GYRO_FS_31dps

31 degrees per second

enumerator OB_GYRO_FS_62dps

62 degrees per second

enumerator OB_GYRO_FS_125dps

125 degrees per second

enumerator OB_GYRO_FS_245dps

245 degrees per second

enumerator OB_GYRO_FS_250dps

250 degrees per second

enumerator OB_GYRO_FS_500dps

500 degrees per second

enumerator OB_GYRO_FS_1000dps

1000 degrees per second

enumerator OB_GYRO_FS_2000dps

2000 degrees per second

enum OBAccelFullScaleRange

Accelerometer range enumeration .

Values:

enumerator OB_ACCEL_FS_2g

1x the acceleration of gravity

enumerator OB_ACCEL_FS_4g

4x the acceleration of gravity

enumerator OB_ACCEL_FS_8g

8x the acceleration of gravity

enumerator OB_ACCEL_FS_16g

16x the acceleration of gravity

enum OBDeviceState

Device state enumeration .

Values:

enumerator OB_DEVICE_STATE_NULL

No status or LOG information update

enumerator OPEN_STREAM_OPERATION_ERROR

Open current exception

enumerator OB_DEVICE_STATE_INFO

LOG information update

enum OBDepthCroppingMode

Depth crop mode enumeration .

Values:

enumerator DEPTH_CROPPING_MODE_AUTO

automatic mode

enumerator DEPTH_CROPPING_MODE_CLOSE

close crop

enumerator DEPTH_CROPPING_MODE_OPEN

open crop

enum OBDeviceType

device type enumeration

Values:

enumerator OB_STRUCTURED_LIGHT_MONOCULAR_CAMERA

Monocular structured light camera

enumerator OB_STRUCTURED_LIGHT_BINOCULAR_CAMERA

Binocular structured light camera

enumerator OB_TOF_CAMERA

TOF camera

enum OBMediaType

record playback of the type of interest

Values:

enumerator OB_MEDIA_COLOR_STREAM

color stream

enumerator OB_MEDIA_DEPTH_STREAM

depth stream

enumerator OB_MEDIA_IR_STREAM

IR stream

enumerator OB_MEDIA_GYRO_STREAM

gyro stream

enumerator OB_MEDIA_ACCEL_STREAM

accel stream

enumerator OB_MEDIA_CAMERA_PARAM

camera parameter

enumerator OB_MEDIA_DEVICE_INFO

device information

enumerator OB_MEDIA_STREAM_INFO

stream information

enumerator OB_MEDIA_ALL

All media data types

enum OBMediaState

Record playback status .

Values:

enumerator OB_MEDIA_BEGIN

begin

enumerator OB_MEDIA_PAUSE

pause

enumerator OB_MEDIA_RESUME

resume

enumerator OB_MEDIA_END

end

enum OBDepthPrecisionLevel

depth accuracy class

Values:

enumerator OB_PRECISION_1MM

1mm

enumerator OB_PRECISION_0MM8

0.8mm

enumerator OB_PRECISION_0MM4

0.4mm

enumerator OB_PRECISION_0MM1

0.1mm

enumerator OB_PRECISION_COUNT
enum OBTofFilterRange

tof filter scene range

Values:

enumerator OB_TOF_FILTER_RANGE_CLOSE

close range

enumerator OB_TOF_FILTER_RANGE_MIDDLE

middle range

enumerator OB_TOF_FILTER_RANGE_LONG

long range

enumerator OB_TOF_FILTER_RANGE_DEBUG

debug range

enum OBSyncMode

Multi-device sync mode .

Values:

enumerator OB_SYNC_STOP

turn off sync

enumerator OB_SYNC_SINGLE_MODE

single device mode

enumerator OB_SYNC_ONLINE_HOST_MODE

The single device mode is also the host mode, which is dominated by ir

enumerator OB_SYNC_ONLINE_SLAVE_MODE

slave mode (ext_in –> rgb、tof、ext_out)

enumerator OB_SYNC_ONLY_MCU_MODE

MCU as host mode

enumerator OB_SYNC_ONLY_IR_MODE

IR as host mode

enum OBPropertyID

Enumeration value describing all attribute control commands of the device .

Values:

enumerator OB_PROP_LDP_BOOL

LDP switch

enumerator OB_PROP_LASER_BOOL

Laser switch

enumerator OB_PROP_LASER_PULSE_WIDTH_INT

Read and write laser Time value (pulse width)

enumerator OB_PROP_LASER_CURRENT_FLOAT

Laser current

enumerator OB_PROP_FLOOD_BOOL

IR flood switch

enumerator OB_PROP_FLOOD_LEVEL_INT

IR flood level

enumerator OB_PROP_DEPTH_MIRROR_BOOL

Depth mirror

enumerator OB_PROP_DEPTH_FLIP_BOOL

Depth flip

enumerator OB_PROP_DEPTH_POSTFILTER_BOOL

Depth Postfilter

enumerator OB_PROP_DEPTH_HOLEFILTER_BOOL

Depth Holefilter

enumerator OB_PROP_IR_MIRROR_BOOL

IR mirror

enumerator OB_PROP_IR_FLIP_BOOL

IR flip

enumerator OB_PROP_MIN_DEPTH_INT

Minimum depth threshold

enumerator OB_PROP_MAX_DEPTH_INT

Maximum depth threshold

enumerator OB_PROP_DEPTH_SOFT_FILTER_BOOL

Software filter switch

enumerator OB_PROP_LDP_STATUS_BOOL

LDP status

enumerator OB_PROP_DEPTH_MAX_DIFF_INT

soft filter maxdiff param

enumerator OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT

soft filter maxSpeckleSize

enumerator OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL

Hardware d2c is on

enumerator OB_PROP_TIMESTAMP_OFFSET_INT

Timestamp adjustment

enumerator OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL

Hardware distortion switch Rectify

enumerator OB_PROP_FAN_WORK_MODE_INT

Fan mode switch

enumerator OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT

Multi-resolution D2C mode

enumerator OB_PROP_ANTI_COLLUSION_ACTIVATION_STATUS_BOOL

Anti_collusion activation status

enumerator OB_PROP_DEPTH_PRECISION_LEVEL_INT

The depth precision level, which may change the depth frame data unit, needs to be confirmed through the ValueScale interface of DepthFrame

enumerator OB_PROP_TOF_FILTER_RANGE_INT

tof filter range configuration

enumerator OB_PROP_LASER_MODE_INT

laser mode, the firmware terminal currently only returns 1: IR Drive, 2: Torch

enumerator OB_PROP_RECTIFY2_BOOL

brt2r-rectify function switch (brt2r is a special module on mx6600), 0: Disable, 1: Rectify Enable

enumerator OB_PROP_COLOR_MIRROR_BOOL

Color mirror

enumerator OB_PROP_COLOR_FLIP_BOOL

Color flip

enumerator OB_PROP_INDICATOR_LIGHT_BOOL

Indicator switch, 0: Disable, 1: Enable

enumerator OB_PROP_DISPARITY_TO_DEPTH_BOOL

Disparity to depth switch, 0: off, the depth stream outputs the disparity map; 1. On, the depth stream outputs the depth map.

enumerator OB_PROP_BRT_BOOL

BRT function switch (anti-background interference), 0: Disable, 1: Enable

enumerator OB_PROP_WATCHDOG_BOOL

Watchdog function switch, 0: Disable, 1: Enable

enumerator OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL

External signal trigger restart function switch, 0: Disable, 1: Enable

enumerator OB_PROP_HEARTBEAT_BOOL

Heartbeat monitoring function switch, 0: Disable, 1: Enable

enumerator OB_PROP_DEPTH_CROPPING_MODE_INT

Depth cropping mode device: OB_DEPTH_CROPPING_MODE

enumerator OB_PROP_D2C_PREPROCESS_BOOL

D2C preprocessing switch (such as RGB cropping), 0: off, 1: on

enumerator OB_PROP_RGB_CUSTOM_CROP_BOOL

Custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued

enumerator OB_PROP_DEVICE_WORK_MODE_INT

Device operating mode (power consumption)

enumerator OB_STRUCT_BASELINE_CALIBRATION_PARAM

Baseline calibration parameters

enumerator OB_STRUCT_DEVICE_TEMPERATURE

Device temperature information

enumerator OB_STRUCT_TOF_EXPOSURE_THRESHOLD_CONTROL

TOF exposure threshold range

enumerator OB_STRUCT_DEVICE_SERIAL_NUMBER

get/set serial number

enumerator OB_STRUCT_DEVICE_TIME

get/set device time

enumerator OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG

Multi-device synchronization mode and parameter configuration

enumerator OB_STRUCT_RGB_CROP_ROI

RGB cropping ROI

enumerator OB_PROP_COLOR_AUTO_EXPOSURE_BOOL

Color camera auto exposure

enumerator OB_PROP_COLOR_EXPOSURE_INT

Color camera exposure adjustment

enumerator OB_PROP_COLOR_GAIN_INT

Color camera gain adjustment

enumerator OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL

Color camera automatic white balance

enumerator OB_PROP_COLOR_WHITE_BALANCE_INT

Color camera white balance adjustment

enumerator OB_PROP_COLOR_BRIGHTNESS_INT

Color camera brightness adjustment

enumerator OB_PROP_COLOR_SHARPNESS_INT

Color camera sharpness adjustment

enumerator OB_PROP_COLOR_SATURATION_INT

Color camera saturation adjustment

enumerator OB_PROP_COLOR_CONTRAST_INT

Color camera contrast adjustment

enumerator OB_PROP_COLOR_GAMMA_INT

Color camera gamma adjustment

enumerator OB_PROP_COLOR_ROLL_INT

Color camera image rotation

enumerator OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT

Color camera auto exposure priority

enumerator OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT

Color camera brightness compensation

enumerator OB_PROP_COLOR_HUE_INT

color camera color tint

enumerator OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT

Color Camera Power Line Frequency

enumerator OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL

Automatic exposure of depth camera (infrared camera will be set synchronously under some models of devices)

enumerator OB_PROP_DEPTH_EXPOSURE_INT

Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of devices)

enumerator OB_PROP_DEPTH_GAIN_INT

Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices)

enumerator OB_PROP_IR_AUTO_EXPOSURE_BOOL

Infrared camera auto exposure (depth camera will be set synchronously under some models of devices)

enumerator OB_PROP_IR_EXPOSURE_INT

Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously)

enumerator OB_PROP_IR_GAIN_INT

Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices)

enumerator OB_PROP_SDK_DISPARITY_TO_DEPTH_BOOL

视差转深度

enumerator OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL

Depth数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式)

enumerator OB_PROP_SDK_IR_FRAME_UNPACK_BOOL

Ir数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式)

enumerator OB_STRUCT_DEBUG_SENSOR_EXPOSURE_TIME

LDP status

enum OBPropertyType

The data type used to describe all property settings .

Values:

enumerator OB_BOOL_PROPERTY

Bool property

enumerator OB_INT_PROPERTY

int property

enumerator OB_FLOAT_PROPERTY

float property

enumerator OB_STRUCT_PROPERTY

struct property

Typedefs

typedef struct ContextImpl ob_context
typedef struct DeviceImpl ob_device
typedef struct DeviceInfoImpl ob_device_info
typedef struct DeviceListImpl ob_device_list
typedef struct CameraParamListImpl ob_camera_param_list
typedef struct SensorImpl ob_sensor
typedef struct SensorListImpl ob_sensor_list
typedef struct StreamProfileImpl ob_stream_profile
typedef struct StreamProfileListImpl ob_stream_profile_list
typedef struct FrameImpl ob_frame
typedef struct FilterImpl ob_filter
typedef struct PipelineImpl ob_pipeline
typedef struct ConfigImpl ob_config
typedef struct RecorderImpl ob_recorder
typedef struct PlaybackImpl ob_playback
typedef enum OBPermissionType ob_permission_type
typedef enum OBStatus ob_status
typedef enum OBLogSeverity ob_log_severity
typedef enum OBLogSeverity DEVICE_LOG_SEVERITY_LEVEL
typedef enum OBLogSeverity OBDeviceLogSeverityLevel
typedef enum OBLogSeverity ob_device_log_severity_level
typedef enum OBExceptionType ob_exception_type
typedef struct ob_error ob_error

The error class exposed by the SDK, users can get detailed error information according to the erro .

typedef enum OBSensorType ob_sensor_type
typedef enum OBStreamType ob_stream_type
typedef enum OBFrameType ob_frame_type
typedef enum OBFormat ob_format
typedef enum OBUpgradeState ob_upgrade_state
typedef enum OBFileTranState ob_file_tran_state
typedef enum OBDataTranState ob_data_tran_state
typedef struct OBDataChunk ob_data_chunk
typedef struct OBIntPropertyRange ob_int_property_range
typedef struct OBFloatPropertyRange ob_float_property_range
typedef struct OBBoolPropertyRange ob_bool_property_range
typedef struct OBCameraIntrinsic ob_camera_intrinsic
typedef struct OBCameraDistortion ob_camera_distortion
typedef struct OBD2CTransform ob_d2c_transform
typedef struct OBCameraParam ob_camera_param
typedef enum OBAlignMode ob_align_mode
typedef struct OBRect ob_rect
typedef enum OBConvertFormat ob_convert_format
typedef enum OBGyroSampleRate ob_gyro_sample_rate
typedef enum OBGyroSampleRate OBAccelSampleRate
typedef enum OBGyroSampleRate ob_accel_sample_rate
typedef enum OBGyroSampleRate OB_SAMPLE_RATE
typedef enum OBGyroFullScaleRange ob_gyro_full_scale_range
typedef enum OBGyroFullScaleRange OB_GYRO_FULL_SCALE_RANGE
typedef enum OBAccelFullScaleRange ob_accel_full_scale_range
typedef enum OBAccelFullScaleRange OB_ACCEL_FULL_SCALE_RANGE
typedef struct OBAccelValue OBGyroValue
typedef struct OBAccelValue ob_accel_value
typedef struct OBAccelValue ob_gyro_value
typedef enum OBDeviceState ob_device_state
typedef struct OBDeviceTemperature ob_device_temperature
typedef struct OBDeviceTemperature DEVICE_TEMPERATURE
typedef enum OBDepthCroppingMode ob_depth_cropping_mode
typedef enum OBDepthCroppingMode OB_DEPTH_CROPPING_MODE
typedef enum OBDeviceType ob_device_type
typedef enum OBDeviceType OB_DEVICE_TYPE
typedef enum OBMediaType ob_media_type
typedef enum OBMediaType OB_MEDIA_TYPE
typedef enum OBMediaState ob_media_state
typedef enum OBMediaState OB_MEDIA_STATE_EM
typedef enum OBDepthPrecisionLevel ob_depth_precision_level
typedef enum OBDepthPrecisionLevel OB_DEPTH_PRECISION_LEVEL
typedef enum OBTofFilterRange ob_tof_filter_range
typedef enum OBTofFilterRange TOF_FILTER_RANGE
typedef struct OBPoint ob_point
typedef struct OBColorPoint ob_color_point
typedef enum OBSyncMode ob_sync_mode
typedef enum OBSyncMode OB_SYNC_MODE
typedef struct OBTofExposureThresholdControl ob_tof_exposure_threshold_control
typedef struct OBTofExposureThresholdControl TOF_EXPOSURE_THRESHOLD_CONTROL
typedef struct OBMultiDeviceSyncConfig ob_multi_device_sync_config
typedef struct OBMultiDeviceSyncConfig OB_MULTI_DEVICE_SYNC_CONFIG
typedef void (*ob_file_send_callback)(ob_file_tran_state state, const char *message, uint8_t percent, void *user_data)

file transfer callback

typedef void (*ob_device_upgrade_callback)(ob_upgrade_state state, const char *message, uint8_t percent, void *user_data)

Firmware upgrade callback.

typedef void (*ob_device_state_callback)(ob_device_state state, const char *message, void *user_data)

device status callback

typedef void (*ob_set_data_callback)(ob_data_tran_state state, uint8_t percent, void *user_data)

Callback for writing data.

typedef void (*ob_get_data_callback)(ob_data_tran_state state, ob_data_chunk *dataChunk, void *user_data)

read data callback

typedef void (*ob_media_state_callback)(ob_media_state state, void *user_data)

Media status callbacks (recording and playback)

typedef void (*ob_device_changed_callback)(ob_device_list *removed, ob_device_list *added, void *user_data)

Device change (up and down) callback.

typedef void (*ob_frame_callback)(ob_frame *frame, void *user_data)

dataframe callback

typedef void (*ob_frameset_callback)(ob_frame *frameset, void *user_data)

dataframe collection callback

typedef enum OBPropertyID ob_property_id
typedef enum OBPropertyType OBPropertyType

The data type used to describe all property settings .

typedef enum OBPropertyType ob_property_type
typedef struct OBPropertyItem OBPropertyItem

Used to describe the characteristics of each property .

typedef struct OBPropertyItem ob_property_item

Functions

ob_context *ob_create_context(ob_error **error)

create context api

Parameters

error[out] record the error information

Returns

ob_context* return the context that created

ob_context *ob_create_context_with_config(const char *config_path, ob_error **error)

create context with config

Parameters
  • config_path[in] Configure the path of the file, and return null if the default path is used.

  • error[out] Log error messages

Returns

ob_context* returns the context

void ob_delete_context(ob_context *context, ob_error **error)

Delete context.

Parameters
  • context[in] The context to delete

  • error[out] Log error messages

ob_device_list *ob_query_device_list(ob_context *context, ob_error **error)

Get the list of enumerated devices.

Parameters
  • context[in] Context

  • error[out] Log error messages

Returns

ob_device_list* return device list object

void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)

Set device plug-in callback function.

void ob_enable_multi_device_sync(ob_context *context, uint64_t repeatInterval, ob_error **error)

Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs to support this function)

Parameters
  • context[in] Context

  • repeatInterval[in] synchronization time interval (unit: ms; if repeatInterval=0, itmeans that it will only be synchronized once and will not be executedregularly)

  • error[out] Log error messages

void ob_set_logger_severity(ob_log_severity severity, ob_error **error)

Set the global log level and this will affect both the log level output to the console and the log output to the file.

Parameters
  • severity[in] Output log level

  • error[out] Log error messages

void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error)

Set output log to file.

Parameters
  • severity[in] log level output to file

  • directory[in] The log file output path. 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)

  • error[out] Log error messages

void ob_set_logger_to_console(ob_log_severity severity, ob_error **error)

Set the output log to the console.

/**

Parameters
  • log[in] Log level

  • error[out] Log error messages

uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error)

Get the number of devices.

Parameters
  • list[in] Device list object

  • error[out] Log error messages

Returns

uint32_t returns the number of devices

const char *ob_device_list_get_device_name(ob_device_list *list, uint32_t index, ob_error **error)

Get device information.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

const char* returns device name

int ob_device_list_get_device_pid(ob_device_list *list, uint32_t index, ob_error **error)

Get the pid of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

int returns the device pid

int ob_device_list_get_device_vid(ob_device_list *list, uint32_t index, ob_error **error)

Get the vid of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

int return device vid

const char *ob_device_list_get_device_uid(ob_device_list *list, uint32_t index, ob_error **error)

Get the uid of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

const char* returns the device uid

const char *ob_device_list_get_device_serial_number(ob_device_list *list, uint32_t index, ob_error **error)

Get the serial number of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

const char* returns the device uid

ob_device *ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error)

Create device.

ob_device *ob_device_list_get_device_by_serial_number(ob_device_list *list, const char *serial_number, ob_error **error)

Create device.

ob_device *ob_device_list_get_device_by_uid(ob_device_list *list, const char *uid, ob_error **error)

Create device.

Attention

If the device has been acquired and created elsewhere, repeated acquisitions will return an error

Parameters
  • list[in] Device list object

  • index – Creat the uid of the device

  • error[out] Log error messages

Returns

ob_device* returns the created device

void ob_delete_device(ob_device *device, ob_error **error)

Delete device.

Parameters
  • device[in] Device to be deleted

  • error[out] Log error messages

void ob_delete_device_info(ob_device_info *info, ob_error **error)

Delete device information.

Parameters
  • info[in] Device information to be deleted

  • error[out] Log error messages

void ob_delete_device_list(ob_device_list *list, ob_error **error)

Delete device list.

Parameters
  • list[in] Device list object to be deleted

  • error[out] Log error messages

ob_device_info *ob_device_get_device_info(ob_device *device, ob_error **error)

Get device information.

Parameters
  • device[in] Device to obtain information

  • error[out] Log error messages

Returns

ob_device_info* returns device information

ob_sensor_list *ob_device_get_sensor_list(ob_device *device, ob_error **error)

List all sensors.

Parameters
  • device[in] Device object

  • error[out] Log error messages

Returns

ob_sensor_list* returns the list of all sensors

ob_sensor *ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error)

Get the device’s sensors.

Parameters
  • device[in] Device object

  • type[in] Type of sensor to get

  • error[out] Log error messages

Returns

ob_sensor* returns the acquired sensor

void ob_device_set_int_property(ob_device *device, ob_property_id property_id, int32_t property, ob_error **error)

Set int type of device property.

Parameters
  • device[in] Device object

  • property_id[in] The id of the property to be set

  • property[in] Property value to be set

  • error[out] Log error messages

int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error)

Get int type of device property.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • error[out] Log error messages

Returns

int32_t returns the property value

void ob_device_set_float_property(ob_device *device, ob_property_id property_id, float property, ob_error **error)

Set float type of device property.

Parameters
  • device[in] Device object

  • property_id[in] The id of the property to be set

  • property[in] Property value to be set

  • error[out] Log error messages

float ob_device_get_float_property(ob_device *device, ob_property_id property_id, ob_error **error)

Get float type of device property.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • error[out] Log error messages

Returns

int32_t returns the property value

void ob_device_set_bool_property(ob_device *device, ob_property_id property_id, bool property, ob_error **error)

Set bool type of device property.

Parameters
  • device[in] Device object

  • property_id[in] The id of the property to be set

  • property[in] Property value to be set

  • error[out] Log error messages

bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error)

Get bool type of device property.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • error[out] Log error messages

Returns

bool returns the property value

void ob_device_set_structured_data(ob_device *device, ob_property_id property_id, const void *data, uint32_t data_size, ob_error **error)

Set structured type.

Parameters
  • device[in] Device object

  • property_id[in] The id of the property to be set

  • data[in] Property data to be set

  • data_size[in] The size of the property to be set

  • error[out] Log error messages

void ob_device_get_structured_data(ob_device *device, ob_property_id property_id, void *data, uint32_t *data_size, ob_error **error)

Get structured type.

Parameters
  • device[in] Device object

  • property_id[in] Id of the property

  • data[out] Property data obtained

  • data_size[out] Get the size of the property

  • error[out] Log error messages

void ob_device_set_raw_data(ob_device *device, ob_property_id property_id, void *data, uint32_t data_size, ob_set_data_callback cb, bool async, void *user_data, ob_error **error)

Set raw data type of device property.

Parameters
  • device[in] Device object

  • property_id[in] The id of the property to be set

  • data[in] Property data to be set

  • data_size[in] The size of the property to be set

  • cb[in] Set data callback

  • async[in] Whether to execute asynchronously

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

void ob_device_get_raw_data(ob_device *device, ob_property_id property_id, ob_get_data_callback cb, bool async, void *user_data, ob_error **error)

Get raw data type of device property.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • cb[in] Get data callback

  • async[in] Whether to execute asynchronously

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

uint32_t ob_device_get_supported_property_count(ob_device *device, ob_error **error)

Get supported device properties count.

Parameters
  • device[in] Device object

  • error[out] Log error messages

Returns

uint32_t returns the number of properties supported by the device

ob_property_item ob_device_get_supported_property(ob_device *device, uint32_t index, ob_error **error)

Get supported device properties.

Parameters
  • device[in] Device object

  • index[in] Property index

  • error[out] Log error messages

Returns

ob_global_unified_property_item returns the type of property supported by the device

bool ob_device_is_property_supported(ob_device *device, ob_property_id property_id, ob_permission_type permission, ob_error **error)

Check if device property permission is supported.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • permission[in] The type of permission that needs to be interpreted

  • error[out] Log error messages

Returns

bool returns whether it is supported

ob_int_property_range ob_device_get_int_property_range(ob_device *device, ob_property_id property_id, ob_error **error)

Get int type of device property range.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • error[out] Log error messages

Returns

ob_int_property_range returns the property range

ob_float_property_range ob_device_get_float_property_range(ob_device *device, ob_property_id property_id, ob_error **error)

Get float type of device property range.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • error[out] Log error messages

Returns

ob_float_property_range returns the property range

ob_bool_property_range ob_device_get_bool_property_range(ob_device *device, ob_property_id property_id, ob_error **error)

Get the bool type of device property range.

Parameters
  • device[in] Device object

  • property_id[in] Property id

  • error[out] Log error messages

Returns

ob_bool_property_range returns the property range

void ob_device_write_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)

ahb write register

Parameters
  • device[in] Device object

  • reg – Register to be written

  • mask – Mask

  • value – The value to be written

  • error[out] Log error messages

void ob_device_read_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)

Read ahb register.

Parameters
  • device[in] Device object

  • reg – Register to be read

  • mask – Mask

  • value – The value to be read

  • error[out] Log error messages

void ob_device_write_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)

Write i2c register.

Parameters
  • device[in] Device object

  • module_id – I2c module id to be written

  • reg – Register to be written

  • mask – Mask

  • value – The value to be written

  • error[out] Log error messages

void ob_device_read_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)

Read i2c register.

Parameters
  • device[in] Device object

  • module_id – The id of the i2c module to be read

  • reg – Register to be read

  • mask – Mask

  • value – The value to be read

  • error[out] Log error messages

void ob_device_write_flash(ob_device *device, uint32_t offset, const void *data, uint32_t data_size, ob_set_data_callback cb, bool async, void *user_data, ob_error **error)

Set the properties of writing to Flash [Asynchronous Callback].

Parameters
  • device[in] Device object

  • offset – flash offset address

  • data – Property data to be written

  • data_size – The size of the property to be written

  • cb – Set data callback

  • async[in] Whether to execute asynchronously

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

void ob_device_read_flash(ob_device *device, uint32_t offset, uint32_t data_size, ob_get_data_callback cb, bool async, void *user_data, ob_error **error)

Read Flash properties [asynchronous callback].

Parameters
  • device[in] Device object

  • offset – flash offset address

  • data_size – The size of the data to be read

  • cb – Read flash data and progress callback

  • async[in] Whether to execute asynchronously

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

uint64_t ob_device_sync_device_time(ob_device *device, ob_error **error)

Synchronize the device time (time to the device, synchronize the local system time to the device)

Parameters
  • device[in] Device object

  • uint64_t[out] Command round trip time (rtt)

  • error[out] Log error messages

void ob_device_upgrade(ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error)

Device firmware upgrade.

Parameters
  • device[in] Device object

  • pathFirmware[in] path

  • callback[in] Firmware upgrade progress callback

  • async[in] Whether to execute asynchronously

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

ob_device_state ob_device_get_device_state(ob_device *device, ob_error **error)

Get current device status.

void ob_device_state_changed(ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error)

Monitor device state change.

Parameters
  • device[in] Device object

  • callback[in] Callback when the device status changes

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

void ob_device_send_file_to_destination(ob_device *device, const char *file_path, const char *dst_path, ob_file_send_callback callback, bool async, void *user_data, ob_error **error)

Send files to the specified path of the device.

Parameters
  • device[in] Device object

  • file_path[in] Source file path

  • dst_path[in] Specify the device-side file acceptance path

  • callback[in] File sending progress callback

  • async[in] Whether to execute asynchronously

  • user_data[in] User-defined data will be returned in the callback

  • error[out] Log error messages

bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error)

Verify device authorization code.

Parameters
  • device[in] Device object

  • auth_code[in] Authorization code

  • error[out] Log error messages

Returns

bool whether the activation is successful

void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error)

Write device authorization code.

Parameters
  • device[in] Device object

  • auth_code[in] Authorization code

  • error[out] Log error messages

ob_camera_param_list *ob_device_get_calibration_camera_param_list(ob_device *device, ob_error **error)

Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current open-stream configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface.

void ob_device_reboot(ob_device *device, ob_error **error)

Device reboot.

const char *ob_device_info_name(ob_device_info *info, ob_error **error)

Get device name.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* returns the device name

int ob_device_info_pid(ob_device_info *info, ob_error **error)

Get device pid.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

int returns the device pid

int ob_device_info_vid(ob_device_info *info, ob_error **error)

Get device vid.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

int returns device vid

const char *ob_device_info_uid(ob_device_info *info, ob_error **error)

Get device uid.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* returns device uid

const char *ob_device_info_serial_number(ob_device_info *info, ob_error **error)

Get device serial number.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* returns device serial number

const char *ob_device_info_firmware_version(ob_device_info *info, ob_error **error)

Get the firmware version number.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

int returns the firmware version number

const char *ob_device_info_usb_type(ob_device_info *info, ob_error **error)

Get usb connection type (DEPRECATED)

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

char* returns usb connection type

const char *ob_device_info_connection_type(ob_device_info *info, ob_error **error)

Get device connection type.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

char* returns connection type

const char *ob_device_info_hardware_version(ob_device_info *info, ob_error **error)

Get hardware version number.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* returns hardware version number

const char *ob_device_info_supported_min_sdk_version(ob_device_info *info, ob_error **error)

Get the minimum SDK version number supported by the device.

const char *ob_device_info_asicName(ob_device_info *info, ob_error **error)

Get chip name.

ob_device_type ob_device_info_device_type(ob_device_info *info, ob_error **error)

Get device type.

uint32_t ob_camera_param_list_count(ob_camera_param_list *param_list, ob_error **error)

Get the number of camera parameter lists.

Parameters
  • param_list – Camera parameter list

  • error – Log error messages

Returns

uint32_t returns the number of lists

ob_camera_param ob_camera_param_list_get_param(ob_camera_param_list *param_list, uint32_t index, ob_error **error)

Get camera parameters from camera parameter list.

Parameters
  • param_list – Camera parameter list

  • index – Parameter index

  • error – Log error messages

Returns

ob_camera_param returns the camera parameters. Since it returns the structure object directly, there is no need to provide a delete interface.

void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error)

Delete camera parameter list.

Parameters
  • param_list – Camera parameter list

  • error – Log error messages

ob_status ob_error_status(ob_error *error)

Get error status.

Parameters

error[in] Error object

Returns

ob_status returns error status

const char *ob_error_message(ob_error *error)

Get error information.

Parameters

error[in] Error object

Returns

const char* returns an error message

const char *ob_error_function(ob_error *error)

Get error API function name.

Parameters

error[in] Error object

Returns

const char* returns error function

const char *ob_error_args(ob_error *error)

Get error parameters.

Parameters

error[in] Error object

Returns

const char* returns the error parameter

ob_exception_type ob_error_exception_type(ob_error *error)

Get error exception type.

Parameters

error[in] Error object

Returns

ob_exception_type returns the error exception type

void ob_delete_error(ob_error *error)

Delete the error object.

Parameters

error[in] The error object to delete

ob_filter *ob_create_pointcloud_filter(ob_error **error)

Create PointCloud Filter.

Parameters

error[out] Log error messages

Returns

filter pointcloud_filter object

void ob_pointcloud_filter_set_camera_param(ob_filter *filter, ob_camera_param param, ob_error **error)

PointCloud Filter device camera parameters.

Parameters
  • filter[in] pointcloud_filter object

  • param[in] Camera parameters

  • error[out] Log error messages

void ob_pointcloud_filter_set_point_format(ob_filter *filter, ob_format type, ob_error **error)

Set point cloud type parameters.

Parameters
  • filter[in] pointcloud_filter object

  • type[in] Point cloud type: depth point cloud or RGBD point cloud

  • error[out] Log error messages

void ob_pointcloud_filter_set_frame_align_state(ob_filter *filter, bool state, ob_error **error)

Set the alignment state of the frames that will be input to produce the point cloud.

ob_filter *ob_create_format_convert_filter(ob_error **error)

Create FormatConvet Filter.

Parameters

error[out] Log error messages

Returns

filter format_convert object

void ob_format_convert_filter_set_format(ob_filter *filter, ob_convert_format type, ob_error **error)

Set the type of format conversion.

Parameters
  • filter[in] formatconvet_filter object

  • type[in] Format conversion type

  • error[out] Log error messages

void ob_filter_reset(ob_filter *filter, ob_error **error)

Filter reset, cache clear, state reset. If the asynchronous interface is used, the processing thread will also be stopped and the pending cache frames will be cleared.

Parameters
  • filter[in] filter object

  • error[out] Log error messages

ob_frame *ob_filter_process(ob_filter *filter, ob_frame *frame, ob_error **error)

Filter processing (synchronous interface)

Parameters
  • filter[in] filter object

  • frame[in] pointer to the frame object to be processed

  • error[out] Log error messages

Returns

ob_frame The frame object processed by the filter

void ob_filter_set_callback(ob_filter *filter, ob_filter_callback callback, void *user_data, ob_error **error)

Filter Set the processing result callback function (asynchronous callback interface)

Parameters
  • filter[in] filter object

  • callback[in]

  • user_data[in] Arbitrary user data pointer can be passed in and returned from the callback

  • error[out] Log error messages

void ob_filter_push_frame(ob_filter *filter, ob_frame *frame, ob_error **error)

filter Push the frame into the pending cache (asynchronous callback interface)

Parameters
  • filter[in] filter object

  • error[out] Log error messages

void ob_delete_filter(ob_filter *filter, ob_error **error)

Delete Filter.

Parameters
  • filter[in] filter object

  • error[out] Log error messages

uint64_t ob_frame_index(ob_frame *frame, ob_error **error)

Get the frame index.

Parameters
  • frame[in] Frame object

  • error[out] Log wrong message

Returns

uint64_t returns the frame index

ob_format ob_frame_format(ob_frame *frame, ob_error **error)

Get the frame format.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

ob_format returns the frame format

ob_frame_type ob_frame_get_type(ob_frame *frame, ob_error **error)

Get the frame type.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

ob_frame_type returns the frame type

uint64_t ob_frame_time_stamp(ob_frame *frame, ob_error **error)

Get frame time stamp (hardware)

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint64_t returns the frame hardware timestamp

uint64_t ob_frame_time_stamp_us(ob_frame *frame, ob_error **error)

Get frame time stamp (hardware) us.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint64_t returns the frame hardware timestamp, unit us

uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error)

Get frame time stamp (system)

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint64_t returns the frame system timestamp

void *ob_frame_data(ob_frame *frame, ob_error **error)

Get frame data.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

void* * returns frame data pointer

uint32_t ob_frame_data_size(ob_frame *frame, ob_error **error)

Get the frame data size.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint32_t returns the frame data size If it is point cloud data, it returns 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.

uint32_t ob_video_frame_width(ob_frame *frame, ob_error **error)

Get video frame width.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint32_t returns the frame width

uint32_t ob_video_frame_height(ob_frame *frame, ob_error **error)

Get video frame height.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint32_t returns the frame height

void *ob_video_frame_metadata(ob_frame *frame, ob_error **error)

Get the metadata of the frame.

Parameters
  • frame[in] Video frame object

  • error[out] Log error messages

Returns

void* returns the metadata pointer of the frame

uint32_t ob_video_frame_metadata_size(ob_frame *frame, ob_error **error)

Get the metadata size of the frame.

Parameters
  • frame[in] Video frame object

  • error[out] Log error messages

Returns

uint32_t returns the metadata size of the frame

uint8_t ob_video_frame_pixel_available_bit_size(ob_frame *frame, ob_error **error)

Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0)

float ob_depth_frame_get_value_scale(ob_frame *frame, ob_error **error)

Get the value scale of the depth frame, the unit is mm/step, such as valueScale=0.1, and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm。

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

float value scale

void ob_delete_frame(ob_frame *frame, ob_error **error)

Delete frame.

Parameters
  • frame[in] The frame object to delete

  • error[out] Log error messages

uint32_t ob_frameset_frame_count(ob_frame *frameset, ob_error **error)

Get the number of frames contained in the frameset.

Parameters
  • frameset[in] frameset object

  • error[out] Log error messages

Returns

uint32_t returns the number of frames

ob_frame *ob_frameset_depth_frame(ob_frame *frameset, ob_error **error)

Get the depth frame from the frameset.

Parameters
  • frameset[in] Frameset object

  • error[out] Log error messages

Returns

ob_frame* returns the depth frame

ob_frame *ob_frameset_color_frame(ob_frame *frameset, ob_error **error)

Get the color frame from the frameset.

Parameters
  • frameset[in] Frameset object

  • error[out] Log error messages

Returns

ob_frame* returns the color frame

ob_frame *ob_frameset_ir_frame(ob_frame *frameset, ob_error **error)

Get the infrared frame from the frameset.

Parameters
  • frameset[in] Frameset object

  • error[out] Log error messages

Returns

ob_frame* returns the infrared frame

ob_frame *ob_frameset_points_frame(ob_frame *frameset, ob_error **error)

Get point cloud data from the frameset.

Parameters
  • frameset[in] Frameset object

  • error[out] Log error messages

Returns

ob_frame* returns the point cloud frame

ob_accel_value ob_accel_frame_value(ob_frame *frame, ob_error **error)

Get accelerometer frame data.

Parameters
  • frame[in] Accelerometer frame

  • error[out] Log error messages

Returns

ob_accel_value accelerometer data

float ob_accel_frame_temperature(ob_frame *frame, ob_error **error)

Get the temperature when acquiring the accelerometer frame.

Parameters
  • frame[in] Accelerometer frame

  • error[out] Log error messages

Returns

float return value

ob_gyro_value ob_gyro_frame_value(ob_frame *frame, ob_error **error)

Get gyroscope frame data.

Parameters
  • frame[in] Gyro Frame

  • error[out] Log error messages

Returns

ob_gyro_value gyroscope data

float ob_gyro_frame_temperature(ob_frame *frame, ob_error **error)

Get the temperature when acquiring the gyroscope frame.

Parameters
  • frame[in] Accelerometer frame

  • error[out] Log error messages

Returns

float return value

ob_pipeline *ob_create_pipeline(ob_error **error)

Create a pipeline object.

Parameters

error[out] Log error messages

Returns

ob_pipeline* returns the pipeline object

ob_pipeline *ob_create_pipeline_with_device(ob_device *dev, ob_error **error)

Using device objects to create pipeline objects.

Parameters
  • dev[in] Device object used to create pipeline

  • error[out] Log error messages

Returns

ob_pipeline* returns the pipeline object

ob_pipeline *ob_create_pipeline_with_playback_file(const char *file_name, ob_error **error)

Use the playback file to create a pipeline object.

Parameters
  • file_name[in] The playback file path used to create the pipeline

  • error[out] Log error messages

Returns

ob_pipeline* returns the pipeline object

void ob_delete_pipeline(ob_pipeline *pipeline, ob_error **error)

Delete pipeline objects.

Parameters
  • pipeline[in] The pipeline object to be deleted

  • error[out] Log error messages

void ob_pipeline_start(ob_pipeline *pipeline, ob_error **error)

Start the pipeline with default parameters.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

void ob_pipeline_start_with_config(ob_pipeline *pipeline, ob_config *config, ob_error **error)

Start the pipeline with configuration parameters.

Parameters
  • pipeline[in] pipeline object

  • config[in] Parameters to be configured

  • error[out] Log error messages

void ob_pipeline_start_with_callback(ob_pipeline *pipeline, ob_config *config, ob_frameset_callback callback, void *user_data, ob_error **error)

Start the pipeline and set the frame collection data callback.

Parameters
  • pipeline[in] pipeline object

  • config[in] Parameters to be configured

  • callback[in] Trigger a callback when all frame data in the frame set arrives

  • user_data[in] Pass in any user data and get it from the callback

  • error[out] Log error messages

void ob_pipeline_stop(ob_pipeline *pipeline, ob_error **error)

Stop pipeline.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

ob_config *ob_pipeline_get_config(ob_pipeline *pipeline, ob_error **error)

Get current pipeline parameters.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

Returns

ob_config* returns pipeline parameters

ob_frame *ob_pipeline_wait_for_frameset(ob_pipeline *pipeline, uint32_t timeout_ms, ob_error **error)

Waiting for the return of a set of frames in the form of synchronous blocking.

Parameters
  • pipeline[in] pipeline object

  • timeout_ms[in] Waiting timeout (ms)

  • error[out] Log error messages

Returns

ob_frame* returns the waiting frameset, frameset is a special frame, you can use the frameset related interface to obtain the independent frame in the set

ob_device *ob_pipeline_get_device(ob_pipeline *pipeline, ob_error **error)

Get device from the pipeline.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

Returns

ob_device* returns the device object

ob_playback *ob_pipeline_get_playback(ob_pipeline *pipeline, ob_error **error)

Get playback object from pipeline.

Parameters
  • pipeline[in] pipeline objet

  • error[out] Log error messages

Returns

ob_playback* returns the playback object

ob_stream_profile_list *ob_pipeline_get_stream_profile_list(ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error)

Get stream profile from the pipeline.

Parameters
  • pipeline[in] pipeline object

  • sensor_type[in] sensor type, the sensor_type type supported by the camera can be obtained through the ob_device_get_sensor_list() interface

  • profile_count[out] The number of stream configurations obtained

  • error[out] Log error messages

Returns

ob_stream_profile_list* returns to the stream profile list

void ob_pipeline_enable_frame_sync(ob_pipeline *pipeline, ob_error **error)

Enable frame synchronization.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

void ob_pipeline_disable_frame_sync(ob_pipeline *pipeline, ob_error **error)

Disable frame synchronization.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

void ob_pipeline_switch_config(ob_pipeline *pipeline, ob_config *config, ob_error **error)

Dynamically switch the corresponding config configuration.

Parameters
  • pipeline[in] pipeline object

  • config[in] pipeline configuration

  • error[out] Log error messages

ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **error)

Get current camera parameters.

ob_stream_profile_list *ob_get_d2c_depth_profile_list(ob_pipeline *pipeline, ob_stream_profile *color_profile, ob_align_mode align_mode, ob_error **error)

Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution.

Parameters
  • pipeline[in] pipeline object

  • color_profile[in] Input resolution of Color Sensor

  • align_mode[in] Input align mode

  • error[out] Log error messages

Returns

ob_stream_profile_list*

ob_rect ob_get_d2c_valid_area(ob_pipeline *pipeline, uint32_t distance, ob_error **error)

Get valid area after D2C.

Parameters
  • pipeline[in] pipeline object

  • distance[in] working distance

  • error[out] Log error messages

Returns

ob_rect returns the area information valid after D2C at working distance

void ob_pipeline_start_record(ob_pipeline *pipeline, const char *file_name, ob_error **error)

Start recording.

Parameters
  • pipeline[in] pipeline object

  • file_name[in] Recorded file path

  • error[out] Log error messages

void ob_pipeline_stop_record(ob_pipeline *pipeline, ob_error **error)

Turn off recording.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

ob_config *ob_create_config(ob_error **error)

Create the pipeline configuration.

Parameters

error[out] Log error messages

Returns

ob_config* returns the configuration object

void ob_delete_config(ob_config *config, ob_error **error)

Delete the pipeline configuration.

Parameters
  • config[in] Configuration to be deleted

  • error[out] Log error messages

void ob_config_enable_stream(ob_config *config, ob_stream_profile *profile, ob_error **error)

Configure the stream to be enabled.

Parameters
  • config[in] Configuration of pipeline

  • profile[in] The configuration of the stream to be opened

  • error[out] Log error messages

void ob_config_enable_all_stream(ob_config *config, ob_error **error)

Configure all streams to be enabled.

Parameters
  • config[in] Configuration of pipeline

  • error[out] Log error messages

void ob_config_disable_stream(ob_config *config, ob_stream_type type, ob_error **error)

Configure the stream to be disabled.

Parameters
  • config[in] Configuration of pipeline

  • profile[in] The configuration of the stream to be closed

  • error[out] Log error messages

void ob_config_disable_all_stream(ob_config *config, ob_error **error)

Configure all streams to be disabled.

Parameters
  • config[in] Configuration of pipeline

  • error[out] Log error messages

void ob_config_set_align_mode(ob_config *config, ob_align_mode mode, ob_error **error)

Set the alignment mode.

Parameters
  • config[in] config object

  • mode[in] alignment mode

  • error[out] Log error messages

ob_recorder *ob_create_recorder(ob_error **error)

Create a recorder for data recording.

Parameters

error[out] log error messages

Returns

ob_recorder* returns the recorder object

ob_recorder *ob_create_recorder_with_device(ob_device *dev, ob_error **error)

Create a recorder for data recording.

Parameters
  • dev – The device object used to create the recorder

  • error[out] log error messages

Returns

ob_recorder* returns the recorder object

void ob_delete_recorder(ob_recorder *recorder, ob_error **error)

delete recorder object

Parameters
  • recorder – recorder object

  • error[out] log error messages

void ob_recorder_start(ob_recorder *recorder, const char *filename, bool async, ob_error **error)

start recording

Parameters
  • recorder[in] recorder object

  • filename[in] Recorded file name

  • async[in] Whether to record asynchronously

  • error[out] log error messages

void ob_recorder_stop(ob_recorder *recorder, ob_error **error)

stop recording

Parameters
  • recorder[in] recorder object

  • error[out] log error messages

void ob_recorder_write_frame(ob_recorder *recorder, ob_frame *frame, ob_error **error)

Write frame data to the recorder.

Parameters
  • recorder[in] recorder object

  • frame[in] Write frame data

  • error[out] log error messages

ob_playback *ob_create_playback(const char *filename, ob_error **error)

Create playback object.

void ob_delete_playback(ob_playback *playback, ob_error **error)

delete playback object

Parameters
  • playback[in] playback object

  • error[out] log error messages

void ob_playback_start(ob_playback *playback, ob_playback_callback callback, void *user_data, ob_media_type type, ob_error **error)

Start playback, playback data is returned from the callback.

Parameters
  • playback[in] playback object

  • callback[in] Callback for playback data

  • user_data[in] User data

  • type[in] Type of playback data

  • error[out] log error messages

void ob_playback_stop(ob_playback *playback, ob_error **error)

stop playback

Parameters
  • playback[in] playback object

  • error[out] log error messages

void ob_set_playback_state_callback(ob_playback *playback, ob_media_state_callback callback, void *user_data, ob_error **error)

Set playback state.

ob_device_info *ob_playback_get_device_info(ob_playback *playback, ob_error **error)

Get the device information in the recording file.

Parameters
  • playback[in] playback object

  • error[out] log error messages

Returns

ob_device_info* returns device information

ob_camera_param ob_playback_get_camera_param(ob_playback *playback, ob_error **error)

Get the intrinsic and extrinsic parameter information in the recording file.

Parameters
  • playback[in] playback object

  • error[out] log error messages

Returns

ob_camera_param returns internal and external parameter information

ob_sensor_type ob_sensor_get_type(ob_sensor *sensor, ob_error **error)

Get sensor type.

Parameters
  • sensor[in] Sensor object

  • error[out] Log error messages

Returns

ob_sensor_type returns the sensor type

ob_stream_profile_list *ob_sensor_get_stream_profile_list(ob_sensor *sensor, ob_error **error)

Get all supported stream profiles.

Parameters
  • sensor[in] Sensor object

  • error[out] Log error messages

Returns

ob_stream_profile** returns a list of stream profiles

void ob_sensor_start(ob_sensor *sensor, ob_stream_profile *profile, ob_frame_callback callback, void *user_data, ob_error **error)

Open the current sensor, and set the callback data frame.

Parameters
  • sensor[in] Sensor object

  • profile[in] Stream configuration information

  • callback[in] Callback function triggered when frame data arrives

  • user_data[in] pass in any user data and get it from the callback

  • error[out] Log error messages

void ob_sensor_stop(ob_sensor *sensor, ob_error **error)

Stop sensor stream.

Parameters
  • sensor[in] sensor object

  • error[out] Log error messages

void ob_sensor_switch_profile(ob_sensor *sensor, ob_stream_profile *profile, ob_error **error)

Dynamically switch resolutions.

Parameters
  • sensor[in] Sensor object

  • profile[in] Stream configuration information

  • error[out] Log error messages

void ob_delete_sensor_list(ob_sensor_list *sensor_list, ob_error **error)

Delete sensor object list.

Parameters
  • sensor_list[in] List of sensor objects to delete

  • error[out] Log error messages

uint32_t ob_sensor_list_get_sensor_count(ob_sensor_list *sensor_list, ob_error **error)

Get the number of sensors in the sensor list.

Parameters
  • sensor_list[in] List of sensor objects to delete

  • count[in] Number of sensors

  • error[out] Log error messages

ob_sensor_type ob_sensor_list_get_sensor_type(ob_sensor_list *sensor_list, uint32_t index, ob_error **error)

Get the sensor types.

Parameters

index – Sensor index

Returns

OBSensorType returns the Sensor type

ob_sensor *ob_sensor_list_get_sensor_by_type(ob_sensor_list *sensor_list, ob_sensor_type sensorType, ob_error **error)

Get sensor by sensor type.

/**

Parameters
  • sensor_list – Get the returned sensor list through device

  • sensorType – Sensor type to be obtained

Returns

Return the Sensor pointer, if the specified type of Sensor does not exist, it will return null

ob_sensor *ob_sensor_list_get_sensor(ob_sensor_list *sensor_list, uint32_t index, ob_error **error)

Get Sensor by index number.

Parameters
  • sensor_list – Get the returned sensor list through device

  • index – To create a device cable, the range is [0, count-1], if the index exceeds the range, an exception will be thrown

Returns

std::shared_ptr<Sensor> returns the Sensor object

void ob_delete_sensor(ob_sensor *sensor, ob_error **error)

Delete sensor object.

Parameters
  • sensor[in] The sensor object to delete

  • error[out] Log error messages

ob_format ob_stream_profile_format(ob_stream_profile *profile, ob_error **error)

Get stream profile format.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

Returns

ob_format returns the format of the stream

ob_stream_type ob_stream_profile_type(ob_stream_profile *profile, ob_error **error)

Get stream profile type.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

Returns

ob_stream_type stream type

uint32_t ob_video_stream_profile_fps(ob_stream_profile *profile, ob_error **error)

Get the frame rate of the video stream configuration.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

Returns

uint32_t returns the frame rate of the stream

uint32_t ob_video_stream_profile_width(ob_stream_profile *profile, ob_error **error)

Get the width of the video stream configuration.

Parameters
  • profile[in] Stream configuration object, if the configuration is not a video stream configuration, an error will be returned

  • error[out] Log error messages

Returns

uint32_t returns the width of the stream

uint32_t ob_video_stream_profile_height(ob_stream_profile *profile, ob_error **error)

Get the height of the video stream configuration.

Parameters
  • profile[in] Stream configuration object, if the configuration is not a video stream configuration, an error will be returned

  • error[out] Log error messages

Returns

uint32_t returns the height of the stream

ob_accel_full_scale_range ob_accel_stream_profile_full_scale_range(ob_stream_profile *profile, ob_error **error)

Get scale range of accelerometer stream.

Parameters
  • profile[in] Stream configuration object, if the configuration is not the accelerometer stream configuration, an error will be returned

  • error[out] Log error messages

Returns

ob_accel_full_scale_range range

ob_accel_sample_rate ob_accel_stream_profile_sample_rate(ob_stream_profile *profile, ob_error **error)

Get sampling frequency of the accelerometer frame.

Parameters
  • profile[in] Stream configuration object, if the configuration is not the accelerometer stream configuration, an error will be returned

  • error[out] Log error messages

Returns

ob_accel_sample_rate sampling frequency

ob_gyro_full_scale_range ob_gyro_stream_profile_full_scale_range(ob_stream_profile *profile, ob_error **error)

Get scale range of gyroscope stream.

Parameters
  • profile[in] Stream configuration object, if the configuration is not a gyroscope stream configuration, an error will be returned

  • error[out] Log error messages

Returns

ob_gyro_full_scale_range range

ob_gyro_sample_rate ob_gyro_stream_profile_sample_rate(ob_stream_profile *profile, ob_error **error)

Get the sampling frequency of the gyro flow configuration.

Parameters
  • profile[in] Stream configuration object, if the configuration is not a gyroscope stream configuration, an error will be returned

  • error[out] Log error messages

Returns

ob_gyro_sample_rate sampling frequency

ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(ob_stream_profile_list *profile_list, int width, int height, ob_format format, int fps, ob_error **error)

Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, the first one in the list will be returned by default.

Parameters
  • profile_list – Resolution list

  • width – Width, if you don’t need to add matching conditions, you can pass 0

  • height – Height, if you don’t need to add matching conditions, you can pass 0

  • format – Format, if you don’t need to add matching conditions, you can pass OB_FORMAT_UNKNOWN

  • fps – Frame rate, if you don’t need to add matching conditions, you can pass 0

  • error[out] Log error messages

Returns

ob_stream_profile* returns the matching profile

ob_stream_profile *ob_stream_profile_list_get_profile(ob_stream_profile_list *profile_list, int index, ob_error **error)

Get the corresponding StreamProfile by subscripting.

Parameters
  • profile_list[in] StreamProfile lists

  • index[in]

  • error[out] Log error messages

Returns

ob_stream_profile* returns the matching profile

uint32_t ob_stream_profile_list_count(ob_stream_profile_list *profile_list, ob_error **error)

Get the number of StreamProfile lists.

Parameters
  • profile_list[in] StreamProfile list

  • error[out] Log error messages

Returns

uint32_t returns the number of StreamProfile lists

void ob_delete_stream_profile_list(ob_stream_profile_list *profile_list, ob_error **error)

Delete stream configuration list.

Parameters
  • profiles[in] Stream configuration list

  • error[out] Log error messages

void ob_delete_stream_profile(ob_stream_profile *profile, ob_error **error)

Delete stream configuration.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

int ob_get_version()

Get the SDK version.

Returns

int returns the SDK version

int ob_get_major_version()

Get the SDK major version.

Returns

int returns the SDK major version

int ob_get_minor_version()

Get the SDK minor version.

Returns

int returns the SDK minor version

int ob_get_patch_version()

Get the SDK patch version.

Returns

int returns the SDK patch version