17 class sensor_interface;
18 class archive_interface;
19 class device_interface;
20 class processing_block_interface;
25 virtual std::shared_ptr<sensor_interface> get_sensor()
const = 0;
26 virtual void set_sensor(std::shared_ptr<sensor_interface>
s) = 0;
55 virtual int get_stream_index()
const = 0;
56 virtual void set_stream_index(
int index) = 0;
58 virtual int get_unique_id()
const = 0;
59 virtual void set_unique_id(
int uid) = 0;
61 virtual rs2_stream get_stream_type()
const = 0;
71 virtual uint32_t get_framerate()
const = 0;
74 virtual int get_tag()
const = 0;
75 virtual void tag_profile(
int tag) = 0;
77 virtual std::shared_ptr<stream_profile_interface> clone()
const = 0;
87 virtual int get_frame_data_size()
const = 0;
88 virtual const byte* get_frame_data()
const = 0;
89 virtual rs2_time_t get_frame_timestamp()
const = 0;
91 virtual void set_timestamp(
double new_ts) = 0;
92 virtual unsigned long long get_frame_number()
const = 0;
95 virtual rs2_time_t get_frame_system_time()
const = 0;
96 virtual std::shared_ptr<stream_profile_interface> get_stream()
const = 0;
97 virtual void set_stream(std::shared_ptr<stream_profile_interface> sp) = 0;
99 virtual rs2_time_t get_frame_callback_start_time_point()
const = 0;
100 virtual void update_frame_callback_start_ts(
rs2_time_t ts) = 0;
102 virtual void acquire() = 0;
103 virtual void release() = 0;
104 virtual frame_interface* publish(std::shared_ptr<archive_interface> new_owner) = 0;
105 virtual void unpublish() = 0;
107 virtual void disable_continuation() = 0;
110 virtual void log_callback_end(
rs2_time_t timestamp)
const = 0;
114 virtual void mark_fixed() = 0;
115 virtual bool is_fixed()
const = 0;
116 virtual void set_blocking(
bool state) = 0;
117 virtual bool is_blocking()
const = 0;
119 virtual void keep() = 0;
133 operator bool()
const {
return frame !=
nullptr; }
147 other.frame =
nullptr;
164 using on_frame = std::function<void(frame_interface*)>;
170 for (
auto&&
p : profiles)
205 void update(std::shared_ptr<extension_snapshot> ext)
override {}
220 virtual void create_snapshot(std::shared_ptr<recommended_proccesing_blocks_interface>& snapshot)
const override 222 snapshot = std::make_shared<recommended_proccesing_blocks_snapshot>(get_recommended_processing_blocks());
237 virtual void close() = 0;
241 virtual int register_before_streaming_changes_callback(std::function<
void(
bool)> callback) = 0;
242 virtual void unregister_before_start_callback(
int token) = 0;
244 virtual void stop() = 0;
247 virtual bool is_streaming()
const = 0;
263 virtual size_t get_sensors_count()
const = 0;
265 virtual void hardware_reset() = 0;
267 virtual std::shared_ptr<matcher> create_matcher(
const frame_holder&
frame)
const = 0;
269 virtual std::shared_ptr<context> get_context()
const = 0;
279 virtual std::vector<tagged_profile> get_profiles_tags()
const = 0;
283 virtual bool compress_while_record()
const = 0;
295 void create_snapshot(std::shared_ptr<color_sensor>& snapshot)
const override;
306 void update(std::shared_ptr<extension_snapshot> ext)
override 312 snapshot = std::make_shared<color_sensor_snapshot>(*this);
336 return m_depth_units;
339 void update(std::shared_ptr<extension_snapshot> ext)
override 341 if (
auto api = As<depth_sensor>(ext))
343 m_depth_units = api->get_depth_scale();
348 snapshot = std::make_shared<depth_sensor_snapshot>(*this);
362 virtual float get_stereo_baseline_mm()
const = 0;
372 m_stereo_baseline_mm(stereo_bl_mm) {}
376 return m_stereo_baseline_mm;
379 void update(std::shared_ptr<extension_snapshot> ext)
override 383 if (
auto api = As<depth_stereo_sensor>(ext))
385 m_stereo_baseline_mm = api->get_stereo_baseline_mm();
391 snapshot = std::make_shared<depth_stereo_sensor_snapshot>(*this);
virtual processing_blocks get_recommended_processing_blocks() const override
void create_snapshot(std::shared_ptr< depth_stereo_sensor > &snapshot) const override
void create_snapshot(std::shared_ptr< depth_sensor > &snapshot) const override
const char * rs2_format_to_string(rs2_format format)
float get_stereo_baseline_mm() const override
void create_snapshot(std::shared_ptr< color_sensor > &snapshot) const override
boost_foreach_argument_dependent_lookup_hack tag
void enable_recording(std::function< void(const depth_sensor &)> recording_function) override
void update(std::shared_ptr< extension_snapshot > ext) override
virtual void enable_recording(std::function< void(const recommended_proccesing_blocks_interface &)> recording_function) override
std::shared_ptr< rs2_frame_callback > frame_callback_ptr
frame_holder(frame_holder &&other)
std::function< void(frame_interface *)> on_frame
virtual bool is_blocking() const =0
void update(std::shared_ptr< extension_snapshot > ext) override
virtual processing_blocks get_recommended_processing_blocks() const override
GLsizei const GLchar *const * string
void enable_recording(std::function< void(const color_sensor &)> recording_function) override
#define LRS_EXTENSION_API
static const textual_icon stop
depth_sensor_snapshot(float depth_units)
recommended_proccesing_blocks_interface * _owner
bool is_valid(const plane_3d &p)
processing_blocks _blocks
depth_stereo_sensor_snapshot(float depth_units, float stereo_bl_mm)
std::ostream & operator<<(std::ostream &os, const stream_profiles &profiles)
GLboolean GLboolean GLboolean GLboolean a
void update(std::shared_ptr< extension_snapshot > ext) override
std::shared_ptr< rs2_notifications_callback > notifications_callback_ptr
recommended_proccesing_blocks_snapshot(const processing_blocks blocks)
GLint GLsizei GLsizei height
void enable_recording(std::function< void(const color_sensor &)> recording_function) override
GLint GLint GLsizei GLint GLenum format
std::string frame_to_string(const frame_interface &f)
virtual void create_snapshot(std::shared_ptr< recommended_proccesing_blocks_interface > &snapshot) const override
rs2_format
A stream's format identifies how binary data is encoded within a frame.
float get_depth_scale(rs2::device dev)
void enable_recording(std::function< void(const depth_stereo_sensor &)> recording_function) override
float get_depth_scale() const override
void update(std::shared_ptr< extension_snapshot > ext) override
std::vector< std::shared_ptr< stream_profile_interface >> stream_profiles
rs2_stream
Streams are different types of data provided by RealSense devices.
float m_stereo_baseline_mm
const char * rs2_stream_to_string(rs2_stream stream)
long long rs2_metadata_type
std::string frame_holder_to_string(const frame_holder &f)
static rs2::device get_device()
frame_interface * operator->() const
def get_extrinsics(src, dst)
recommended_proccesing_blocks_base(recommended_proccesing_blocks_interface *owner)
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...
MAP_EXTENSION(RS2_EXTENSION_POINTS, librealsense::points)
frame_holder(frame_interface *f)
rs2_timestamp_domain
Specifies the clock in relation to which the frame timestamp was measured.