| OrbbecSDK 1.5.7 OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices

- 首页
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

Pipeline.hpp
浏览该文件的文档.
1
10 #pragma once
11
12 #include "Types.hpp"
13
14 #include <functional>
15 #include <memory>
16
17 struct PipelineImpl;
18 struct ConfigImpl;
19
20 namespace ob {
21 class FrameSet;
22 class Frame;
23 class Device;
24 class Playback;
25 class DeviceInfo;
26 class Config;
27 class StreamProfile;
28 class StreamProfileList;
29
30 typedef std::function<void(std::shared_ptr<FrameSet> frame)> FrameSetCallback;
31
32 class OB_EXTENSION_API Pipeline {
33 private:
34 std::unique_ptr<PipelineImpl> impl_;
35
36 public:
48 Pipeline();
58 Pipeline(std::shared_ptr<Device> device);
59
71 Pipeline(const char *filename);
72 ~Pipeline() noexcept;
73
85 void start(std::shared_ptr<Config> config);
86
100 void start(std::shared_ptr<Config> config, FrameSetCallback callback);
101
109 void stop();
110
122 std::shared_ptr<Config> getConfig();
123
137 std::shared_ptr<FrameSet> waitForFrames(uint32_t timeout_ms);
138
150 std::shared_ptr<Device> getDevice();
151
163 std::shared_ptr<Playback> getPlayback();
164
179 std::shared_ptr<StreamProfileList> getStreamProfileList(OBSensorType sensorType);
180
189 void enableFrameSync();
190
198 void disableFrameSync();
199
213 OBCameraParam getCameraParam();
214
230 std::shared_ptr<StreamProfileList> getD2CDepthProfileList(std::shared_ptr<StreamProfile> colorProfile, OBAlignMode alignMode);
231
248 OBRect getD2CValidArea(uint32_t minimumDistance, uint32_t maximumDistance = 0);
249
261 void switchConfig(std::shared_ptr<Config> config);
262
274 void startRecord(const char *filename);
275
283 void stopRecord();
284 };
285
286 class OB_EXTENSION_API Config {
287 private:
288 std::unique_ptr<ConfigImpl> impl_;
289
290 public:
291 Config();
292 ~Config() noexcept;
293
305 void enableStream(std::shared_ptr<StreamProfile> streamProfile);
313 void enableAllStream();
325 void disableStream(OBStreamType streamType);
333 void disableAllStream();
334
346 void setAlignMode(OBAlignMode mode);
347
359 void setDepthScaleRequire(bool enable);
360
376 void setD2CTargetResolution(uint32_t d2cTargetWidth, uint32_t d2cTargetHeight);
377
378 friend class Pipeline;
379 };
380
381 } // namespace ob
ob::Config
Definition: Pipeline.hpp:286
ob
Definition: Context.hpp:20
ob::FrameSetCallback
std::function< void(std::shared_ptr< FrameSet > frame)> FrameSetCallback
Definition: Pipeline.hpp:28
OBSensorType
OBSensorType
描述传感器类型的枚举值
Definition: ObTypes.h:159
OBCameraParam
相机参数
Definition: ObTypes.h:434
Types.hpp
提供SDK的结构体、枚举常量定义（依赖libobsensor/h/ObTypes.h）
OBRect
矩形
Definition: ObTypes.h:507
OBStreamType
OBStreamType
描述数据流类型的枚举值
Definition: ObTypes.h:178
ob::Pipeline
Definition: Pipeline.hpp:32
ob::StreamProfileList
Definition: StreamProfile.hpp:227
OBAlignMode
OBAlignMode
对齐模式
Definition: ObTypes.h:493
OB_EXTENSION_API
#define OB_EXTENSION_API
Definition: ObTypes.h:25