OrbbecSDK 2.7.2
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
StreamProfile.hpp
Go to the documentation of this file.
1// Copyright (c) Orbbec Inc. All Rights Reserved.
2// Licensed under the MIT License.
3
8#pragma once
9
10#include "Types.hpp"
12#include "libobsensor/h/Error.h"
13#include <iostream>
14#include <memory>
15
16namespace ob {
17
18class StreamProfile : public std::enable_shared_from_this<StreamProfile> {
19protected:
20 const ob_stream_profile_t *impl_ = nullptr;
21
22public:
23 StreamProfile(StreamProfile &streamProfile) = delete;
24 StreamProfile &operator=(StreamProfile &streamProfile) = delete;
25
26 StreamProfile(StreamProfile &&streamProfile) noexcept : impl_(streamProfile.impl_) {
27 streamProfile.impl_ = nullptr;
28 }
29
30 StreamProfile &operator=(StreamProfile &&streamProfile) noexcept {
31 if(this != &streamProfile) {
32 ob_error *error = nullptr;
34 Error::handle(&error);
35 impl_ = streamProfile.impl_;
36 streamProfile.impl_ = nullptr;
37 }
38 return *this;
39 }
40
41 virtual ~StreamProfile() noexcept {
42 if(impl_) {
43 ob_error *error = nullptr;
45 Error::handle(&error);
46 }
47 }
48
49 const ob_stream_profile *getImpl() const {
50 return impl_;
51 }
52
59 ob_error *error = nullptr;
61 Error::handle(&error);
62 return format;
63 }
64
71 ob_error *error = nullptr;
73 Error::handle(&error);
74 return type;
75 }
76
82 OBExtrinsic getExtrinsicTo(std::shared_ptr<StreamProfile> target) const {
83 ob_error *error = nullptr;
84 auto extrinsic = ob_stream_profile_get_extrinsic_to(impl_, const_cast<ob_stream_profile_t *>(target->getImpl()), &error);
85 Error::handle(&error);
86 return extrinsic;
87 }
88
95 void bindExtrinsicTo(std::shared_ptr<StreamProfile> target, const OBExtrinsic &extrinsic) {
96 ob_error *error = nullptr;
97 ob_stream_profile_set_extrinsic_to(const_cast<ob_stream_profile_t *>(impl_), const_cast<const ob_stream_profile_t *>(target->getImpl()), extrinsic,
98 &error);
99 Error::handle(&error);
100 }
101
108 void bindExtrinsicTo(const OBStreamType &targetStreamType, const OBExtrinsic &extrinsic) {
109 ob_error *error = nullptr;
110 ob_stream_profile_set_extrinsic_to_type(const_cast<ob_stream_profile_t *>(impl_), targetStreamType, extrinsic, &error);
111 Error::handle(&error);
112 }
113
121 template <typename T> bool is() const;
122
130 template <typename T> std::shared_ptr<T> as() {
131 if(!is<T>()) {
132 throw std::runtime_error("Unsupported operation. Object's type is not the required type.");
133 }
134
135 return std::dynamic_pointer_cast<T>(shared_from_this());
136 }
137
145 template <typename T> std::shared_ptr<const T> as() const {
146 if(!is<T>()) {
147 throw std::runtime_error("Unsupported operation. Object's type is not the required type.");
148 }
149
150 return std::static_pointer_cast<const T>(shared_from_this());
151 }
152
153 // The following interfaces are deprecated and are retained here for compatibility purposes.
154 OBFormat format() const {
155 return getFormat();
156 }
157
159 return getType();
160 }
161
162protected:
163 explicit StreamProfile(const ob_stream_profile_t *impl) : impl_(impl) {}
164};
165
170public:
171 explicit VideoStreamProfile(const ob_stream_profile_t *impl) : StreamProfile(impl) {}
172
173 ~VideoStreamProfile() noexcept override = default;
174
180 uint32_t getFps() const {
181 ob_error *error = nullptr;
183 Error::handle(&error);
184 return fps;
185 }
186
192 uint32_t getWidth() const {
193 ob_error *error = nullptr;
195 Error::handle(&error);
196 return width;
197 }
198
204 uint32_t getHeight() const {
205 ob_error *error = nullptr;
207 Error::handle(&error);
208 return height;
209 }
210
217 ob_error *error = nullptr;
218 auto intrinsic = ob_video_stream_profile_get_intrinsic(impl_, &error);
219 Error::handle(&error);
220 return intrinsic;
221 }
222
228 void setIntrinsic(const OBCameraIntrinsic &intrinsic) {
229 ob_error *error = nullptr;
230 ob_video_stream_profile_set_intrinsic(const_cast<ob_stream_profile_t *>(impl_), intrinsic, &error);
231 Error::handle(&error);
232 }
233
241 ob_error *error = nullptr;
242 auto distortion = ob_video_stream_profile_get_distortion(impl_, &error);
243 Error::handle(&error);
244 return distortion;
245 }
246
252 void setDistortion(const OBCameraDistortion &distortion) {
253 ob_error *error = nullptr;
254 ob_video_stream_profile_set_distortion(const_cast<ob_stream_profile_t *>(impl_), distortion, &error);
255 Error::handle(&error);
256 }
257
265 ob_error *error = nullptr;
266 auto decimationConfig = ob_video_stream_profile_get_decimation_config(const_cast<ob_stream_profile_t *>(impl_), &error);
267 Error::handle(&error);
268 return decimationConfig;
269 }
270
271public:
272 // The following interfaces are deprecated and are retained here for compatibility purposes.
273 uint32_t fps() const {
274 return getFps();
275 }
276
277 uint32_t width() const {
278 return getWidth();
279 }
280
281 uint32_t height() const {
282 return getHeight();
283 }
284};
285
290public:
291 explicit AccelStreamProfile(const ob_stream_profile_t *impl) : StreamProfile(impl) {}
292
293 ~AccelStreamProfile() noexcept override = default;
294
306
313 ob_error *error = nullptr;
315 Error::handle(&error);
316 return sampleRate;
317 }
318
325 ob_error *error = nullptr;
326 auto intrinsic = ob_accel_stream_profile_get_intrinsic(impl_, &error);
327 Error::handle(&error);
328 return intrinsic;
329 }
330
331public:
332 // The following interfaces are deprecated and are retained here for compatibility purposes.
336
338 return getSampleRate();
339 }
340};
341
346public:
347 explicit GyroStreamProfile(const ob_stream_profile_t *impl) : StreamProfile(impl) {}
348
349 ~GyroStreamProfile() noexcept override = default;
350
357 ob_error *error = nullptr;
359 Error::handle(&error);
360 return fullScaleRange;
361 }
362
369 ob_error *error = nullptr;
371 Error::handle(&error);
372 return sampleRate;
373 }
374
381 ob_error *error = nullptr;
382 auto intrinsic = ob_gyro_stream_get_intrinsic(impl_, &error);
383 Error::handle(&error);
384 return intrinsic;
385 }
386
387public:
388 // The following interfaces are deprecated and are retained here for compatibility purposes.
392
394 return getSampleRate();
395 }
396};
397
401
403public:
404 explicit LiDARStreamProfile(const ob_stream_profile_t *impl) : StreamProfile(impl) {}
405
406 ~LiDARStreamProfile() noexcept override = default;
407
409 ob_error *error = nullptr;
410 auto rate = ob_lidar_stream_profile_get_scan_rate(impl_, &error);
411 Error::handle(&error);
412 return rate;
413 }
414};
415
416template <typename T> bool StreamProfile::is() const {
417 switch(this->getType()) {
418 case OB_STREAM_VIDEO:
419 case OB_STREAM_IR:
422 case OB_STREAM_COLOR:
425 case OB_STREAM_DEPTH:
428 return typeid(T) == typeid(VideoStreamProfile);
429 case OB_STREAM_ACCEL:
430 return typeid(T) == typeid(AccelStreamProfile);
431 case OB_STREAM_GYRO:
432 return typeid(T) == typeid(GyroStreamProfile);
433 case OB_STREAM_LIDAR:
434 return typeid(T) == typeid(LiDARStreamProfile);
435 default:
436 break;
437 }
438 return false;
439}
440
442public:
443 static std::shared_ptr<StreamProfile> create(const ob_stream_profile_t *impl) {
444 ob_error *error = nullptr;
445 const auto type = ob_stream_profile_get_type(impl, &error);
446 Error::handle(&error);
447 switch(type) {
448 case OB_STREAM_IR:
451 case OB_STREAM_DEPTH:
452 case OB_STREAM_COLOR:
455 case OB_STREAM_VIDEO:
457 return std::make_shared<VideoStreamProfile>(impl);
458 case OB_STREAM_ACCEL:
459 return std::make_shared<AccelStreamProfile>(impl);
460 case OB_STREAM_GYRO:
461 return std::make_shared<GyroStreamProfile>(impl);
462 case OB_STREAM_LIDAR:
463 return std::make_shared<LiDARStreamProfile>(impl);
464 default: {
465 ob_error *err = ob_create_error(OB_STATUS_ERROR, "Unsupported stream type.", "StreamProfileFactory::create", "", OB_EXCEPTION_TYPE_INVALID_VALUE);
466 Error::handle(&err);
467 return nullptr;
468 }
469 }
470 }
471};
472
474protected:
475 const ob_stream_profile_list_t *impl_;
476
477public:
478 explicit StreamProfileList(ob_stream_profile_list_t *impl) : impl_(impl) {}
480 ob_error *error = nullptr;
482 Error::handle(&error, false);
483 }
484
490 uint32_t getCount() const {
491 ob_error *error = nullptr;
493 Error::handle(&error);
494 return count;
495 }
496
505 std::shared_ptr<StreamProfile> getProfile(uint32_t index) const {
506 ob_error *error = nullptr;
507 auto profile = ob_stream_profile_list_get_profile(impl_, index, &error);
508 Error::handle(&error);
509 return StreamProfileFactory::create(profile);
510 }
511
523 std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(int width = OB_WIDTH_ANY, int height = OB_HEIGHT_ANY, OBFormat format = OB_FORMAT_ANY,
524 int fps = OB_FPS_ANY) const {
525 ob_error *error = nullptr;
526 auto profile = ob_stream_profile_list_get_video_stream_profile(impl_, width, height, format, fps, &error);
527 Error::handle(&error);
528 auto vsp = StreamProfileFactory::create(profile);
529 return vsp->as<VideoStreamProfile>();
530 }
531
542 std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(OBHardwareDecimationConfig decimationConfig, OBFormat format = OB_FORMAT_ANY,
543 int fps = OB_FPS_ANY) const {
544 ob_error *error = nullptr;
545 auto profile = ob_stream_profile_list_get_video_stream_profile_by_decimation_config(impl_, decimationConfig, format, fps, &error);
546 Error::handle(&error);
547 auto vsp = StreamProfileFactory::create(profile);
548 return vsp->as<VideoStreamProfile>();
549 }
550
558 std::shared_ptr<AccelStreamProfile> getAccelStreamProfile(OBAccelFullScaleRange fullScaleRange, OBAccelSampleRate sampleRate) const {
559 ob_error *error = nullptr;
560 auto profile = ob_stream_profile_list_get_accel_stream_profile(impl_, fullScaleRange, sampleRate, &error);
561 Error::handle(&error);
562 auto asp = StreamProfileFactory::create(profile);
563 return asp->as<AccelStreamProfile>();
564 }
565
573 std::shared_ptr<GyroStreamProfile> getGyroStreamProfile(OBGyroFullScaleRange fullScaleRange, OBGyroSampleRate sampleRate) const {
574 ob_error *error = nullptr;
575 auto profile = ob_stream_profile_list_get_gyro_stream_profile(impl_, fullScaleRange, sampleRate, &error);
576 Error::handle(&error);
577 auto gsp = StreamProfileFactory::create(profile);
578 return gsp->as<GyroStreamProfile>();
579 }
580
588 std::shared_ptr<LiDARStreamProfile> getLiDARStreamProfile(OBLiDARScanRate scanRate, OBFormat format) const {
589 ob_error *error = nullptr;
590 auto profile = ob_stream_profile_list_get_lidar_stream_profile(impl_, scanRate, format, &error);
591 Error::handle(&error);
592 auto lsp = StreamProfileFactory::create(profile);
593 return lsp->as<LiDARStreamProfile>();
594 }
595
596public:
597 // The following interfaces are deprecated and are retained here for compatibility purposes.
598 uint32_t count() const {
599 return getCount();
600 }
601};
602
603} // namespace ob
Functions for handling errors, mainly used for obtaining error messages.
OB_EXPORT ob_error * ob_create_error(ob_status status, const char *message, const char *function, const char *args, ob_exception_type exception_type)
Create a new error object.
OBLiDARScanRate
Data structures for LiDAR scan rate.
Definition ObTypes.h:665
@ OB_STATUS_ERROR
Definition ObTypes.h:78
OBGyroFullScaleRange
Enumeration of gyroscope ranges.
Definition ObTypes.h:622
struct ob_stream_profile_t ob_stream_profile
Definition ObTypes.h:31
OBFormat
Enumeration value describing the pixel format.
Definition ObTypes.h:210
OBStreamType
Enumeration value describing the type of data stream.
Definition ObTypes.h:151
@ OB_STREAM_CONFIDENCE
Definition ObTypes.h:162
@ OB_STREAM_RAW_PHASE
Definition ObTypes.h:161
@ OB_STREAM_GYRO
Definition ObTypes.h:158
@ OB_STREAM_IR
Definition ObTypes.h:154
@ OB_STREAM_DEPTH
Definition ObTypes.h:156
@ OB_STREAM_COLOR_RIGHT
Definition ObTypes.h:165
@ OB_STREAM_IR_RIGHT
Definition ObTypes.h:160
@ OB_STREAM_IR_LEFT
Definition ObTypes.h:159
@ OB_STREAM_VIDEO
Definition ObTypes.h:153
@ OB_STREAM_COLOR_LEFT
Definition ObTypes.h:164
@ OB_STREAM_ACCEL
Definition ObTypes.h:157
@ OB_STREAM_LIDAR
Definition ObTypes.h:163
@ OB_STREAM_COLOR
Definition ObTypes.h:155
enum OBIMUSampleRate OBGyroSampleRate
@ OB_EXCEPTION_TYPE_INVALID_VALUE
Definition ObTypes.h:106
OBAccelFullScaleRange
Enumeration of accelerometer ranges.
Definition ObTypes.h:640
enum OBIMUSampleRate OBAccelSampleRate
struct OBD2CTransform OBExtrinsic
#define OB_WIDTH_ANY
Definition ObTypes.h:44
#define OB_FPS_ANY
Definition ObTypes.h:46
#define OB_HEIGHT_ANY
Definition ObTypes.h:45
#define OB_FORMAT_ANY
Definition ObTypes.h:47
The stream profile related type is used to get information such as the width, height,...
OB_EXPORT ob_gyro_intrinsic ob_gyro_stream_get_intrinsic(const ob_stream_profile *profile, ob_error **error)
Get the intrinsic of the gyroscope stream.
OB_EXPORT ob_gyro_sample_rate ob_gyro_stream_profile_get_sample_rate(const ob_stream_profile *profile, ob_error **error)
Get the sampling frequency of the gyroscope stream.
OB_EXPORT ob_lidar_scan_rate ob_lidar_stream_profile_get_scan_rate(const ob_stream_profile *profile, ob_error **error)
Get the scan rate of the LiDAR stream.
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)
Match the corresponding ob_stream_profile based on the provided decimation configuration....
OB_EXPORT ob_stream_profile * ob_stream_profile_list_get_video_stream_profile(const ob_stream_profile_list *profile_list, int width, int height, ob_format format, int fps, ob_error **error)
Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matche...
OB_EXPORT ob_stream_profile * ob_stream_profile_list_get_accel_stream_profile(const ob_stream_profile_list *profile_list, ob_accel_full_scale_range full_scale_range, ob_accel_sample_rate sample_rate, ob_error **error)
Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matche...
OB_EXPORT uint32_t ob_stream_profile_list_get_count(const ob_stream_profile_list *profile_list, ob_error **error)
Get the number of StreamProfile lists.
OB_EXPORT ob_stream_profile * ob_stream_profile_list_get_profile(const ob_stream_profile_list *profile_list, int index, ob_error **error)
Get the corresponding StreamProfile by subscripting.
OB_EXPORT ob_format ob_stream_profile_get_format(const ob_stream_profile *profile, ob_error **error)
Get stream profile format.
OB_EXPORT uint32_t ob_video_stream_profile_get_fps(const ob_stream_profile *profile, ob_error **error)
Get the frame rate of the video stream.
OB_EXPORT void ob_video_stream_profile_set_intrinsic(ob_stream_profile *profile, ob_camera_intrinsic intrinsic, ob_error **error)
Set the intrinsic of the video stream profile.
OB_EXPORT void ob_video_stream_profile_set_distortion(ob_stream_profile *profile, ob_camera_distortion distortion, ob_error **error)
Set the distortion of the video stream profile.
OB_EXPORT void ob_delete_stream_profile(const ob_stream_profile *profile, ob_error **error)
Delete the stream configuration.
OB_EXPORT void ob_delete_stream_profile_list(const ob_stream_profile_list *profile_list, ob_error **error)
Delete the stream profile list.
OB_EXPORT ob_accel_intrinsic ob_accel_stream_profile_get_intrinsic(const ob_stream_profile *profile, ob_error **error)
Get the intrinsic of the accelerometer stream.
OB_EXPORT uint32_t ob_video_stream_profile_get_width(const ob_stream_profile *profile, ob_error **error)
Get the width of the video stream.
OB_EXPORT ob_hardware_decimation_config ob_video_stream_profile_get_decimation_config(const ob_stream_profile *profile, ob_error **error)
Get the decimation configuration of the video stream profile.
OB_EXPORT ob_gyro_full_scale_range ob_gyro_stream_profile_get_full_scale_range(const ob_stream_profile *profile, ob_error **error)
Get the full-scale range of the gyroscope stream.
OB_EXPORT ob_stream_profile * ob_stream_profile_list_get_lidar_stream_profile(const ob_stream_profile_list *profile_list, ob_lidar_scan_rate scan_rate, ob_format format, ob_error **error)
Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matche...
OB_EXPORT ob_accel_sample_rate ob_accel_stream_profile_get_sample_rate(const ob_stream_profile *profile, ob_error **error)
Get the sampling frequency of the accelerometer frame.
OB_EXPORT ob_stream_profile * ob_stream_profile_list_get_gyro_stream_profile(const ob_stream_profile_list *profile_list, ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate, ob_error **error)
Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matche...
OB_EXPORT void ob_stream_profile_set_extrinsic_to(ob_stream_profile *source, const ob_stream_profile *target, ob_extrinsic extrinsic, ob_error **error)
Set the extrinsic for source stream to target stream.
OB_EXPORT void ob_stream_profile_set_extrinsic_to_type(ob_stream_profile *source, const ob_stream_type type, ob_extrinsic extrinsic, ob_error **error)
Set the extrinsic for source stream to target stream type.
OB_EXPORT uint32_t ob_video_stream_profile_get_height(const ob_stream_profile *profile, ob_error **error)
Get the height of the video stream.
OB_EXPORT ob_camera_distortion ob_video_stream_profile_get_distortion(const ob_stream_profile *profile, ob_error **error)
Get the distortion of the video stream profile.
OB_EXPORT ob_camera_intrinsic ob_video_stream_profile_get_intrinsic(const ob_stream_profile *profile, ob_error **error)
Get the intrinsic of the video stream profile.
OB_EXPORT ob_accel_full_scale_range ob_accel_stream_profile_get_full_scale_range(const ob_stream_profile *profile, ob_error **error)
Get the full-scale range of the accelerometer stream.
OB_EXPORT ob_stream_type ob_stream_profile_get_type(const ob_stream_profile *profile, ob_error **error)
Get stream profile type.
OB_EXPORT ob_extrinsic ob_stream_profile_get_extrinsic_to(const ob_stream_profile *source, ob_stream_profile *target, ob_error **error)
Get the extrinsic for source stream to target stream.
Class representing an accelerometer stream profile.
AccelStreamProfile(const ob_stream_profile_t *impl)
OBAccelIntrinsic getIntrinsic() const
get the intrinsic parameters of the stream.
OBAccelSampleRate getSampleRate() const
Return the sampling frequency.
OBAccelFullScaleRange getFullScaleRange() const
Return the full scale range.
OBAccelSampleRate sampleRate() const
~AccelStreamProfile() noexcept override=default
OBAccelFullScaleRange fullScaleRange() const
static void handle(ob_error **error, bool throw_exception=true)
A static function to handle the ob_error and throw an exception if needed.
Definition Error.hpp:38
Class representing a gyroscope stream profile.
OBGyroFullScaleRange getFullScaleRange() const
Return the full scale range.
OBGyroSampleRate getSampleRate() const
Return the sampling frequency.
OBGyroIntrinsic getIntrinsic() const
get the intrinsic parameters of the stream.
GyroStreamProfile(const ob_stream_profile_t *impl)
~GyroStreamProfile() noexcept override=default
OBGyroSampleRate sampleRate() const
OBGyroFullScaleRange fullScaleRange() const
Class representing a LiDAR stream profile.
OBLiDARScanRate getScanRate() const
LiDARStreamProfile(const ob_stream_profile_t *impl)
~LiDARStreamProfile() noexcept override=default
static std::shared_ptr< StreamProfile > create(const ob_stream_profile_t *impl)
StreamProfile(StreamProfile &&streamProfile) noexcept
const ob_stream_profile_t * impl_
std::shared_ptr< const T > as() const
Converts object type to target type (const version).
virtual ~StreamProfile() noexcept
OBStreamType type() const
bool is() const
Check if frame object is compatible with the given type.
StreamProfile & operator=(StreamProfile &streamProfile)=delete
OBFormat format() const
OBExtrinsic getExtrinsicTo(std::shared_ptr< StreamProfile > target) const
Get the extrinsic parameters from current stream profile to the given target stream profile.
StreamProfile(StreamProfile &streamProfile)=delete
StreamProfile & operator=(StreamProfile &&streamProfile) noexcept
const ob_stream_profile * getImpl() const
void bindExtrinsicTo(const OBStreamType &targetStreamType, const OBExtrinsic &extrinsic)
Set the extrinsic parameters from current stream profile to the given target stream type.
std::shared_ptr< T > as()
Converts object type to target type.
void bindExtrinsicTo(std::shared_ptr< StreamProfile > target, const OBExtrinsic &extrinsic)
Set the extrinsic parameters from current stream profile to the given target stream profile.
OBStreamType getType() const
Get the type of stream.
OBFormat getFormat() const
Get the format of the stream.
StreamProfile(const ob_stream_profile_t *impl)
std::shared_ptr< GyroStreamProfile > getGyroStreamProfile(OBGyroFullScaleRange fullScaleRange, OBGyroSampleRate sampleRate) const
Match the corresponding gyroscope stream profile based on the passed-in parameters....
std::shared_ptr< StreamProfile > getProfile(uint32_t index) const
Return the StreamProfile object at the specified index.
uint32_t getCount() const
Return the number of StreamProfile objects.
std::shared_ptr< VideoStreamProfile > getVideoStreamProfile(OBHardwareDecimationConfig decimationConfig, OBFormat format=OB_FORMAT_ANY, int fps=OB_FPS_ANY) const
Match the corresponding video stream profile according to the decimation configuration....
const ob_stream_profile_list_t * impl_
std::shared_ptr< AccelStreamProfile > getAccelStreamProfile(OBAccelFullScaleRange fullScaleRange, OBAccelSampleRate sampleRate) const
Match the corresponding accelerometer stream profile based on the passed-in parameters....
std::shared_ptr< VideoStreamProfile > getVideoStreamProfile(int width=OB_WIDTH_ANY, int height=OB_HEIGHT_ANY, OBFormat format=OB_FORMAT_ANY, int fps=OB_FPS_ANY) const
Match the corresponding video stream profile based on the passed-in parameters. If multiple Match are...
std::shared_ptr< LiDARStreamProfile > getLiDARStreamProfile(OBLiDARScanRate scanRate, OBFormat format) const
Match the corresponding LiDAR stream profile based on the passed-in parameters. If multiple Match are...
uint32_t count() const
StreamProfileList(ob_stream_profile_list_t *impl)
Class representing a video stream profile.
uint32_t height() const
void setIntrinsic(const OBCameraIntrinsic &intrinsic)
Set the intrinsic parameters of the stream.
OBCameraDistortion getDistortion() const
Get the distortion parameters of the stream.
uint32_t getWidth() const
Return the width of the stream.
void setDistortion(const OBCameraDistortion &distortion)
Set the distortion parameters of the stream.
uint32_t getFps() const
Return the frame rate of the stream.
OBCameraIntrinsic getIntrinsic() const
Get the intrinsic parameters of the stream.
OBHardwareDecimationConfig getDecimationConfig() const
Get the decimation configuration of the stream. Includes original resolution and scale factor.
VideoStreamProfile(const ob_stream_profile_t *impl)
~VideoStreamProfile() noexcept override=default
uint32_t getHeight() const
Return the height of the stream.
Definition Context.hpp:22
Structure for accelerometer intrinsic parameters.
Definition ObTypes.h:418
Structure for distortion parameters.
Definition ObTypes.h:443
Structure for camera intrinsic parameters.
Definition ObTypes.h:406
Structure for gyroscope intrinsic parameters.
Definition ObTypes.h:431
The error class exposed by the SDK, users can get detailed error information according to the error.
Definition ObTypes.h:119