Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
librealsense::platform::v4l_uvc_device Class Reference

#include <backend-v4l2.h>

Inheritance diagram for librealsense::platform::v4l_uvc_device:
Inheritance graph
[legend]

Public Member Functions

void close (stream_profile) override
 
std::string fourcc_to_string (uint32_t id) const
 
std::string get_device_location () const override
 
power_state get_power_state () const override
 
std::vector< stream_profileget_profiles () const override
 
bool get_pu (rs2_option opt, int32_t &value) const override
 
control_range get_pu_range (rs2_option option) const override
 
usb_spec get_usb_specification () const override
 
bool get_xu (const extension_unit &xu, uint8_t control, uint8_t *data, int size) const override
 
control_range get_xu_range (const extension_unit &xu, uint8_t control, int len) const override
 
void init_xu (const extension_unit &) override
 
void lock () const override
 
void poll ()
 
void probe_and_commit (stream_profile profile, frame_callback callback, int buffers) override
 
void set_power_state (power_state state) override
 
bool set_pu (rs2_option opt, int32_t value) override
 
bool set_xu (const extension_unit &xu, uint8_t control, const uint8_t *data, int size) override
 
void signal_stop ()
 
void start_callbacks () override
 
void stop_callbacks () override
 
void stream_on (std::function< void(const notification &n)> error_handler) override
 
void unlock () const override
 
 v4l_uvc_device (const uvc_device_info &info, bool use_memory_map=false)
 
 ~v4l_uvc_device () override
 
- Public Member Functions inherited from librealsense::platform::uvc_device
virtual ~uvc_device ()=default
 

Static Public Member Functions

static void foreach_uvc_device (std::function< void(const uvc_device_info &, const std::string &)> action)
 

Protected Member Functions

virtual void acquire_metadata (buffers_mgr &buf_mgr, fd_set &fds, bool compressed_format=false) override
 
virtual void allocate_io_buffers (size_t num) override
 
virtual void capture_loop () override
 
virtual bool has_metadata () const override
 
virtual void map_device_descriptor () override
 
virtual void negotiate_kernel_buffers (size_t num) const override
 
virtual void prepare_capture_buffers () override
 
virtual void set_format (stream_profile profile) override
 
virtual void stop_data_capture () override
 
virtual void streamoff () const override
 
virtual void streamon () const override
 
virtual void unmap_device_descriptor () override
 

Static Protected Member Functions

static uint32_t get_cid (rs2_option option)
 

Protected Attributes

buffers_mgr _buf_dispatch
 
std::vector< std::shared_ptr< buffer > > _buffers
 
frame_callback _callback
 
std::string _device_path = ""
 
usb_spec _device_usb_spec = usb_undefined
 
std::vector< int > _fds
 
uvc_device_info _info
 
std::atomic< bool > _is_alive
 
std::atomic< bool > _is_capturing
 
std::atomic< bool > _is_started
 
int _max_fd = 0
 
std::string _name = ""
 
std::unique_ptr< named_mutex_named_mtx
 
stream_profile _profile
 
power_state _state = D3
 
std::unique_ptr< std::thread > _thread
 
bool _use_memory_map
 
- Protected Attributes inherited from librealsense::platform::uvc_device
std::function< void(const notification &n)> _error_handler
 

Private Attributes

int _fd = 0
 
int _stop_pipe_fd [2]
 

Detailed Description

Definition at line 255 of file backend-v4l2.h.

Constructor & Destructor Documentation

librealsense::platform::v4l_uvc_device::v4l_uvc_device ( const uvc_device_info info,
bool  use_memory_map = false 
)

Definition at line 676 of file backend-v4l2.cpp.

librealsense::platform::v4l_uvc_device::~v4l_uvc_device ( )
override

Definition at line 704 of file backend-v4l2.cpp.

Member Function Documentation

void librealsense::platform::v4l_uvc_device::acquire_metadata ( buffers_mgr buf_mgr,
fd_set &  fds,
bool  compressed_format = false 
)
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::allocate_io_buffers ( size_t  num)
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::capture_loop ( )
overrideprotectedvirtual

Implements librealsense::platform::v4l_uvc_interface.

Definition at line 1433 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::close ( stream_profile  )
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 838 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::foreach_uvc_device ( std::function< void(const uvc_device_info &, const std::string &)>  action)
static

Definition at line 494 of file backend-v4l2.cpp.

std::string librealsense::platform::v4l_uvc_device::fourcc_to_string ( uint32_t  id) const

Definition at line 857 of file backend-v4l2.cpp.

uint32_t librealsense::platform::v4l_uvc_device::get_cid ( rs2_option  option)
staticprotected

Definition at line 1411 of file backend-v4l2.cpp.

std::string librealsense::platform::v4l_uvc_device::get_device_location ( ) const
inlineoverridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 301 of file backend-v4l2.h.

power_state librealsense::platform::v4l_uvc_device::get_power_state ( ) const
inlineoverridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 283 of file backend-v4l2.h.

std::vector< stream_profile > librealsense::platform::v4l_uvc_device::get_profiles ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1314 of file backend-v4l2.cpp.

bool librealsense::platform::v4l_uvc_device::get_pu ( rs2_option  opt,
int32_t value 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1256 of file backend-v4l2.cpp.

control_range librealsense::platform::v4l_uvc_device::get_pu_range ( rs2_option  option) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1288 of file backend-v4l2.cpp.

usb_spec librealsense::platform::v4l_uvc_device::get_usb_specification ( ) const
inlineoverridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 302 of file backend-v4l2.h.

bool librealsense::platform::v4l_uvc_device::get_xu ( const extension_unit xu,
uint8_t  control,
uint8_t data,
int  size 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1166 of file backend-v4l2.cpp.

control_range librealsense::platform::v4l_uvc_device::get_xu_range ( const extension_unit xu,
uint8_t  control,
int  len 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1180 of file backend-v4l2.cpp.

bool librealsense::platform::v4l_uvc_device::has_metadata ( ) const
overrideprotectedvirtual

Implements librealsense::platform::v4l_uvc_interface.

Definition at line 1452 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::init_xu ( const extension_unit )
inlineoverridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 285 of file backend-v4l2.h.

void librealsense::platform::v4l_uvc_device::lock ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1402 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::map_device_descriptor ( )
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::negotiate_kernel_buffers ( size_t  num) const
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::poll ( )

Definition at line 899 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::prepare_capture_buffers ( )
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::probe_and_commit ( stream_profile  profile,
frame_callback  callback,
int  buffers 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 714 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::set_format ( stream_profile  profile)
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::set_power_state ( power_state  state)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1138 of file backend-v4l2.cpp.

bool librealsense::platform::v4l_uvc_device::set_pu ( rs2_option  opt,
int32_t  value 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1273 of file backend-v4l2.cpp.

bool librealsense::platform::v4l_uvc_device::set_xu ( const extension_unit xu,
uint8_t  control,
const uint8_t data,
int  size 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1152 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::signal_stop ( )

Definition at line 866 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::start_callbacks ( )
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 828 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::stop_callbacks ( )
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 833 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::stop_data_capture ( )
overrideprotectedvirtual

Implements librealsense::platform::v4l_uvc_interface.

Definition at line 813 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::stream_on ( std::function< void(const notification &n)>  error_handler)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 791 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::streamoff ( ) const
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::streamon ( ) const
overrideprotectedvirtual
void librealsense::platform::v4l_uvc_device::unlock ( ) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1406 of file backend-v4l2.cpp.

void librealsense::platform::v4l_uvc_device::unmap_device_descriptor ( )
overrideprotectedvirtual

Member Data Documentation

buffers_mgr librealsense::platform::v4l_uvc_device::_buf_dispatch
protected

Definition at line 340 of file backend-v4l2.h.

std::vector<std::shared_ptr<buffer> > librealsense::platform::v4l_uvc_device::_buffers
protected

Definition at line 329 of file backend-v4l2.h.

frame_callback librealsense::platform::v4l_uvc_device::_callback
protected

Definition at line 331 of file backend-v4l2.h.

std::string librealsense::platform::v4l_uvc_device::_device_path = ""
protected

Definition at line 325 of file backend-v4l2.h.

usb_spec librealsense::platform::v4l_uvc_device::_device_usb_spec = usb_undefined
protected

Definition at line 326 of file backend-v4l2.h.

int librealsense::platform::v4l_uvc_device::_fd = 0
private

Definition at line 343 of file backend-v4l2.h.

std::vector<int> librealsense::platform::v4l_uvc_device::_fds
protected

Definition at line 339 of file backend-v4l2.h.

uvc_device_info librealsense::platform::v4l_uvc_device::_info
protected

Definition at line 327 of file backend-v4l2.h.

std::atomic<bool> librealsense::platform::v4l_uvc_device::_is_alive
protected

Definition at line 333 of file backend-v4l2.h.

std::atomic<bool> librealsense::platform::v4l_uvc_device::_is_capturing
protected

Definition at line 332 of file backend-v4l2.h.

std::atomic<bool> librealsense::platform::v4l_uvc_device::_is_started
protected

Definition at line 334 of file backend-v4l2.h.

int librealsense::platform::v4l_uvc_device::_max_fd = 0
protected

Definition at line 338 of file backend-v4l2.h.

std::string librealsense::platform::v4l_uvc_device::_name = ""
protected

Definition at line 324 of file backend-v4l2.h.

std::unique_ptr<named_mutex> librealsense::platform::v4l_uvc_device::_named_mtx
protected

Definition at line 336 of file backend-v4l2.h.

stream_profile librealsense::platform::v4l_uvc_device::_profile
protected

Definition at line 330 of file backend-v4l2.h.

power_state librealsense::platform::v4l_uvc_device::_state = D3
protected

Definition at line 323 of file backend-v4l2.h.

int librealsense::platform::v4l_uvc_device::_stop_pipe_fd[2]
private

Definition at line 344 of file backend-v4l2.h.

std::unique_ptr<std::thread> librealsense::platform::v4l_uvc_device::_thread
protected

Definition at line 335 of file backend-v4l2.h.

bool librealsense::platform::v4l_uvc_device::_use_memory_map
protected

Definition at line 337 of file backend-v4l2.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:39