|
OrbbecSDK
1.0.0
|
context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能 更多...
#include "ObTypes.h"

函数 | |
| ob_context * | ob_create_context (ob_error **error) |
| 创建context的接口函数 更多... | |
| void | ob_delete_context (ob_context *context, ob_error **error) |
| 删除上下文环境 更多... | |
| ob_device_list * | ob_query_device_list (ob_context *context, ob_error **error) |
| 获取OS枚举设备列表 更多... | |
| void | ob_set_device_changed_callback (ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error) |
| 设置设备插拔回调函数 更多... | |
| void | ob_set_logger_serverity (ob_context *context, ob_log_severity log, ob_error **error) |
| 设置日志的等级 更多... | |
| void | ob_set_logger_to_file (ob_context *context, ob_log_severity log, const char *file_name, ob_error **error) |
| 设置输出日志到文件 更多... | |
| void | ob_set_logger_to_console (ob_context *context, ob_log_severity log, ob_error **error) |
| 设置输出日志到控制台 更多... | |
| void | ob_enable_multi_device_sync (ob_context *context, uint64_t repeatInterval, ob_error **error) |
| 启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能) 更多... | |
context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
在文件 Context.h 中定义.
| ob_context* ob_create_context | ( | ob_error ** | error | ) |
创建context的接口函数
| [out] | error | 记录错误信息 |
| void ob_delete_context | ( | ob_context * | context, |
| ob_error ** | error | ||
| ) |
删除上下文环境
| [in] | context | 要删除的上下文环境 |
| [out] | error | 记录错误信息 |
| void ob_enable_multi_device_sync | ( | ob_context * | context, |
| uint64_t | repeatInterval, | ||
| ob_error ** | error | ||
| ) |
启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能)
| [in] | context | 上下文环境 |
| [in] | repeatInterval | 定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行) |
| [out] | error | 记录错误信息 |
| ob_device_list* ob_query_device_list | ( | ob_context * | context, |
| ob_error ** | error | ||
| ) |
获取OS枚举设备列表
| [in] | context | 上下文环境 |
| [out] | error | 记录错误信息 |
| void ob_set_device_changed_callback | ( | ob_context * | context, |
| ob_device_changed_callback | callback, | ||
| void * | user_data, | ||
| ob_error ** | error | ||
| ) |
设置设备插拔回调函数
| [in] | context | 上下文环境 |
| [in] | callback | 设备插拔时触发的回调 |
| [in] | user_data | 可以传入任意用户数据,并从回调中获取 |
| [out] | error | 记录错误信息 |
| void ob_set_logger_serverity | ( | ob_context * | context, |
| ob_log_severity | log, | ||
| ob_error ** | error | ||
| ) |
设置日志的等级
| [in] | context | 上下文环境 |
| [in] | log | 日志的等级 |
| [out] | error | 记录错误信息 |
| void ob_set_logger_to_console | ( | ob_context * | context, |
| ob_log_severity | log, | ||
| ob_error ** | error | ||
| ) |
设置输出日志到控制台
| [in] | context | 上下文环境 |
| [in] | log | 日志的等级 |
| [out] | error | 记录错误信息 |
| void ob_set_logger_to_file | ( | ob_context * | context, |
| ob_log_severity | log, | ||
| const char * | file_name, | ||
| ob_error ** | error | ||
| ) |
设置输出日志到文件
| [in] | context | 上下文环境 |
| [in] | log | 日志的等级 |
| [in] | file_name | 日志文件名 |
| [out] | error | 记录错误信息 |
1.8.11