mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
update OrbbecSDK version
This commit is contained in:
@@ -205,6 +205,17 @@ 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.
|
||||
|
||||
@@ -1293,6 +1293,8 @@ template <typename T> bool Frame::is() const {
|
||||
case OB_FRAME_DEPTH:
|
||||
return (typeid(T) == typeid(DepthFrame) || typeid(T) == typeid(VideoFrame));
|
||||
case OB_FRAME_COLOR:
|
||||
case OB_FRAME_COLOR_LEFT:
|
||||
case OB_FRAME_COLOR_RIGHT:
|
||||
return (typeid(T) == typeid(ColorFrame) || typeid(T) == typeid(VideoFrame));
|
||||
case OB_FRAME_CONFIDENCE:
|
||||
return (typeid(T) == typeid(ConfidenceFrame) || typeid(T) == typeid(VideoFrame));
|
||||
|
||||
@@ -124,6 +124,22 @@ public:
|
||||
enableVideoStream(streamType, width, height, fps, format);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable a video stream to be used in the pipeline with down-sample 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] 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, OBDownSampleConfig downSampleConfig, 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);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable an accelerometer stream to be used in the pipeline.
|
||||
*
|
||||
|
||||
@@ -254,6 +254,19 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the down-sampling configuration of the stream.
|
||||
* @brief Includes original resolution and scale factor.
|
||||
*
|
||||
* @return OBDownSampleConfig Return the down-sampling configuration.
|
||||
*/
|
||||
OBDownSampleConfig getDownSampleConfig() const {
|
||||
ob_error *error = nullptr;
|
||||
auto downSampleConfig = ob_video_stream_profile_get_down_sample_config(const_cast<ob_stream_profile_t *>(impl_), &error);
|
||||
Error::handle(&error);
|
||||
return downSampleConfig;
|
||||
}
|
||||
|
||||
public:
|
||||
// The following interfaces are deprecated and are retained here for compatibility purposes.
|
||||
uint32_t fps() const {
|
||||
@@ -406,6 +419,8 @@ template <typename T> bool StreamProfile::is() const {
|
||||
case OB_STREAM_IR_LEFT:
|
||||
case OB_STREAM_IR_RIGHT:
|
||||
case OB_STREAM_COLOR:
|
||||
case OB_STREAM_COLOR_LEFT:
|
||||
case OB_STREAM_COLOR_RIGHT:
|
||||
case OB_STREAM_DEPTH:
|
||||
case OB_STREAM_RAW_PHASE:
|
||||
case OB_STREAM_CONFIDENCE:
|
||||
@@ -434,6 +449,8 @@ public:
|
||||
case OB_STREAM_IR_RIGHT:
|
||||
case OB_STREAM_DEPTH:
|
||||
case OB_STREAM_COLOR:
|
||||
case OB_STREAM_COLOR_LEFT:
|
||||
case OB_STREAM_COLOR_RIGHT:
|
||||
case OB_STREAM_VIDEO:
|
||||
case OB_STREAM_CONFIDENCE:
|
||||
return std::make_shared<VideoStreamProfile>(impl);
|
||||
@@ -511,6 +528,25 @@ public:
|
||||
return vsp->as<VideoStreamProfile>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding video stream profile according to the down-sampling 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] 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(OBDownSampleConfig downSampleConfig, 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);
|
||||
Error::handle(&error);
|
||||
auto vsp = StreamProfileFactory::create(profile);
|
||||
return vsp->as<VideoStreamProfile>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding accelerometer stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list
|
||||
* is returned by default. Throws an exception if no matching profile is found.
|
||||
|
||||
@@ -127,6 +127,8 @@ public:
|
||||
* @brief Video sensors are sensors that produce video frames.
|
||||
* @brief The following sensor types are considered video sensors:
|
||||
* OB_SENSOR_COLOR,
|
||||
* OB_SENSOR_COLOR_LEFT,
|
||||
* OB_SENSOR_COLOR_RIGHT,
|
||||
* OB_SENSOR_DEPTH,
|
||||
* OB_SENSOR_IR,
|
||||
* OB_SENSOR_IR_LEFT,
|
||||
@@ -148,6 +150,8 @@ public:
|
||||
* OB_STREAM_VIDEO,
|
||||
* OB_STREAM_DEPTH,
|
||||
* OB_STREAM_COLOR,
|
||||
* OB_STREAM_COLOR_LEFT,
|
||||
* OB_STREAM_COLOR_RIGHT,
|
||||
* OB_STREAM_IR,
|
||||
* OB_STREAM_IR_LEFT,
|
||||
* OB_STREAM_IR_RIGHT,
|
||||
|
||||
Reference in New Issue
Block a user