mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
update sdk version to v2.0.20
This commit is contained in:
@@ -203,6 +203,81 @@ OB_EXPORT const char *ob_device_preset_list_get_name(const ob_device_preset_list
|
||||
*/
|
||||
OB_EXPORT bool ob_device_preset_list_has_preset(const ob_device_preset_list *preset_list, const char *preset_name, ob_error **error);
|
||||
|
||||
/**
|
||||
* @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.
|
||||
* @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);
|
||||
/**
|
||||
*
|
||||
* @brief load the frame interleave mode according to frame interleavee name.
|
||||
*
|
||||
* @param device The device object.
|
||||
* @param interleave_ae_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.
|
||||
*/
|
||||
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.
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* @breif Get the current frame interleave name.
|
||||
*
|
||||
* @param device The device object.
|
||||
* @param error Pointer to an error object that will be set if an error occurs.
|
||||
* @return The current frame interleave name, it should be one of the frame interleave names returned by @ref ob_device_get_available_frame_interleave_list.
|
||||
*/
|
||||
OB_EXPORT const char *ob_device_get_current_frame_interleave_name(const ob_device *device, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Delete the available frame interleave list.
|
||||
*
|
||||
* @param interleave_ae_list The available frame interleave list.
|
||||
* @param error Log error messages.
|
||||
*/
|
||||
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 interleave_ae_list The available frame interleave list.
|
||||
* @param error Log error messages.
|
||||
* @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 interleave_ae_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..
|
||||
*/
|
||||
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 interleave_ae_list The available interleave ae list.
|
||||
* @param interleave_ae_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
|
||||
* 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);
|
||||
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
#define ob_depth_work_mode_list_count ob_depth_work_mode_list_get_count
|
||||
#define ob_device_preset_list_count ob_device_preset_list_get_count
|
||||
|
||||
@@ -102,6 +102,18 @@ OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_
|
||||
*/
|
||||
OB_EXPORT void ob_free_idle_memory(ob_context *context, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief For linux, there are two ways to enable the UVC backend: libuvc and libusb. This function is used to set the backend type.
|
||||
* @brief It is effective when the new device is created.
|
||||
*
|
||||
* @attention This interface is only available for Linux.
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] backend_type The backend type to be used.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during backend type setting
|
||||
*/
|
||||
OB_EXPORT void ob_set_uvc_backend_type(ob_context *context, ob_uvc_backend_type backend_type, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the global log level
|
||||
*
|
||||
|
||||
@@ -22,23 +22,24 @@ extern "C" {
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct ob_context_t ob_context;
|
||||
typedef struct ob_device_t ob_device;
|
||||
typedef struct ob_device_info_t ob_device_info;
|
||||
typedef struct ob_device_list_t ob_device_list;
|
||||
typedef struct ob_camera_param_list_t ob_camera_param_list;
|
||||
typedef struct ob_sensor_t ob_sensor;
|
||||
typedef struct ob_sensor_list_t ob_sensor_list;
|
||||
typedef struct ob_stream_profile_t ob_stream_profile;
|
||||
typedef struct ob_stream_profile_list_t ob_stream_profile_list;
|
||||
typedef struct ob_frame_t ob_frame;
|
||||
typedef struct ob_filter_t ob_filter;
|
||||
typedef struct ob_filter_list_t ob_filter_list;
|
||||
typedef struct ob_pipeline_t ob_pipeline;
|
||||
typedef struct ob_config_t ob_config;
|
||||
typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
|
||||
typedef struct ob_device_preset_list_t ob_device_preset_list;
|
||||
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
|
||||
typedef struct ob_context_t ob_context;
|
||||
typedef struct ob_device_t ob_device;
|
||||
typedef struct ob_device_info_t ob_device_info;
|
||||
typedef struct ob_device_list_t ob_device_list;
|
||||
typedef struct ob_camera_param_list_t ob_camera_param_list;
|
||||
typedef struct ob_sensor_t ob_sensor;
|
||||
typedef struct ob_sensor_list_t ob_sensor_list;
|
||||
typedef struct ob_stream_profile_t ob_stream_profile;
|
||||
typedef struct ob_stream_profile_list_t ob_stream_profile_list;
|
||||
typedef struct ob_frame_t ob_frame;
|
||||
typedef struct ob_filter_t ob_filter;
|
||||
typedef struct ob_filter_list_t ob_filter_list;
|
||||
typedef struct ob_pipeline_t ob_pipeline;
|
||||
typedef struct ob_config_t ob_config;
|
||||
typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
|
||||
typedef struct ob_device_preset_list_t ob_device_preset_list;
|
||||
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
|
||||
typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list;
|
||||
|
||||
#define OB_WIDTH_ANY 0
|
||||
#define OB_HEIGHT_ANY 0
|
||||
@@ -543,21 +544,23 @@ typedef enum {
|
||||
*/
|
||||
typedef enum {
|
||||
OB_SAMPLE_RATE_UNKNOWN = 0,
|
||||
OB_SAMPLE_RATE_1_5625_HZ = 1, /**< 1.5625Hz */
|
||||
OB_SAMPLE_RATE_3_125_HZ, /**< 3.125Hz */
|
||||
OB_SAMPLE_RATE_6_25_HZ, /**< 6.25Hz */
|
||||
OB_SAMPLE_RATE_12_5_HZ, /**< 12.5Hz */
|
||||
OB_SAMPLE_RATE_25_HZ, /**< 25Hz */
|
||||
OB_SAMPLE_RATE_50_HZ, /**< 50Hz */
|
||||
OB_SAMPLE_RATE_100_HZ, /**< 100Hz */
|
||||
OB_SAMPLE_RATE_200_HZ, /**< 200Hz */
|
||||
OB_SAMPLE_RATE_500_HZ, /**< 500Hz */
|
||||
OB_SAMPLE_RATE_1_KHZ, /**< 1KHz */
|
||||
OB_SAMPLE_RATE_2_KHZ, /**< 2KHz */
|
||||
OB_SAMPLE_RATE_4_KHZ, /**< 4KHz */
|
||||
OB_SAMPLE_RATE_8_KHZ, /**< 8KHz */
|
||||
OB_SAMPLE_RATE_16_KHZ, /**< 16KHz */
|
||||
OB_SAMPLE_RATE_32_KHZ, /**< 32Hz */
|
||||
OB_SAMPLE_RATE_1_5625_HZ = 1, /**< 1.5625Hz */
|
||||
OB_SAMPLE_RATE_3_125_HZ = 2, /**< 3.125Hz */
|
||||
OB_SAMPLE_RATE_6_25_HZ = 3, /**< 6.25Hz */
|
||||
OB_SAMPLE_RATE_12_5_HZ = 4, /**< 12.5Hz */
|
||||
OB_SAMPLE_RATE_25_HZ = 5, /**< 25Hz */
|
||||
OB_SAMPLE_RATE_50_HZ = 6, /**< 50Hz */
|
||||
OB_SAMPLE_RATE_100_HZ = 7, /**< 100Hz */
|
||||
OB_SAMPLE_RATE_200_HZ = 8, /**< 200Hz */
|
||||
OB_SAMPLE_RATE_500_HZ = 9, /**< 500Hz */
|
||||
OB_SAMPLE_RATE_1_KHZ = 10, /**< 1KHz */
|
||||
OB_SAMPLE_RATE_2_KHZ = 11, /**< 2KHz */
|
||||
OB_SAMPLE_RATE_4_KHZ = 12, /**< 4KHz */
|
||||
OB_SAMPLE_RATE_8_KHZ = 13, /**< 8KHz */
|
||||
OB_SAMPLE_RATE_16_KHZ = 14, /**< 16KHz */
|
||||
OB_SAMPLE_RATE_32_KHZ = 15, /**< 32Hz */
|
||||
OB_SAMPLE_RATE_400_HZ = 16, /**< 400Hz*/
|
||||
OB_SAMPLE_RATE_800_HZ = 17, /**< 800Hz*/
|
||||
} OBIMUSampleRate,
|
||||
OBGyroSampleRate, ob_gyro_sample_rate, OBAccelSampleRate, ob_accel_sample_rate, OB_SAMPLE_RATE;
|
||||
|
||||
@@ -566,14 +569,16 @@ typedef enum {
|
||||
*/
|
||||
typedef enum {
|
||||
OB_GYRO_FS_UNKNOWN = -1,
|
||||
OB_GYRO_FS_16dps = 1, /**< 16 degrees per second */
|
||||
OB_GYRO_FS_31dps, /**< 31 degrees per second */
|
||||
OB_GYRO_FS_62dps, /**< 62 degrees per second */
|
||||
OB_GYRO_FS_125dps, /**< 125 degrees per second */
|
||||
OB_GYRO_FS_250dps, /**< 250 degrees per second */
|
||||
OB_GYRO_FS_500dps, /**< 500 degrees per second */
|
||||
OB_GYRO_FS_1000dps, /**< 1000 degrees per second */
|
||||
OB_GYRO_FS_2000dps, /**< 2000 degrees per second */
|
||||
OB_GYRO_FS_16dps = 1, /**< 16 degrees per second */
|
||||
OB_GYRO_FS_31dps = 2, /**< 31 degrees per second */
|
||||
OB_GYRO_FS_62dps = 3, /**< 62 degrees per second */
|
||||
OB_GYRO_FS_125dps = 4, /**< 125 degrees per second */
|
||||
OB_GYRO_FS_250dps = 5, /**< 250 degrees per second */
|
||||
OB_GYRO_FS_500dps = 6, /**< 500 degrees per second */
|
||||
OB_GYRO_FS_1000dps = 7, /**< 1000 degrees per second */
|
||||
OB_GYRO_FS_2000dps = 8, /**< 2000 degrees per second */
|
||||
OB_GYRO_FS_400dps = 9, /**< 400 degrees per second */
|
||||
OB_GYRO_FS_800dps = 10, /**< 800 degrees per second */
|
||||
} OBGyroFullScaleRange,
|
||||
ob_gyro_full_scale_range, OB_GYRO_FULL_SCALE_RANGE;
|
||||
|
||||
@@ -583,9 +588,13 @@ typedef enum {
|
||||
typedef enum {
|
||||
OB_ACCEL_FS_UNKNOWN = -1,
|
||||
OB_ACCEL_FS_2g = 1, /**< 1x the acceleration of gravity */
|
||||
OB_ACCEL_FS_4g, /**< 4x the acceleration of gravity */
|
||||
OB_ACCEL_FS_8g, /**< 8x the acceleration of gravity */
|
||||
OB_ACCEL_FS_16g, /**< 16x the acceleration of gravity */
|
||||
OB_ACCEL_FS_4g = 2, /**< 4x the acceleration of gravity */
|
||||
OB_ACCEL_FS_8g = 3, /**< 8x the acceleration of gravity */
|
||||
OB_ACCEL_FS_16g = 4, /**< 16x the acceleration of gravity */
|
||||
OB_ACCEL_FS_3g = 5, /**< 3x the acceleration of gravity */
|
||||
OB_ACCEL_FS_6g = 6, /**< 6x the acceleration of gravity */
|
||||
OB_ACCEL_FS_12g = 7, /**< 12x the acceleration of gravity */
|
||||
OB_ACCEL_FS_24g = 8, /**< 24x the acceleration of gravity */
|
||||
} OBAccelFullScaleRange,
|
||||
ob_accel_full_scale_range, OB_ACCEL_FULL_SCALE_RANGE;
|
||||
|
||||
@@ -1590,6 +1599,31 @@ typedef enum {
|
||||
} ob_frame_metadata_type,
|
||||
OBFrameMetadataType;
|
||||
|
||||
/**
|
||||
* @brief For Linux, there are two ways to access the UVC device, libuvc and v4l2. The backend type is used to select the backend to access the device.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
/**
|
||||
* @brief Auto detect system capabilities and device hint to select backend
|
||||
*
|
||||
*/
|
||||
OB_UVC_BACKEND_TYPE_AUTO,
|
||||
|
||||
/**
|
||||
* @brief Use libuvc backend to access the UVC device
|
||||
*
|
||||
*/
|
||||
OB_UVC_BACKEND_TYPE_LIBUVC,
|
||||
|
||||
/**
|
||||
* @brief Use v4l2 backend to access the UVC device
|
||||
*
|
||||
*/
|
||||
OB_UVC_BACKEND_TYPE_V4L2,
|
||||
} ob_uvc_backend_type,
|
||||
OBUvcBackendType;
|
||||
|
||||
// For compatibility
|
||||
#define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL
|
||||
#define OB_FRAME_METADATA_TYPE_EMITTER_MODE OB_FRAME_METADATA_TYPE_LASER_STATUS
|
||||
@@ -1753,4 +1787,3 @@ typedef void(ob_log_callback)(ob_log_severity severity, const char *message, voi
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Orbbec Inc. All Rights Reserved.
|
||||
// Copyright (c) Orbbec Inc. All Rights Reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
/**
|
||||
@@ -447,6 +447,20 @@ typedef enum {
|
||||
*/
|
||||
OB_PROP_DEVICE_REPOWER_BOOL = 202,
|
||||
|
||||
/**
|
||||
* @brief frame interleave config index
|
||||
*/
|
||||
OB_PROP_FRAME_INTERLEAVE_CONFIG_INDEX_INT = 204,
|
||||
|
||||
/**
|
||||
* @brief frame interleave enable (true:enable,false:disable)
|
||||
*/
|
||||
OB_PROP_FRAME_INTERLEAVE_ENABLE_BOOL = 205,
|
||||
/**
|
||||
* @brief laser pattern sync with delay(us)
|
||||
*/
|
||||
OB_PROP_FRAME_INTERLEAVE_LASER_PATTERN_SYNC_DELAY_INT = 206,
|
||||
|
||||
/**
|
||||
* @brief Baseline calibration parameters
|
||||
*/
|
||||
@@ -771,4 +785,3 @@ typedef struct OBPropertyItem {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
private:
|
||||
ob_context *impl_ = nullptr;
|
||||
DeviceChangedCallback deviceChangedCallback_;
|
||||
static LogCallback logCallback_;
|
||||
// static LogCallback logCallback_;
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -145,7 +145,22 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the level of the global log, which affects both the log level output to the console, output to the file and output the user defined callback.
|
||||
* @brief For linux, there are two ways to enable the UVC backend: libuvc and libusb. This function is used to set the backend type.
|
||||
* @brief It is effective when the new device is created.
|
||||
*
|
||||
* @attention This interface is only available for Linux.
|
||||
*
|
||||
* @param[in] backend_type The backend type to be used.
|
||||
*/
|
||||
void setUvcBackendType(OBUvcBackendType type) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_set_uvc_backend_type(impl_, type, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the level of the global log, which affects both the log level output to the console, output to the file and output the user defined
|
||||
* callback.
|
||||
*
|
||||
* @param severity The log output level.
|
||||
*/
|
||||
@@ -187,8 +202,8 @@ public:
|
||||
*/
|
||||
static void setLoggerToCallback(OBLogSeverity severity, LogCallback callback) {
|
||||
ob_error *error = nullptr;
|
||||
Context::logCallback_ = callback;
|
||||
ob_set_logger_to_callback(severity, &Context::logCallback, &Context::logCallback_, &error);
|
||||
Context::getLogCallback() = callback;
|
||||
ob_set_logger_to_callback(severity, &Context::logCallback, &Context::getLogCallback(), &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
@@ -223,6 +238,12 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
// Lazy initialization of the logcallback_. The purpose is to initialize logcallback_ in .hpp
|
||||
static LogCallback& getLogCallback() {
|
||||
static LogCallback logCallback_ = nullptr;
|
||||
return logCallback_;
|
||||
}
|
||||
|
||||
// for backward compatibility
|
||||
#define enableMultiDeviceSync enableDeviceClockSync
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@ class SensorList;
|
||||
class DevicePresetList;
|
||||
class OBDepthWorkModeList;
|
||||
class CameraParamList;
|
||||
class DeviceFrameInterleaveList;
|
||||
|
||||
class Device {
|
||||
public:
|
||||
@@ -748,6 +749,53 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the device supports the frame interleave feature.
|
||||
*
|
||||
* @return bool Returns true if the device supports the frame interleave feature.
|
||||
*/
|
||||
bool isFrameInterleaveSupported() const {
|
||||
ob_error *error = nullptr;
|
||||
bool ret = ob_device_is_frame_interleave_supported(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get current frame interleave name
|
||||
* @return const char* return the current frame interleave name, it should be one of the frame interleave names returned by @ref
|
||||
* getAvailableFrameInterleaveList.
|
||||
*/
|
||||
const char *getCurrentFrameInterleaveName() const {
|
||||
ob_error *error = nullptr;
|
||||
const char *name = ob_device_get_current_frame_interleave_name(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief load the frame interleave according to frame interleave name.
|
||||
* @param frameInterleaveName The frame interleave name to set. The name should be one of the frame interleave names returned by @ref
|
||||
* getAvailableFrameInterleaveList.
|
||||
*/
|
||||
void loadFrameInterleave(const char *frameInterleaveName) const {
|
||||
ob_error *error = nullptr;
|
||||
ob_device_load_frame_interleave(impl_, frameInterleaveName, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get available frame interleave list
|
||||
*
|
||||
* @return DeviceFrameInterleaveList return the available frame interleave list.
|
||||
*/
|
||||
std::shared_ptr<DeviceFrameInterleaveList> getAvailableFrameInterleaveList() const {
|
||||
ob_error *error = nullptr;
|
||||
auto list = ob_device_get_available_frame_interleave_list(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return std::make_shared<DeviceFrameInterleaveList>(list);
|
||||
}
|
||||
|
||||
private:
|
||||
static void firmwareUpdateCallback(ob_fw_update_state state, const char *message, uint8_t percent, void *userData) {
|
||||
auto device = static_cast<Device *>(userData);
|
||||
@@ -1360,5 +1408,57 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ob
|
||||
/**
|
||||
* @brief Class representing a list of device Frame Interleave
|
||||
*/
|
||||
class DeviceFrameInterleaveList {
|
||||
private:
|
||||
ob_device_frame_interleave_list_t *impl_ = nullptr;
|
||||
|
||||
public:
|
||||
explicit DeviceFrameInterleaveList(ob_device_frame_interleave_list_t *impl) : impl_(impl) {}
|
||||
~DeviceFrameInterleaveList() noexcept {
|
||||
ob_error *error = nullptr;
|
||||
ob_delete_frame_interleave_list(impl_, &error);
|
||||
Error::handle(&error, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the number of device frame interleave in the list
|
||||
*
|
||||
* @return uint32_t the number of device frame interleave in the list
|
||||
*/
|
||||
uint32_t getCount() {
|
||||
ob_error *error = nullptr;
|
||||
auto count = ob_device_frame_interleave_list_get_count(impl_, &error);
|
||||
Error::handle(&error);
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the name of the device frame interleave at the specified index
|
||||
*
|
||||
* @param index the index of the device frame interleave
|
||||
* @return const char* the name of the device frame interleave
|
||||
*/
|
||||
const char *getName(uint32_t index) {
|
||||
ob_error *error = nullptr;
|
||||
const char *name = ob_device_frame_interleave_list_get_name(impl_, index, &error);
|
||||
Error::handle(&error);
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief check if the frame interleave list contains the special name frame interleave.
|
||||
* @param name The name of the frame interleave
|
||||
* @return bool Returns true if the special name is found in the frame interleave list, otherwise returns false.
|
||||
*/
|
||||
bool hasFrameInterleave(const char *name) {
|
||||
ob_error *error = nullptr;
|
||||
auto result = ob_device_frame_interleave_list_has_frame_interleave(impl_, name, &error);
|
||||
Error::handle(&error);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ob
|
||||
|
||||
@@ -426,6 +426,20 @@ public:
|
||||
OBStreamType getAlignToStreamType() {
|
||||
return static_cast<OBStreamType>(static_cast<int>(getConfigValue("AlignType")));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Sets whether the output frame resolution should match the target resolution.
|
||||
* When enabled, the output frame resolution will be adjusted to match (same as) the target resolution.
|
||||
* When disabled, the output frame resolution will match the original resolution while maintaining
|
||||
* the aspect ratio of the target resolution.
|
||||
*
|
||||
*
|
||||
* @param state If true, output frame resolution will match the target resolution; otherwise, it will
|
||||
* maintain the original resolution with the target's aspect ratio.
|
||||
*/
|
||||
void setMatchTargetResolution(bool state) {
|
||||
setConfigValue("MatchTargetRes", state);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -942,7 +956,7 @@ public:
|
||||
|
||||
class OBFilterList {
|
||||
private:
|
||||
ob_filter_list_t* impl_;
|
||||
ob_filter_list_t *impl_;
|
||||
|
||||
public:
|
||||
explicit OBFilterList(ob_filter_list_t *impl) : impl_(impl) {}
|
||||
@@ -1010,4 +1024,3 @@ template <typename T> bool Filter::is() {
|
||||
}
|
||||
|
||||
} // namespace ob
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
// empty file, leave here for backwards compatibility
|
||||
#include <libobsensor/h/ObTypes.h>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user