|
duvc-ctl 2.0.0
USB Video Class Camera Control Library
|
RAII wrapper for IKsPropertySet interface. More...
#include <duvc-ctl/platform/windows/ks_properties.h>
Public Member Functions | |
| KsPropertySet (const Device &device) | |
| Create KsPropertySet from device. | |
| ~KsPropertySet () | |
| Destructor. | |
| KsPropertySet (const KsPropertySet &)=delete | |
| KsPropertySet & | operator= (const KsPropertySet &)=delete |
| KsPropertySet (KsPropertySet &&) noexcept | |
| KsPropertySet & | operator= (KsPropertySet &&) noexcept |
| bool | is_valid () const |
| Check if property set is valid. | |
| Result< uint32_t > | query_support (const GUID &property_set, uint32_t property_id) |
| Query property support. | |
| Result< std::vector< uint8_t > > | get_property (const GUID &property_set, uint32_t property_id) |
| Get property data. | |
| Result< void > | set_property (const GUID &property_set, uint32_t property_id, const std::vector< uint8_t > &data) |
| Set property data. | |
| template<typename T > | |
| Result< T > | get_property_typed (const GUID &property_set, uint32_t property_id) |
| Get typed property value. | |
| template<typename T > | |
| Result< void > | set_property_typed (const GUID &property_set, uint32_t property_id, const T &value) |
| Set typed property value. | |
RAII wrapper for IKsPropertySet interface.
Definition at line 26 of file ks_properties.h.
Create KsPropertySet from device.
| device | Device to get property set from |
Definition at line 22 of file ks_properties.cpp.
References duvc::decode_hresult(), duvc::Device::is_valid(), and duvc::detail::open_device_filter().
| duvc::KsPropertySet::~KsPropertySet | ( | ) |
Destructor.
Definition at line 94 of file ks_properties.cpp.
|
delete |
|
noexcept |
Definition at line 106 of file ks_properties.cpp.
| Result< std::vector< uint8_t > > duvc::KsPropertySet::get_property | ( | const GUID & | property_set, |
| uint32_t | property_id ) |
Get property data.
| property_set | Property set GUID |
| property_id | Property ID |
Definition at line 156 of file ks_properties.cpp.
References duvc::decode_hresult(), duvc::Ok(), duvc::PropertyNotSupported, and duvc::SystemError.
Referenced by get_property_typed().
| template Result< bool > duvc::KsPropertySet::get_property_typed< bool > | ( | const GUID & | property_set, |
| uint32_t | property_id ) |
Get typed property value.
| T | Property value type |
| property_set | Property set GUID |
| property_id | Property ID |
Definition at line 213 of file ks_properties.cpp.
References duvc::Result< T >::error(), get_property(), duvc::InvalidValue, duvc::Result< T >::is_ok(), duvc::Ok(), and duvc::Result< T >::value().
| bool duvc::KsPropertySet::is_valid | ( | ) | const |
Check if property set is valid.
Definition at line 131 of file ks_properties.cpp.
|
delete |
|
noexcept |
Definition at line 113 of file ks_properties.cpp.
| Result< uint32_t > duvc::KsPropertySet::query_support | ( | const GUID & | property_set, |
| uint32_t | property_id ) |
Query property support.
| property_set | Property set GUID |
| property_id | Property ID |
Definition at line 135 of file ks_properties.cpp.
References duvc::decode_hresult(), duvc::Ok(), duvc::PropertyNotSupported, and duvc::SystemError.
| Result< void > duvc::KsPropertySet::set_property | ( | const GUID & | property_set, |
| uint32_t | property_id, | ||
| const std::vector< uint8_t > & | data ) |
Set property data.
| property_set | Property set GUID |
| property_id | Property ID |
| data | Property data to set |
Definition at line 190 of file ks_properties.cpp.
References duvc::decode_hresult(), duvc::Ok(), and duvc::SystemError.
Referenced by set_property_typed().
| template Result< void > duvc::KsPropertySet::set_property_typed< bool > | ( | const GUID & | property_set, |
| uint32_t | property_id, | ||
| const T & | value ) |
Set typed property value.
| T | Property value type |
| property_set | Property set GUID |
| property_id | Property ID |
| value | Property value to set |
Definition at line 234 of file ks_properties.cpp.
References set_property().