Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
librealsense::playback_device Class Reference

#include <playback_device.h>

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

Public Member Functions

bool compress_while_record () const override
 
bool contradicts (const stream_profile_interface *a, const std::vector< stream_profile > &others) const override
 
std::shared_ptr< matchercreate_matcher (const frame_holder &frame) const override
 
bool extend_to (rs2_extension extension_type, void **ext) override
 
std::shared_ptr< contextget_context () const override
 
rs2_playback_status get_current_status () const
 
platform::backend_device_group get_device_data () const override
 
uint64_t get_duration () const
 
std::pair< uint32_t, rs2_extrinsicsget_extrinsics (const stream_interface &stream) const override
 
const std::stringget_file_name () const
 
uint64_t get_position () const
 
std::vector< tagged_profileget_profiles_tags () const override
 
sensor_interfaceget_sensor (size_t i) override
 
const sensor_interfaceget_sensor (size_t i) const override
 
size_t get_sensors_count () const override
 
void hardware_reset () override
 
bool is_real_time () const
 
bool is_valid () const override
 
void pause ()
 
 playback_device (std::shared_ptr< context > context, std::shared_ptr< device_serializer::reader > serializer)
 
void resume ()
 
void seek_to_time (std::chrono::nanoseconds time)
 
void set_frame_rate (double rate)
 
void set_real_time (bool real_time)
 
void stop ()
 
void tag_profiles (stream_profiles profiles) const override
 
virtual ~playback_device ()
 
- Public Member Functions inherited from librealsense::device_interface
virtual ~device_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::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
 

Static Public Member Functions

static bool try_extend_snapshot (std::shared_ptr< extension_snapshot > &e, rs2_extension extension_type, void **ext)
 

Public Attributes

signal< playback_device, rs2_playback_statusplayback_status_changed
 

Private Member Functions

rs2_extrinsics calc_extrinsic (const rs2_extrinsics &from, const rs2_extrinsics &to)
 
device_serializer::nanoseconds calc_sleep_time (device_serializer::nanoseconds timestamp)
 
void catch_up ()
 
std::map< uint32_t, std::shared_ptr< playback_sensor > > create_playback_sensors (const device_serializer::device_snapshot &device_description)
 
template<typename T >
void do_loop (T op)
 
std::shared_ptr< stream_profile_interfaceget_stream (const std::map< unsigned, std::shared_ptr< playback_sensor >> &sensors_map, device_serializer::stream_identifier stream_id)
 
bool prefetch_done ()
 
void register_device_info (const device_serializer::device_snapshot &device_description)
 
void register_extrinsics (const device_serializer::device_snapshot &device_description)
 
void start ()
 
void stop_internal ()
 
void try_looping ()
 
void update_extensions (const device_serializer::device_snapshot &device_description)
 
void update_time_base (device_serializer::nanoseconds base_timestamp)
 

Private Attributes

std::map< uint32_t, std::shared_ptr< playback_sensor > > m_active_sensors
 
std::chrono::high_resolution_clock::time_point m_base_sys_time
 
device_serializer::nanoseconds m_base_timestamp
 
std::shared_ptr< contextm_context
 
device_serializer::device_snapshot m_device_description
 
std::vector< std::shared_ptr< lazy< rs2_extrinsics > > > m_extrinsics_fetchers
 
std::map< int, std::pair< uint32_t, rs2_extrinsics > > m_extrinsics_map
 
std::atomic_bool m_is_paused
 
std::atomic_bool m_is_started
 
device_serializer::nanoseconds m_last_published_timestamp
 
std::mutex m_last_published_timestamp_mutex
 
device_serializer::nanoseconds m_prev_timestamp
 
lazy< std::shared_ptr< dispatcher > > m_read_thread
 
std::shared_ptr< device_serializer::readerm_reader
 
std::atomic_bool m_real_time
 
std::atomic< double > m_sample_rate
 
std::map< uint32_t, std::shared_ptr< playback_sensor > > m_sensors
 

Detailed Description

Definition at line 17 of file playback_device.h.

Constructor & Destructor Documentation

playback_device::playback_device ( std::shared_ptr< context context,
std::shared_ptr< device_serializer::reader serializer 
)

Definition at line 14 of file playback_device.cpp.

playback_device::~playback_device ( )
virtual

Definition at line 145 of file playback_device.cpp.

Member Function Documentation

rs2_extrinsics playback_device::calc_extrinsic ( const rs2_extrinsics from,
const rs2_extrinsics to 
)
private

Definition at line 139 of file playback_device.cpp.

device_serializer::nanoseconds playback_device::calc_sleep_time ( device_serializer::nanoseconds  timestamp)
private

Definition at line 373 of file playback_device.cpp.

void playback_device::catch_up ( )
private

Definition at line 628 of file playback_device.cpp.

bool librealsense::playback_device::compress_while_record ( ) const
inlineoverridevirtual

Implements librealsense::device_interface.

Definition at line 58 of file playback_device.h.

bool librealsense::playback_device::contradicts ( const stream_profile_interface a,
const std::vector< stream_profile > &  others 
) const
inlineoverridevirtual

Implements librealsense::device_interface.

Definition at line 59 of file playback_device.h.

std::shared_ptr< matcher > playback_device::create_matcher ( const frame_holder frame) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 195 of file playback_device.cpp.

std::map< uint32_t, std::shared_ptr< playback_sensor > > playback_device::create_playback_sensors ( const device_serializer::device_snapshot device_description)
private

Definition at line 48 of file playback_device.cpp.

template<typename T >
void playback_device::do_loop ( op)
private

Definition at line 463 of file playback_device.cpp.

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

Implements librealsense::extendable_interface.

Definition at line 189 of file playback_device.cpp.

std::shared_ptr< context > playback_device::get_context ( ) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 163 of file playback_device.cpp.

rs2_playback_status playback_device::get_current_status ( ) const

Definition at line 262 of file playback_device.cpp.

platform::backend_device_group playback_device::get_device_data ( ) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 351 of file playback_device.cpp.

uint64_t playback_device::get_duration ( ) const

Definition at line 269 of file playback_device.cpp.

std::pair< uint32_t, rs2_extrinsics > playback_device::get_extrinsics ( const stream_interface stream) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 356 of file playback_device.cpp.

const std::string & playback_device::get_file_name ( ) const

Definition at line 619 of file playback_device.cpp.

uint64_t playback_device::get_position ( ) const

Definition at line 624 of file playback_device.cpp.

std::vector<tagged_profile> librealsense::playback_device::get_profiles_tags ( ) const
inlineoverridevirtual

Implements librealsense::device_interface.

Definition at line 51 of file playback_device.h.

sensor_interface & playback_device::get_sensor ( size_t  i)
overridevirtual

Implements librealsense::device_interface.

Definition at line 168 of file playback_device.cpp.

const sensor_interface & playback_device::get_sensor ( size_t  i) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 178 of file playback_device.cpp.

size_t playback_device::get_sensors_count ( ) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 173 of file playback_device.cpp.

std::shared_ptr< stream_profile_interface > playback_device::get_stream ( const std::map< unsigned, std::shared_ptr< playback_sensor >> &  sensors_map,
device_serializer::stream_identifier  stream_id 
)
private

Definition at line 121 of file playback_device.cpp.

void playback_device::hardware_reset ( )
overridevirtual

Implements librealsense::device_interface.

Definition at line 184 of file playback_device.cpp.

bool playback_device::is_real_time ( ) const

Definition at line 346 of file playback_device.cpp.

bool playback_device::is_valid ( ) const
overridevirtual

Implements librealsense::device_interface.

Definition at line 361 of file playback_device.cpp.

void playback_device::pause ( )

Definition at line 274 of file playback_device.cpp.

bool playback_device::prefetch_done ( )
private

Definition at line 512 of file playback_device.cpp.

void playback_device::register_device_info ( const device_serializer::device_snapshot device_description)
private

Definition at line 634 of file playback_device.cpp.

void playback_device::register_extrinsics ( const device_serializer::device_snapshot device_description)
private

Definition at line 658 of file playback_device.cpp.

void playback_device::resume ( )

Definition at line 311 of file playback_device.cpp.

void playback_device::seek_to_time ( std::chrono::nanoseconds  time)

Definition at line 218 of file playback_device.cpp.

void playback_device::set_frame_rate ( double  rate)

Definition at line 203 of file playback_device.cpp.

void playback_device::set_real_time ( bool  real_time)

Definition at line 340 of file playback_device.cpp.

void playback_device::start ( )
private

Definition at line 406 of file playback_device.cpp.

void playback_device::stop ( )

Definition at line 426 of file playback_device.cpp.

void playback_device::stop_internal ( )
private

Definition at line 443 of file playback_device.cpp.

void librealsense::playback_device::tag_profiles ( stream_profiles  profiles) const
inlineoverridevirtual

Implements librealsense::device_interface.

Definition at line 52 of file playback_device.h.

bool playback_device::try_extend_snapshot ( std::shared_ptr< extension_snapshot > &  e,
rs2_extension  extension_type,
void **  ext 
)
static

Definition at line 686 of file playback_device.cpp.

void playback_device::try_looping ( )
private

Definition at line 522 of file playback_device.cpp.

void playback_device::update_extensions ( const device_serializer::device_snapshot device_description)
private

Definition at line 714 of file playback_device.cpp.

void playback_device::update_time_base ( device_serializer::nanoseconds  base_timestamp)
private

Definition at line 366 of file playback_device.cpp.

Member Data Documentation

std::map<uint32_t, std::shared_ptr<playback_sensor> > librealsense::playback_device::m_active_sensors
private

Definition at line 87 of file playback_device.h.

std::chrono::high_resolution_clock::time_point librealsense::playback_device::m_base_sys_time
private

Definition at line 84 of file playback_device.h.

device_serializer::nanoseconds librealsense::playback_device::m_base_timestamp
private

Definition at line 85 of file playback_device.h.

std::shared_ptr<context> librealsense::playback_device::m_context
private

Definition at line 79 of file playback_device.h.

device_serializer::device_snapshot librealsense::playback_device::m_device_description
private

Definition at line 81 of file playback_device.h.

std::vector<std::shared_ptr<lazy<rs2_extrinsics> > > librealsense::playback_device::m_extrinsics_fetchers
private

Definition at line 91 of file playback_device.h.

std::map<int, std::pair<uint32_t, rs2_extrinsics> > librealsense::playback_device::m_extrinsics_map
private

Definition at line 92 of file playback_device.h.

std::atomic_bool librealsense::playback_device::m_is_paused
private

Definition at line 83 of file playback_device.h.

std::atomic_bool librealsense::playback_device::m_is_started
private

Definition at line 82 of file playback_device.h.

device_serializer::nanoseconds librealsense::playback_device::m_last_published_timestamp
private

Definition at line 93 of file playback_device.h.

std::mutex librealsense::playback_device::m_last_published_timestamp_mutex
private

Definition at line 94 of file playback_device.h.

device_serializer::nanoseconds librealsense::playback_device::m_prev_timestamp
private

Definition at line 90 of file playback_device.h.

lazy<std::shared_ptr<dispatcher> > librealsense::playback_device::m_read_thread
private

Definition at line 78 of file playback_device.h.

std::shared_ptr<device_serializer::reader> librealsense::playback_device::m_reader
private

Definition at line 80 of file playback_device.h.

std::atomic_bool librealsense::playback_device::m_real_time
private

Definition at line 89 of file playback_device.h.

std::atomic<double> librealsense::playback_device::m_sample_rate
private

Definition at line 88 of file playback_device.h.

std::map<uint32_t, std::shared_ptr<playback_sensor> > librealsense::playback_device::m_sensors
private

Definition at line 86 of file playback_device.h.

signal<playback_device, rs2_playback_status> librealsense::playback_device::playback_status_changed

Definition at line 45 of file playback_device.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