17 class sensor_interface;
18 class archive_interface;
19 class device_interface;
24 virtual std::shared_ptr<sensor_interface> get_sensor()
const = 0;
25 virtual void set_sensor(std::shared_ptr<sensor_interface> s) = 0;
36 virtual int get_stream_index()
const = 0;
37 virtual void set_stream_index(
int index) = 0;
39 virtual int get_unique_id()
const = 0;
40 virtual void set_unique_id(
int uid) = 0;
42 virtual rs2_stream get_stream_type()
const = 0;
50 virtual void set_format(
rs2_format format) = 0;
52 virtual uint32_t get_framerate()
const = 0;
53 virtual void set_framerate(uint32_t val) = 0;
55 virtual bool is_default()
const = 0;
56 virtual void make_default() = 0;
58 virtual std::shared_ptr<stream_profile_interface> clone()
const = 0;
68 virtual const byte* get_frame_data()
const = 0;
70 virtual rs2_time_t get_frame_timestamp()
const = 0;
72 virtual void set_timestamp(
double new_ts) = 0;
73 virtual unsigned long long get_frame_number()
const = 0;
76 virtual rs2_time_t get_frame_system_time()
const = 0;
78 virtual std::shared_ptr<stream_profile_interface> get_stream()
const = 0;
79 virtual void set_stream(std::shared_ptr<stream_profile_interface> sp) = 0;
81 virtual rs2_time_t get_frame_callback_start_time_point()
const = 0;
82 virtual void update_frame_callback_start_ts(
rs2_time_t ts) = 0;
84 virtual void acquire() = 0;
85 virtual void release() = 0;
86 virtual frame_interface* publish(std::shared_ptr<archive_interface> new_owner) = 0;
88 virtual void disable_continuation() = 0;
90 virtual void log_callback_start(
rs2_time_t timestamp) = 0;
91 virtual void log_callback_end(
rs2_time_t timestamp)
const = 0;
95 virtual void mark_fixed() = 0;
96 virtual bool is_fixed()
const = 0;
98 virtual void keep() = 0;
103 using on_frame = std::function<void(frame_interface*)>;
112 virtual void close() = 0;
116 virtual int register_before_streaming_changes_callback(std::function<
void(
bool)> callback) = 0;
117 virtual void unregister_before_start_callback(
int token) = 0;
119 virtual void stop() = 0;
122 virtual bool is_streaming()
const = 0;
138 virtual size_t get_sensors_count()
const = 0;
140 virtual void hardware_reset() = 0;
142 virtual std::shared_ptr<matcher> create_matcher(
const frame_holder&
frame)
const = 0;
144 virtual std::shared_ptr<context> get_context()
const = 0;
150 virtual bool is_valid()
const = 0;
161 virtual float get_depth_scale()
const = 0;
173 return m_depth_units;
176 void update(std::shared_ptr<extension_snapshot> ext)
override 178 if (
auto api = As<depth_sensor>(ext))
180 m_depth_units = api->get_depth_scale();
185 snapshot = std::make_shared<depth_sensor_snapshot>(*this);
199 virtual float get_stereo_baseline_mm()
const = 0;
209 m_stereo_baseline_mm(stereo_bl_mm) {}
213 return m_stereo_baseline_mm;
216 void update(std::shared_ptr<extension_snapshot> ext)
override 220 if (
auto api = As<depth_stereo_sensor>(ext))
222 m_stereo_baseline_mm = api->get_stereo_baseline_mm();
228 snapshot = std::make_shared<depth_stereo_sensor_snapshot>(*this);
237 float m_stereo_baseline_mm;
void create_snapshot(std::shared_ptr< depth_stereo_sensor > &snapshot) const override
Definition: streaming.h:226
void create_snapshot(std::shared_ptr< depth_sensor > &snapshot) const override
Definition: streaming.h:183
void enable_recording(std::function< void(const depth_sensor &)> recording_function) override
Definition: streaming.h:187
void update(std::shared_ptr< extension_snapshot > ext) override
Definition: streaming.h:176
unsigned char byte
Definition: types.h:33
Definition: streaming.h:63
std::shared_ptr< rs2_frame_callback > frame_callback_ptr
Definition: types.h:872
Definition: context.h:109
std::function< void(frame_interface *)> on_frame
Definition: streaming.h:103
void update(std::shared_ptr< extension_snapshot > ext) override
Definition: streaming.h:216
Definition: rs_types.h:102
Definition: streaming.h:131
depth_sensor_snapshot(float depth_units)
Definition: streaming.h:170
depth_stereo_sensor_snapshot(float depth_units, float stereo_bl_mm)
Definition: streaming.h:207
Definition: streaming.h:31
Definition: streaming.h:21
float get_stereo_baseline_mm() const
Definition: streaming.h:211
Definition: rs_types.h:112
Definition: streaming.h:46
std::shared_ptr< rs2_notifications_callback > notifications_callback_ptr
Definition: types.h:874
rs2_format
Format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:54
void enable_recording(std::function< void(const depth_stereo_sensor &)> recording_function) override
Definition: streaming.h:231
float get_depth_scale() const override
Definition: streaming.h:171
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
Definition: streaming.h:104
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:37
Definition: streaming.h:204
Definition: streaming.h:167
long long rs2_metadata_type
Definition: rs_types.h:180
Definition: streaming.h:106
Definition: extension.h:46
Definition: archive.h:462
Definition: streaming.h:158
Definition: extension.h:33
float m_depth_units
Definition: streaming.h:193
double rs2_time_t
Definition: rs_types.h:179
rs2_frame_metadata_value
Per-Frame-Metadata are set of read-only properties that might be exposed for each individual frame...
Definition: rs_frame.h:28
MAP_EXTENSION(RS2_EXTENSION_POINTS, librealsense::points)
Definition: streaming.h:196
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.
Definition: rs_frame.h:19