config.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include <map>
7 #include <utility>
8 
9 #include "resolver.h"
10 
11 namespace librealsense
12 {
13  namespace pipeline
14  {
15  class profile;
16  class pipeline;
17 
18  class config
19  {
20  public:
21  config();
23  void enable_all_stream();
24  void enable_device(const std::string& serial);
25  void enable_device_from_file(const std::string& file, bool repeat_playback);
26  void enable_record_to_file(const std::string& file);
27  void disable_stream(rs2_stream stream, int index = -1);
28  void disable_all_streams();
29  std::shared_ptr<profile> resolve(std::shared_ptr<pipeline> pipe, const std::chrono::milliseconds& timeout = std::chrono::milliseconds(0));
30  bool can_resolve(std::shared_ptr<pipeline> pipe);
31  bool get_repeat_playback();
32 
33  //Non top level API
34  std::shared_ptr<profile> get_cached_resolved_profile();
35 
36  config(const config& other)
37  {
42  _resolved_profile = nullptr;
44  }
45  private:
47  {
51  };
52  std::shared_ptr<device_interface> get_or_add_playback_device(std::shared_ptr<context> ctx, const std::string& file);
53  std::shared_ptr<device_interface> resolve_device_requests(std::shared_ptr<pipeline> pipe, const std::chrono::milliseconds& timeout);
54  stream_profiles get_default_configuration(std::shared_ptr<device_interface> dev);
55  std::shared_ptr<profile> resolve(std::shared_ptr<device_interface> dev);
57 
59  std::map<std::pair<rs2_stream, int>, stream_profile> _stream_requests;
60  std::mutex _mtx;
61  bool _enable_all_streams = false;
62  std::shared_ptr<profile> _resolved_profile;
64  std::vector<std::pair<rs2_stream, int>> _streams_to_disable;
65  };
66  }
67 }
std::shared_ptr< device_interface > get_or_add_playback_device(std::shared_ptr< context > ctx, const std::string &file)
bool can_resolve(std::shared_ptr< pipeline > pipe)
GLsizei const GLchar *const * string
void enable_device(const std::string &serial)
config(const config &other)
Definition: config.h:36
void enable_device_from_file(const std::string &file, bool repeat_playback)
std::shared_ptr< device_interface > resolve_device_requests(std::shared_ptr< pipeline > pipe, const std::chrono::milliseconds &timeout)
GLuint index
void disable_stream(rs2_stream stream, int index=-1)
unsigned int uint32_t
Definition: stdint.h:80
GLint GLsizei GLsizei height
GLint GLint GLsizei GLint GLenum format
std::shared_ptr< profile > get_cached_resolved_profile()
rs2_format
A stream&#39;s format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:59
stream_profiles get_default_configuration(std::shared_ptr< device_interface > dev)
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
Definition: streaming.h:165
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:42
std::shared_ptr< profile > _resolved_profile
Definition: config.h:62
util::config filter_stream_requests(const stream_profiles &profiles) const
device_request _device_request
Definition: config.h:58
GLbitfield GLuint64 timeout
std::vector< std::pair< rs2_stream, int > > _streams_to_disable
Definition: config.h:64
void enable_record_to_file(const std::string &file)
std::map< std::pair< rs2_stream, int >, stream_profile > _stream_requests
Definition: config.h:59
void enable_stream(rs2_stream stream, int index, uint32_t width, uint32_t height, rs2_format format, uint32_t framerate)
GLint GLsizei width
std::shared_ptr< profile > resolve(std::shared_ptr< pipeline > pipe, const std::chrono::milliseconds &timeout=std::chrono::milliseconds(0))


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:12