mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
update OrbbecSDK version to 2.7.0
This commit is contained in:
@@ -162,15 +162,6 @@ OB_EXPORT void ob_unregister_device_changed_callback(ob_context *context, ob_cal
|
||||
*/
|
||||
OB_EXPORT void ob_enable_device_clock_sync(ob_context *context, uint64_t repeat_interval_msec, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Trigger data acquisition on all devices configured for software synchronization, ensuring they capture data based on the same system time.
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] softSyncTime The time to synchronize, in microseconds. If the value is 0, synchronization is performed immediately.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during execution
|
||||
*/
|
||||
OB_EXPORT void ob_multie_device_soft_sync_capture(ob_context *context, uint64_t softSyncTime, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Free idle memory from the internal frame memory pool
|
||||
*
|
||||
|
||||
@@ -128,20 +128,20 @@ typedef struct ob_error {
|
||||
* @brief Enumeration value describing the sensor type
|
||||
*/
|
||||
typedef enum {
|
||||
OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */
|
||||
OB_SENSOR_IR = 1, /**< IR */
|
||||
OB_SENSOR_COLOR = 2, /**< Color */
|
||||
OB_SENSOR_DEPTH = 3, /**< Depth */
|
||||
OB_SENSOR_ACCEL = 4, /**< Accel */
|
||||
OB_SENSOR_GYRO = 5, /**< Gyro */
|
||||
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
|
||||
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
|
||||
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
|
||||
OB_SENSOR_CONFIDENCE = 9, /**< Confidence */
|
||||
OB_SENSOR_LIDAR = 10, /**< LiDAR */
|
||||
OB_SENSOR_COLOR_LEFT = 11, /**< Left Color */
|
||||
OB_SENSOR_COLOR_RIGHT = 12, /**< Right Color */
|
||||
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
|
||||
OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */
|
||||
OB_SENSOR_IR = 1, /**< IR */
|
||||
OB_SENSOR_COLOR = 2, /**< Color */
|
||||
OB_SENSOR_DEPTH = 3, /**< Depth */
|
||||
OB_SENSOR_ACCEL = 4, /**< Accel */
|
||||
OB_SENSOR_GYRO = 5, /**< Gyro */
|
||||
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
|
||||
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
|
||||
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
|
||||
OB_SENSOR_CONFIDENCE = 9, /**< Confidence */
|
||||
OB_SENSOR_LIDAR = 10, /**< LiDAR */
|
||||
OB_SENSOR_COLOR_LEFT = 11, /**< Left Color */
|
||||
OB_SENSOR_COLOR_RIGHT = 12, /**< Right Color */
|
||||
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
|
||||
} OBSensorType,
|
||||
ob_sensor_type;
|
||||
|
||||
@@ -149,21 +149,21 @@ typedef enum {
|
||||
* @brief Enumeration value describing the type of data stream
|
||||
*/
|
||||
typedef enum {
|
||||
OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */
|
||||
OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */
|
||||
OB_STREAM_IR = 1, /**< IR stream */
|
||||
OB_STREAM_COLOR = 2, /**< color stream */
|
||||
OB_STREAM_DEPTH = 3, /**< depth stream */
|
||||
OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */
|
||||
OB_STREAM_GYRO = 5, /**< Gyroscope data stream */
|
||||
OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */
|
||||
OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */
|
||||
OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */
|
||||
OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/
|
||||
OB_STREAM_LIDAR = 10, /**< LiDAR Stream for LiDAR device*/
|
||||
OB_STREAM_COLOR_LEFT = 11, /**< Left Color stream */
|
||||
OB_STREAM_COLOR_RIGHT = 12, /**< Right Color stream */
|
||||
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
|
||||
OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */
|
||||
OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */
|
||||
OB_STREAM_IR = 1, /**< IR stream */
|
||||
OB_STREAM_COLOR = 2, /**< color stream */
|
||||
OB_STREAM_DEPTH = 3, /**< depth stream */
|
||||
OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */
|
||||
OB_STREAM_GYRO = 5, /**< Gyroscope data stream */
|
||||
OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */
|
||||
OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */
|
||||
OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */
|
||||
OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/
|
||||
OB_STREAM_LIDAR = 10, /**< LiDAR Stream for LiDAR device*/
|
||||
OB_STREAM_COLOR_LEFT = 11, /**< Left Color stream */
|
||||
OB_STREAM_COLOR_RIGHT = 12, /**< Right Color stream */
|
||||
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
|
||||
} OBStreamType,
|
||||
ob_stream_type;
|
||||
|
||||
@@ -171,23 +171,23 @@ typedef enum {
|
||||
* @brief Enumeration value describing the type of frame
|
||||
*/
|
||||
typedef enum {
|
||||
OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */
|
||||
OB_FRAME_VIDEO = 0, /**< Video frame */
|
||||
OB_FRAME_IR = 1, /**< IR frame */
|
||||
OB_FRAME_COLOR = 2, /**< Color frame */
|
||||
OB_FRAME_DEPTH = 3, /**< Depth frame */
|
||||
OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */
|
||||
OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */
|
||||
OB_FRAME_POINTS = 6, /**< Point cloud frame */
|
||||
OB_FRAME_GYRO = 7, /**< Gyroscope data frame */
|
||||
OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */
|
||||
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */
|
||||
OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/
|
||||
OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/
|
||||
OB_FRAME_LIDAR_POINTS = 12, /**< LiDAR point3d cloud frame*/
|
||||
OB_FRAME_COLOR_LEFT = 13, /**< Left Color frame */
|
||||
OB_FRAME_COLOR_RIGHT = 14, /**< Right Color frame */
|
||||
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
|
||||
OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */
|
||||
OB_FRAME_VIDEO = 0, /**< Video frame */
|
||||
OB_FRAME_IR = 1, /**< IR frame */
|
||||
OB_FRAME_COLOR = 2, /**< Color frame */
|
||||
OB_FRAME_DEPTH = 3, /**< Depth frame */
|
||||
OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */
|
||||
OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */
|
||||
OB_FRAME_POINTS = 6, /**< Point cloud frame */
|
||||
OB_FRAME_GYRO = 7, /**< Gyroscope data frame */
|
||||
OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */
|
||||
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */
|
||||
OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/
|
||||
OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/
|
||||
OB_FRAME_LIDAR_POINTS = 12, /**< LiDAR point3d cloud frame*/
|
||||
OB_FRAME_COLOR_LEFT = 13, /**< Left Color frame */
|
||||
OB_FRAME_COLOR_RIGHT = 14, /**< Right Color frame */
|
||||
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
|
||||
} OBFrameType,
|
||||
ob_frame_type;
|
||||
|
||||
@@ -1535,13 +1535,13 @@ typedef enum {
|
||||
* @brief Configuration Item for the filter
|
||||
*/
|
||||
typedef struct {
|
||||
const char * name; ///< Name of the configuration item
|
||||
const char *name; ///< Name of the configuration item
|
||||
OBFilterConfigValueType type; ///< Value type of the configuration item
|
||||
double min; ///< Minimum value casted to double
|
||||
double max; ///< Maximum value casted to double
|
||||
double step; ///< Step value casted to double
|
||||
double def; ///< Default value casted to double
|
||||
const char * desc; ///< Description of the configuration item
|
||||
const char *desc; ///< Description of the configuration item
|
||||
} OBFilterConfigSchemaItem, ob_filter_config_schema_item;
|
||||
|
||||
/**
|
||||
@@ -1562,12 +1562,12 @@ typedef struct {
|
||||
} OBDispOffsetConfig, ob_disp_offset_config;
|
||||
|
||||
/**
|
||||
* @details Defines the original resolution and hardware decimation factor for down-sampling.
|
||||
* @details Defines the original resolution and hardware decimation factor.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t originWidth;
|
||||
uint32_t originHeight;
|
||||
uint32_t decimationFactor;
|
||||
uint32_t originWidth; ///< Origin width
|
||||
uint32_t originHeight; ///< Origin height
|
||||
uint32_t factor; ///< Decimation factor
|
||||
} OBHardwareDecimationConfig, ob_hardware_decimation_config;
|
||||
|
||||
/**
|
||||
|
||||
@@ -225,20 +225,20 @@ OB_EXPORT void ob_config_enable_video_stream(ob_config *config, ob_stream_type s
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Enable a video stream using a down-sample configuration.
|
||||
* @brief Enable a video stream using a decimation configuration.
|
||||
*
|
||||
* @attention The stream_type should be a video stream type, such as OB_STREAM_IR, OB_STREAM_DEPTH, etc.
|
||||
*
|
||||
* @param[in] config The pipeline configuration object
|
||||
* @param[in] stream_type The type of the stream to be enabled
|
||||
* @param[in] down_sample_config The down-sample configuration for the stream
|
||||
* @param[in] decimation_config The decimation configuration for the stream
|
||||
* @param[in] fps The frame rate of the video stream
|
||||
* @param[in] format The format of the video stream
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_config_enable_video_stream_by_down_sample_config(ob_config *config, ob_stream_type stream_type,
|
||||
ob_hardware_decimation_config down_sample_config, uint32_t fps, ob_format format,
|
||||
ob_error **error);
|
||||
OB_EXPORT void ob_config_enable_video_stream_by_decimation_config(ob_config *config, ob_stream_type stream_type,
|
||||
ob_hardware_decimation_config decimation_config, uint32_t fps, ob_format format,
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Enable accelerometer stream with specified parameters
|
||||
@@ -353,23 +353,6 @@ OB_EXPORT ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob
|
||||
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth,
|
||||
uint32_t depthHeight, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the current camera parameters with down-sampled depth profile
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] colorWidth color width
|
||||
* @param[in] colorHeight color height
|
||||
* @param[in] originDepthWidth original depth width before down-sampling
|
||||
* @param[in] originDepthHeight original depth height before down-sampling
|
||||
* @param[in] decimationFactor depth down-sampling factor
|
||||
* @param[out] error Log error messages
|
||||
*
|
||||
* @return ob_camera_param returns camera internal parameters
|
||||
*/
|
||||
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_down_sample_profile(ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight,
|
||||
uint32_t originDepthWidth, uint32_t originDepthHeight,
|
||||
uint32_t decimationFactor, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get device calibration parameters with the specified configuration
|
||||
*
|
||||
|
||||
@@ -240,29 +240,29 @@ OB_EXPORT void ob_video_stream_profile_set_intrinsic(ob_stream_profile *profile,
|
||||
/**
|
||||
* @brief Get the distortion of the video stream profile
|
||||
*
|
||||
* @param[in] profile Stream profile object
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @param[in] profile Stream profile object
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_camera_distortion Return the distortion of the stream
|
||||
*/
|
||||
OB_EXPORT ob_camera_distortion ob_video_stream_profile_get_distortion(const ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the down-sampling configuration of the video stream profile.
|
||||
* @brief Get the decimation configuration of the video stream profile.
|
||||
*
|
||||
* @param[in] profile Stream profile object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @param[in] profile Stream profile object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_hardware_decimation_config The down-sampling configuration of the stream.
|
||||
* @return ob_hardware_decimation_config Return the decimation configuration of the stream.
|
||||
*/
|
||||
OB_EXPORT ob_hardware_decimation_config ob_video_stream_profile_get_down_sample_config(const ob_stream_profile *profile, ob_error **error);
|
||||
OB_EXPORT ob_hardware_decimation_config ob_video_stream_profile_get_decimation_config(const ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the distortion of the video stream profile
|
||||
*
|
||||
* @param[in] profile Stream profile object
|
||||
* @param[in] distortion The distortion of the stream
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @param[in] distortion The distortion of the stream
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_video_stream_profile_set_distortion(ob_stream_profile *profile, ob_camera_distortion distortion, ob_error **error);
|
||||
|
||||
@@ -414,22 +414,22 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(con
|
||||
ob_format format, int fps, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding ob_stream_profile based on the provided down-sampling configuration.If multiple profiles match, the first profile in the list
|
||||
* @brief Match the corresponding ob_stream_profile based on the provided decimation configuration. If multiple profiles match, the first profile in the list
|
||||
* is returned by default. If no matched profile is found, an error will be returned.
|
||||
*
|
||||
* @attention The stream profile returned by this function should be released with @ref ob_delete_stream_profile() when it is no longer needed.
|
||||
*
|
||||
* @param[in] profile_list The list of stream profiles.
|
||||
* @param[in] down_sample_config Down-sampling configuration. The actual resolution is determined by original resolution and the scale factor.
|
||||
* @param[in] format Stream format. If no matching condition is required, pass OB_FORMAT_ANY.
|
||||
* @param[in] fps Frame rate. If no matching condition is required, pass OB_FPS_ANY.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
* @param[in] profile_list The list of stream profiles.
|
||||
* @param[in] decimation_config Decimation configuration. The actual resolution is determined by original resolution and the scale factor.
|
||||
* @param[in] format Stream format. If no matching condition is required, pass OB_FORMAT_ANY.
|
||||
* @param[in] fps Frame rate. If no matching condition is required, pass OB_FPS_ANY.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return The matched stream profile.
|
||||
*/
|
||||
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile_by_down_sample_config(const ob_stream_profile_list *profile_list,
|
||||
ob_hardware_decimation_config down_sample_config,
|
||||
ob_format format, int fps, ob_error **error);
|
||||
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile_by_decimation_config(const ob_stream_profile_list *profile_list,
|
||||
ob_hardware_decimation_config decimation_config,
|
||||
ob_format format, int fps, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches,
|
||||
|
||||
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user