Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
librealsense::playback_sensor Class Reference

#include <playback_sensor.h>

Inheritance diagram for librealsense::playback_sensor:
Inheritance graph
[legend]

Public Types

using frame_interface_callback_t = std::function< void(frame_holder)>
 

Public Member Functions

void close () override
 
bool extend_to (rs2_extension extension_type, void **ext) override
 
void flush_pending_frames ()
 
stream_profiles get_active_streams () const override
 
device_interfaceget_device () override
 
frame_callback_ptr get_frames_callback () const override
 
notifications_callback_ptr get_notifications_callback () const override
 
virtual processing_blocks get_recommended_processing_blocks () const override
 
stream_profiles get_stream_profiles (int tag=profile_tag::PROFILE_TAG_ANY) const override
 
template<class T , class K , class P >
void handle_frame (frame_holder frame, bool is_real_time, T calc_sleep, K is_paused, P update_last_pushed_frame)
 
bool is_streaming () const override
 
void open (const stream_profiles &requests) override
 
 playback_sensor (device_interface &parent_device, const device_serializer::sensor_snapshot &sensor_description)
 
void raise_notification (const notification &n)
 
int register_before_streaming_changes_callback (std::function< void(bool)> callback) override
 
void register_notifications_callback (notifications_callback_ptr callback) override
 
void set_frames_callback (frame_callback_ptr callback) override
 
void start (frame_callback_ptr callback) override
 
void stop () override
 
void stop (bool invoke_required)
 
bool streams_contains_one_frame_or_more ()
 
void unregister_before_start_callback (int token) override
 
void update (const device_serializer::sensor_snapshot &sensor_snapshot)
 
void update_option (rs2_option id, std::shared_ptr< option > option)
 
virtual ~playback_sensor ()
 
- Public Member Functions inherited from librealsense::sensor_interface
virtual ~sensor_interface ()=default
 
- Public Member Functions inherited from librealsense::info_interface
virtual ~info_interface ()=default
 
- Public Member Functions inherited from librealsense::recordable< info_interface >
virtual ~recordable ()=default
 
- Public Member Functions inherited from librealsense::options_interface
virtual ~options_interface ()=default
 
- Public Member Functions inherited from librealsense::recordable< options_interface >
virtual ~recordable ()=default
 
- Public Member Functions inherited from librealsense::recommended_proccesing_blocks_interface
virtual ~recommended_proccesing_blocks_interface ()=default
 
- Public Member Functions inherited from librealsense::extendable_interface
virtual ~extendable_interface ()=default
 
- Public Member Functions inherited from librealsense::info_container
void create_snapshot (std::shared_ptr< info_interface > &snapshot) const override
 
void enable_recording (std::function< void(const info_interface &)> record_action) override
 
const std::stringget_info (rs2_camera_info info) const override
 
void register_info (rs2_camera_info info, const std::string &val)
 
bool supports_info (rs2_camera_info info) const override
 
void update (std::shared_ptr< extension_snapshot > ext) override
 
void update_info (rs2_camera_info info, const std::string &val)
 
- Public Member Functions inherited from librealsense::extension_snapshot
virtual ~extension_snapshot ()=default
 
- Public Member Functions inherited from librealsense::options_container
void create_snapshot (std::shared_ptr< options_interface > &snapshot) const override
 
void enable_recording (std::function< void(const options_interface &)> record_action) override
 
optionget_option (rs2_option id) override
 
const optionget_option (rs2_option id) const override
 
std::shared_ptr< optionget_option_handler (rs2_option id)
 
std::shared_ptr< optionget_option_handler (rs2_option id) const
 
virtual const char * get_option_name (rs2_option option) const override
 
std::vector< rs2_optionget_supported_options () const override
 
void register_option (rs2_option id, std::shared_ptr< option > option)
 
bool supports_option (rs2_option id) const override
 
void unregister_option (rs2_option id)
 
void update (std::shared_ptr< extension_snapshot > ext) override
 

Public Attributes

signal< playback_sensor, const std::vector< device_serializer::stream_identifier > & > closed
 
signal< playback_sensor, const std::vector< device_serializer::stream_identifier > & > opened
 
signal< playback_sensor, uint32_t, frame_callback_ptrstarted
 
signal< playback_sensor, uint32_t, bool > stopped
 

Protected Member Functions

void set_active_streams (const stream_profiles &requests)
 

Private Types

using stream_unique_id = int
 

Private Member Functions

void register_sensor_infos (const device_serializer::sensor_snapshot &sensor_snapshot)
 
void register_sensor_options (const device_serializer::sensor_snapshot &sensor_snapshot)
 
void register_sensor_streams (const stream_profiles &vector)
 

Private Attributes

const unsigned int _default_queue_size
 
notifications_processor _notifications_processor
 
std::mutex m_active_profile_mutex
 
stream_profiles m_active_streams
 
stream_profiles m_available_profiles
 
std::map< stream_unique_id, std::shared_ptr< dispatcher > > m_dispatchers
 
std::atomic< bool > m_is_started
 
std::mutex m_mutex
 
device_interfacem_parent_device
 
device_serializer::sensor_snapshot m_sensor_description
 
uint32_t m_sensor_id
 
std::map< std::pair< rs2_stream, uint32_t >, std::shared_ptr< stream_profile_interface > > m_streams
 
frame_callback_ptr m_user_callback
 

Additional Inherited Members

- Protected Attributes inherited from librealsense::options_container
std::map< rs2_option, std::shared_ptr< option > > _options
 
std::function< void(const options_interface &)> _recording_function = [](const options_interface&) {}
 

Detailed Description

Definition at line 16 of file playback_sensor.h.

Member Typedef Documentation

Definition at line 23 of file playback_sensor.h.

Definition at line 79 of file playback_sensor.h.

Constructor & Destructor Documentation

playback_sensor::playback_sensor ( device_interface parent_device,
const device_serializer::sensor_snapshot sensor_description 
)

Definition at line 28 of file playback_sensor.cpp.

playback_sensor::~playback_sensor ( )
virtual

Definition at line 40 of file playback_sensor.cpp.

Member Function Documentation

void playback_sensor::close ( )
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 104 of file playback_sensor.cpp.

bool playback_sensor::extend_to ( rs2_extension  extension_type,
void **  ext 
)
overridevirtual

Implements librealsense::extendable_interface.

Definition at line 172 of file playback_sensor.cpp.

void playback_sensor::flush_pending_frames ( )

Definition at line 188 of file playback_sensor.cpp.

stream_profiles playback_sensor::get_active_streams ( ) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 280 of file playback_sensor.cpp.

device_interface & playback_sensor::get_device ( )
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 178 of file playback_sensor.cpp.

frame_callback_ptr playback_sensor::get_frames_callback ( ) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 272 of file playback_sensor.cpp.

notifications_callback_ptr playback_sensor::get_notifications_callback ( ) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 130 of file playback_sensor.cpp.

virtual processing_blocks librealsense::playback_sensor::get_recommended_processing_blocks ( ) const
inlineoverridevirtual
stream_profiles playback_sensor::get_stream_profiles ( int  tag = profile_tag::PROFILE_TAG_ANY) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 54 of file playback_sensor.cpp.

template<class T , class K , class P >
void librealsense::playback_sensor::handle_frame ( frame_holder  frame,
bool  is_real_time,
calc_sleep,
is_paused,
update_last_pushed_frame 
)
inline

Definition at line 100 of file playback_sensor.h.

bool playback_sensor::is_streaming ( ) const
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 168 of file playback_sensor.cpp.

void playback_sensor::open ( const stream_profiles requests)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 69 of file playback_sensor.cpp.

void playback_sensor::raise_notification ( const notification n)

Definition at line 303 of file playback_sensor.cpp.

int playback_sensor::register_before_streaming_changes_callback ( std::function< void(bool)>  callback)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 292 of file playback_sensor.cpp.

void playback_sensor::register_notifications_callback ( notifications_callback_ptr  callback)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 124 of file playback_sensor.cpp.

void playback_sensor::register_sensor_infos ( const device_serializer::sensor_snapshot sensor_snapshot)
private

Definition at line 207 of file playback_sensor.cpp.

void playback_sensor::register_sensor_options ( const device_serializer::sensor_snapshot sensor_snapshot)
private

Definition at line 233 of file playback_sensor.cpp.

void playback_sensor::register_sensor_streams ( const stream_profiles vector)
private

Definition at line 196 of file playback_sensor.cpp.

void playback_sensor::set_active_streams ( const stream_profiles requests)
protected

Definition at line 285 of file playback_sensor.cpp.

void playback_sensor::set_frames_callback ( frame_callback_ptr  callback)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 276 of file playback_sensor.cpp.

void playback_sensor::start ( frame_callback_ptr  callback)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 136 of file playback_sensor.cpp.

void playback_sensor::stop ( )
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 163 of file playback_sensor.cpp.

void playback_sensor::stop ( bool  invoke_required)

Definition at line 148 of file playback_sensor.cpp.

bool playback_sensor::streams_contains_one_frame_or_more ( )

Definition at line 44 of file playback_sensor.cpp.

void playback_sensor::unregister_before_start_callback ( int  token)
overridevirtual

Implements librealsense::sensor_interface.

Definition at line 298 of file playback_sensor.cpp.

void playback_sensor::update ( const device_serializer::sensor_snapshot sensor_snapshot)

Definition at line 267 of file playback_sensor.cpp.

void playback_sensor::update_option ( rs2_option  id,
std::shared_ptr< option option 
)

Definition at line 183 of file playback_sensor.cpp.

Member Data Documentation

const unsigned int librealsense::playback_sensor::_default_queue_size
private

Definition at line 90 of file playback_sensor.h.

notifications_processor librealsense::playback_sensor::_notifications_processor
private

Definition at line 78 of file playback_sensor.h.

signal<playback_sensor, const std::vector<device_serializer::stream_identifier>& > librealsense::playback_sensor::closed

Definition at line 27 of file playback_sensor.h.

std::mutex librealsense::playback_sensor::m_active_profile_mutex
mutableprivate

Definition at line 89 of file playback_sensor.h.

stream_profiles librealsense::playback_sensor::m_active_streams
private

Definition at line 88 of file playback_sensor.h.

stream_profiles librealsense::playback_sensor::m_available_profiles
private

Definition at line 87 of file playback_sensor.h.

std::map<stream_unique_id, std::shared_ptr<dispatcher> > librealsense::playback_sensor::m_dispatchers
private

Definition at line 80 of file playback_sensor.h.

std::atomic<bool> librealsense::playback_sensor::m_is_started
private

Definition at line 81 of file playback_sensor.h.

std::mutex librealsense::playback_sensor::m_mutex
private

Definition at line 84 of file playback_sensor.h.

device_interface& librealsense::playback_sensor::m_parent_device
private

Definition at line 86 of file playback_sensor.h.

device_serializer::sensor_snapshot librealsense::playback_sensor::m_sensor_description
private

Definition at line 82 of file playback_sensor.h.

uint32_t librealsense::playback_sensor::m_sensor_id
private

Definition at line 83 of file playback_sensor.h.

std::map<std::pair<rs2_stream, uint32_t>, std::shared_ptr<stream_profile_interface> > librealsense::playback_sensor::m_streams
private

Definition at line 85 of file playback_sensor.h.

frame_callback_ptr librealsense::playback_sensor::m_user_callback
private

Definition at line 77 of file playback_sensor.h.

signal<playback_sensor, const std::vector<device_serializer::stream_identifier>& > librealsense::playback_sensor::opened

Definition at line 26 of file playback_sensor.h.

signal<playback_sensor, uint32_t, frame_callback_ptr> librealsense::playback_sensor::started

Definition at line 24 of file playback_sensor.h.

signal<playback_sensor, uint32_t, bool> librealsense::playback_sensor::stopped

Definition at line 25 of file playback_sensor.h.


The documentation for this class was generated from the following files:


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