update OrbbecSDK version to 2.7.0

This commit is contained in:
ob-yalian
2026-01-13 17:23:09 +08:00
parent ccaf32dd3a
commit 0c0a4d3f53
19 changed files with 106 additions and 149 deletions
@@ -183,7 +183,7 @@ public:
}
void unregisterDeviceChangedCallback(OBCallbackId id) {
ob_error *error = nullptr;
ob_error *error = nullptr;
ob_unregister_device_changed_callback(impl_, id, &error);
{
std::unique_lock<std::mutex> lock(callbackMtx_);
@@ -205,17 +205,6 @@ public:
Error::handle(&error);
}
/**
* @brief Trigger data acquisition on all devices configured for software synchronization, ensuring they capture data based on the same system time.
*
* @param[in] softSyncTime The time to synchronize, in microseconds. If the value is 0, synchronization is performed immediately.
*/
void setMultieDeviceSoftSyncTimeCapture(uint64_t softSyncTime) const {
ob_error *error = nullptr;
ob_multie_device_soft_sync_capture(impl_, softSyncTime, &error);
Error::handle(&error);
}
/**
* @brief Frees idle memory from the internal frame memory pool.
* @brief The SDK includes an internal frame memory pool that caches memory allocated for frames received from devices.
@@ -125,19 +125,19 @@ public:
}
/**
* @brief Enable a video stream to be used in the pipeline with down-sample configuration.
* @brief Enable a video stream to be used in the pipeline with decimation configuration.
* @brief Will convert sensor type to stream type automatically.
*
* @param[in] sensorType The sensor type to be enabled.
* @param[in] downSampleConfig The down-sample configuration for this stream.
* @param[in] decimationConfig The decimation configuration for this stream.
* @param[in] fps The video stream frame rate (default is OB_FPS_ANY, which selects the default frame rate).
* @param[in] format The video stream format (default is OB_FORMAT_ANY, which selects the default format).
*/
void enableVideoStream(OBSensorType sensorType, OBHardwareDecimationConfig downSampleConfig, uint32_t fps = OB_FPS_ANY,
void enableVideoStream(OBSensorType sensorType, OBHardwareDecimationConfig decimationConfig, uint32_t fps = OB_FPS_ANY,
OBFormat format = OB_FORMAT_ANY) const {
auto streamType = ob::TypeHelper::convertSensorTypeToStreamType(sensorType);
ob_error *error = nullptr;
ob_config_enable_video_stream_by_down_sample_config(impl_, streamType, downSampleConfig, fps, format, &error);
ob_config_enable_video_stream_by_decimation_config(impl_, streamType, decimationConfig, fps, format, &error);
Error::handle(&error);
}
@@ -471,13 +471,6 @@ public:
return cameraParam;
}
OBCameraParam getCameraParamWithProfile(uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight, uint32_t decimationFactor) {
ob_error *error = nullptr;
OBCameraParam cameraParam = ob_pipeline_get_camera_param_with_down_sample_profile(impl_, colorWidth, colorHeight, depthWidth, depthHeight, decimationFactor, &error);
Error::handle(&error);
return cameraParam;
}
OBCalibrationParam getCalibrationParam(std::shared_ptr<Config> config) {
ob_error *error = nullptr;
OBCalibrationParam calibrationParam = ob_pipeline_get_calibration_param(impl_, config->getImpl(), &error);
@@ -88,19 +88,20 @@ public:
/**
* @brief Set the extrinsic parameters from current stream profile to the given target stream profile.
*
*
* @tparam target Target stream profile.
* @tparam extrinsic The extrinsic.
*/
void bindExtrinsicTo(std::shared_ptr<StreamProfile> target, const OBExtrinsic &extrinsic) {
ob_error *error = nullptr;
ob_stream_profile_set_extrinsic_to(const_cast<ob_stream_profile_t *>(impl_), const_cast<const ob_stream_profile_t *>(target->getImpl()), extrinsic, &error);
ob_stream_profile_set_extrinsic_to(const_cast<ob_stream_profile_t *>(impl_), const_cast<const ob_stream_profile_t *>(target->getImpl()), extrinsic,
&error);
Error::handle(&error);
}
/**
* @brief Set the extrinsic parameters from current stream profile to the given target stream type.
*
*
* @tparam targetStreamType Target stream type.
* @tparam extrinsic The extrinsic.
*/
@@ -255,16 +256,16 @@ public:
}
/**
* @brief Get the down-sampling configuration of the stream.
* @brief Includes original resolution and scale factor.
* @brief Get the decimation configuration of the stream.
* Includes original resolution and scale factor.
*
* @return OBHardwareDecimationConfig Return the down-sampling configuration.
* @return OBHardwareDecimationConfig Return the decimation configuration.
*/
OBHardwareDecimationConfig getDownSampleConfig() const {
OBHardwareDecimationConfig getDecimationConfig() const {
ob_error *error = nullptr;
auto downSampleConfig = ob_video_stream_profile_get_down_sample_config(const_cast<ob_stream_profile_t *>(impl_), &error);
auto decimationConfig = ob_video_stream_profile_get_decimation_config(const_cast<ob_stream_profile_t *>(impl_), &error);
Error::handle(&error);
return downSampleConfig;
return decimationConfig;
}
public:
@@ -529,19 +530,19 @@ public:
}
/**
* @brief Match the corresponding video stream profile according to the down-sampling configuration.If multiple profiles match, the first one in the list is
* @brief Match the corresponding video stream profile according to the decimation configuration. If multiple profiles match, the first one in the list is
* returned. Throws an exception when no matching profile is found.
*
* @param[in] downSampleConfig Down-sampling configuration. The actual resolution is computed fromthe original resolution and scale factor.
* @param[in] decimationConfig Decimation configuration. The actual resolution is computed fromthe original resolution and scale factor.
* @param[in] format Stream format. Pass OB_FORMAT_ANY if no matching condition is required.
* @param[in] fps Frame rate. Pass OB_FPS_ANY if no matching condition is required.
*
* @return std::shared_ptr<VideoStreamProfile> Return the matched video stream profile.
*/
std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(OBHardwareDecimationConfig downSampleConfig, OBFormat format = OB_FORMAT_ANY,
std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(OBHardwareDecimationConfig decimationConfig, OBFormat format = OB_FORMAT_ANY,
int fps = OB_FPS_ANY) const {
ob_error *error = nullptr;
auto profile = ob_stream_profile_list_get_video_stream_profile_by_down_sample_config(impl_, downSampleConfig, format, fps, &error);
auto profile = ob_stream_profile_list_get_video_stream_profile_by_decimation_config(impl_, decimationConfig, format, fps, &error);
Error::handle(&error);
auto vsp = StreamProfileFactory::create(profile);
return vsp->as<VideoStreamProfile>();