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

#include <mf-uvc.h>

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

Public Member Functions

void close (stream_profile profile) override
 
IAMCameraControl * get_camera_control () 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 opt) const override
 
usb_spec get_usb_specification () const override
 
IAMVideoProcAmp * get_video_proc () const
 
bool get_xu (const extension_unit &xu, uint8_t ctrl, uint8_t *data, int len) const override
 
control_range get_xu_range (const extension_unit &xu, uint8_t ctrl, int len) const override
 
void init_xu (const extension_unit &xu) override
 
void lock () const override
 
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, int value) override
 
bool set_xu (const extension_unit &xu, uint8_t ctrl, const uint8_t *data, int len) override
 
void start_callbacks () override
 
void stop_callbacks () override
 
void stream_on (std::function< void(const notification &n)> error_handler=[](const notification &n){}) override
 
void unlock () const override
 
 wmf_uvc_device (const uvc_device_info &info, std::shared_ptr< const wmf_backend > backend)
 
 ~wmf_uvc_device ()
 
- Public Member Functions inherited from librealsense::platform::uvc_device
virtual bool set_pu (rs2_option opt, int32_t value)=0
 
virtual ~uvc_device ()=default
 

Static Public Member Functions

static void foreach_uvc_device (enumeration_callback action)
 
static bool is_connected (const uvc_device_info &info)
 

Private Member Functions

void check_connection () const
 
void close_all ()
 
CComPtr< IMFAttributes > create_device_attrs ()
 
CComPtr< IMFAttributes > create_reader_attrs ()
 
void flush (int sIndex)
 
void foreach_profile (std::function< void(const mf_profile &profile, CComPtr< IMFMediaType > media_type, bool &quit)> action) const
 
IKsControl * get_ks_control (const extension_unit &xu) const
 
void play_profile (stream_profile profile, frame_callback callback)
 
void set_d0 ()
 
void set_d3 ()
 
void stop_stream_cleanup (const stream_profile &profile, std::vector< profile_and_callback >::iterator &elem)
 

Private Attributes

std::shared_ptr< const wmf_backend_backend
 
CComPtr< IAMCameraControl > _camera_control = nullptr
 
CComPtr< IMFAttributes > _device_attrs = nullptr
 
std::wstring _device_id
 
std::string _device_serial
 
usb_spec _device_usb_spec
 
std::vector< frame_callback_frame_callbacks
 
manual_reset_event _has_started
 
const uvc_device_info _info
 
auto_reset_event _is_flushed
 
std::atomic< bool > _is_started = false
 
std::unordered_map< int, CComPtr< IKsControl > > _ks_controls
 
std::string _location
 
power_state _power_state = D3
 
std::vector< stream_profile_profiles
 
CComPtr< IMFSourceReader > _reader = nullptr
 
CComPtr< IMFAttributes > _reader_attrs = nullptr
 
HRESULT _readsample_result = S_OK
 
CComPtr< IMFMediaSource > _source = nullptr
 
uint16_t _streamIndex
 
bool _streaming = false
 
std::vector< profile_and_callback_streams
 
std::mutex _streams_mutex
 
named_mutex _systemwide_lock
 
CComPtr< IAMVideoProcAmp > _video_proc = nullptr
 

Friends

class source_reader_callback
 

Additional Inherited Members

- Protected Attributes inherited from librealsense::platform::uvc_device
std::function< void(const notification &n)> _error_handler
 

Detailed Description

Definition at line 71 of file mf-uvc.h.

Constructor & Destructor Documentation

librealsense::platform::wmf_uvc_device::wmf_uvc_device ( const uvc_device_info info,
std::shared_ptr< const wmf_backend backend 
)

Definition at line 772 of file mf-uvc.cpp.

librealsense::platform::wmf_uvc_device::~wmf_uvc_device ( )

Definition at line 805 of file mf-uvc.cpp.

Member Function Documentation

void librealsense::platform::wmf_uvc_device::check_connection ( ) const
private

Definition at line 1165 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::close ( stream_profile  profile)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1116 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::close_all ( )
private

Definition at line 1171 of file mf-uvc.cpp.

CComPtr< IMFAttributes > librealsense::platform::wmf_uvc_device::create_device_attrs ( )
private

Definition at line 827 of file mf-uvc.cpp.

CComPtr< IMFAttributes > librealsense::platform::wmf_uvc_device::create_reader_attrs ( )
private

Definition at line 837 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::flush ( int  sIndex)
private

Definition at line 1145 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::foreach_profile ( std::function< void(const mf_profile &profile, CComPtr< IMFMediaType > media_type, bool &quit)>  action) const
private

Definition at line 881 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::foreach_uvc_device ( enumeration_callback  action)
static

Definition at line 710 of file mf-uvc.cpp.

IAMCameraControl * librealsense::platform::wmf_uvc_device::get_camera_control ( ) const

Definition at line 1046 of file mf-uvc.cpp.

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

Implements librealsense::platform::uvc_device.

Definition at line 102 of file mf-uvc.h.

IKsControl * librealsense::platform::wmf_uvc_device::get_ks_control ( const extension_unit xu) const
private

Definition at line 252 of file mf-uvc.cpp.

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

Implements librealsense::platform::uvc_device.

Definition at line 84 of file mf-uvc.h.

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

Implements librealsense::platform::uvc_device.

Definition at line 946 of file mf-uvc.cpp.

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

Implements librealsense::platform::uvc_device.

Definition at line 499 of file mf-uvc.cpp.

control_range librealsense::platform::wmf_uvc_device::get_pu_range ( rs2_option  opt) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 671 of file mf-uvc.cpp.

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

Implements librealsense::platform::uvc_device.

Definition at line 103 of file mf-uvc.h.

IAMVideoProcAmp * librealsense::platform::wmf_uvc_device::get_video_proc ( ) const

Definition at line 1037 of file mf-uvc.cpp.

bool librealsense::platform::wmf_uvc_device::get_xu ( const extension_unit xu,
uint8_t  ctrl,
uint8_t data,
int  len 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 304 of file mf-uvc.cpp.

control_range librealsense::platform::wmf_uvc_device::get_xu_range ( const extension_unit xu,
uint8_t  ctrl,
int  len 
) const
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 394 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::init_xu ( const extension_unit xu)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 259 of file mf-uvc.cpp.

bool librealsense::platform::wmf_uvc_device::is_connected ( const uvc_device_info info)
static

Definition at line 242 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::lock ( ) const
inlineoverridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 99 of file mf-uvc.h.

void librealsense::platform::wmf_uvc_device::play_profile ( stream_profile  profile,
frame_callback  callback 
)
private

Definition at line 962 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::probe_and_commit ( stream_profile  profile,
frame_callback  callback,
int  buffers 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1028 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::set_d0 ( )
private

Definition at line 849 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::set_d3 ( )
private

Definition at line 869 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::set_power_state ( power_state  state)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 758 of file mf-uvc.cpp.

bool librealsense::platform::wmf_uvc_device::set_pu ( rs2_option  opt,
int  value 
)
override

Definition at line 546 of file mf-uvc.cpp.

bool librealsense::platform::wmf_uvc_device::set_xu ( const extension_unit xu,
uint8_t  ctrl,
const uint8_t data,
int  len 
)
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 282 of file mf-uvc.cpp.

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

Implements librealsense::platform::uvc_device.

Definition at line 1082 of file mf-uvc.cpp.

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

Implements librealsense::platform::uvc_device.

Definition at line 1087 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::stop_stream_cleanup ( const stream_profile profile,
std::vector< profile_and_callback >::iterator &  elem 
)
private

Definition at line 1092 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::stream_on ( std::function< void(const notification &n)>  error_handler = [](const notificationn){})
overridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 1055 of file mf-uvc.cpp.

void librealsense::platform::wmf_uvc_device::unlock ( ) const
inlineoverridevirtual

Implements librealsense::platform::uvc_device.

Definition at line 100 of file mf-uvc.h.

Friends And Related Function Documentation

friend class source_reader_callback
friend

Definition at line 108 of file mf-uvc.h.

Member Data Documentation

std::shared_ptr<const wmf_backend> librealsense::platform::wmf_uvc_device::_backend
private

Definition at line 124 of file mf-uvc.h.

CComPtr<IAMCameraControl> librealsense::platform::wmf_uvc_device::_camera_control = nullptr
private

Definition at line 134 of file mf-uvc.h.

CComPtr<IMFAttributes> librealsense::platform::wmf_uvc_device::_device_attrs = nullptr
private

Definition at line 131 of file mf-uvc.h.

std::wstring librealsense::platform::wmf_uvc_device::_device_id
private

Definition at line 154 of file mf-uvc.h.

std::string librealsense::platform::wmf_uvc_device::_device_serial
private

Definition at line 149 of file mf-uvc.h.

usb_spec librealsense::platform::wmf_uvc_device::_device_usb_spec
private

Definition at line 148 of file mf-uvc.h.

std::vector<frame_callback> librealsense::platform::wmf_uvc_device::_frame_callbacks
private

Definition at line 151 of file mf-uvc.h.

manual_reset_event librealsense::platform::wmf_uvc_device::_has_started
private

Definition at line 139 of file mf-uvc.h.

const uvc_device_info librealsense::platform::wmf_uvc_device::_info
private

Definition at line 126 of file mf-uvc.h.

auto_reset_event librealsense::platform::wmf_uvc_device::_is_flushed
private

Definition at line 138 of file mf-uvc.h.

std::atomic<bool> librealsense::platform::wmf_uvc_device::_is_started = false
private

Definition at line 153 of file mf-uvc.h.

std::unordered_map<int, CComPtr<IKsControl> > librealsense::platform::wmf_uvc_device::_ks_controls
private

Definition at line 136 of file mf-uvc.h.

std::string librealsense::platform::wmf_uvc_device::_location
private

Definition at line 147 of file mf-uvc.h.

power_state librealsense::platform::wmf_uvc_device::_power_state = D3
private

Definition at line 127 of file mf-uvc.h.

std::vector<stream_profile> librealsense::platform::wmf_uvc_device::_profiles
private

Definition at line 150 of file mf-uvc.h.

CComPtr<IMFSourceReader> librealsense::platform::wmf_uvc_device::_reader = nullptr
private

Definition at line 129 of file mf-uvc.h.

CComPtr<IMFAttributes> librealsense::platform::wmf_uvc_device::_reader_attrs = nullptr
private

Definition at line 132 of file mf-uvc.h.

HRESULT librealsense::platform::wmf_uvc_device::_readsample_result = S_OK
private

Definition at line 140 of file mf-uvc.h.

CComPtr<IMFMediaSource> librealsense::platform::wmf_uvc_device::_source = nullptr
private

Definition at line 130 of file mf-uvc.h.

uint16_t librealsense::platform::wmf_uvc_device::_streamIndex
private

Definition at line 142 of file mf-uvc.h.

bool librealsense::platform::wmf_uvc_device::_streaming = false
private

Definition at line 152 of file mf-uvc.h.

std::vector<profile_and_callback> librealsense::platform::wmf_uvc_device::_streams
private

Definition at line 143 of file mf-uvc.h.

std::mutex librealsense::platform::wmf_uvc_device::_streams_mutex
private

Definition at line 144 of file mf-uvc.h.

named_mutex librealsense::platform::wmf_uvc_device::_systemwide_lock
private

Definition at line 146 of file mf-uvc.h.

CComPtr<IAMVideoProcAmp> librealsense::platform::wmf_uvc_device::_video_proc = nullptr
private

Definition at line 135 of file mf-uvc.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