add uvc extension unit guid
This commit is contained in:
parent
113d2e5951
commit
b1b9b60626
|
@ -15,6 +15,8 @@ MYNTEYE_BEGIN_NAMESPACE
|
|||
|
||||
namespace {
|
||||
|
||||
const uvc::xu mynteye_xu = {3, 1, {0x18682d34, 0xdd2c, 0x4073, {0xad, 0x23, 0x72, 0x14, 0x73, 0x9a, 0x07, 0x4c}}};
|
||||
|
||||
int XuCamCtrlId(Option option) {
|
||||
switch (option) {
|
||||
case Option::EXPOSURE_MODE:
|
||||
|
@ -838,7 +840,7 @@ bool Channels::PuControlQuery(
|
|||
bool Channels::XuControlQuery(
|
||||
channel_t channel, uvc::xu_query query, uint16_t size,
|
||||
uint8_t *data) const {
|
||||
return XuControlQuery({3}, channel >> 8, query, size, data);
|
||||
return XuControlQuery(mynteye_xu, channel >> 8, query, size, data);
|
||||
}
|
||||
|
||||
bool Channels::XuControlQuery(
|
||||
|
|
|
@ -139,7 +139,7 @@ static std::string win_to_utf(const WCHAR * s)
|
|||
static void check(const char *call, HRESULT hr)
|
||||
{
|
||||
if (FAILED(hr)) {
|
||||
throw_error() << call << "(...) returned 0x" << std::hex << (uint32_t)hr;
|
||||
throw_error() << call << "(...) returned 0x" << std::hex << (uint32_t)hr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ public:
|
|||
struct device {
|
||||
const std::shared_ptr<context> parent;
|
||||
int vid, pid;
|
||||
const std::string unique_id;
|
||||
std::string unique_id;
|
||||
std::string name;
|
||||
|
||||
com_ptr<reader_callback> reader_callback;
|
||||
|
@ -551,14 +551,14 @@ bool pu_control_query(
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void get_extension_control_range(const device &device, const xu &xu, uint8_t selector, xu_query query, uint8_t *data)
|
||||
{
|
||||
CHECK_NOTNULL(data);
|
||||
int offset = 0;
|
||||
auto ks_control = const_cast<uvc::device &>(device).get_ks_control(xu);
|
||||
|
||||
/* get step, min and max values*/
|
||||
// get step, min and max values
|
||||
KSP_NODE node;
|
||||
memset(&node, 0, sizeof(KSP_NODE));
|
||||
node.Property.Set = reinterpret_cast<const GUID &>(xu.id);
|
||||
|
@ -610,7 +610,7 @@ void get_extension_control_range(const device &device, const xu &xu, uint8_t sel
|
|||
* data = (uint8_t)*(pRangeValues + offset);
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
bool xu_control_query(
|
||||
const device &device, const xu &xu, uint8_t selector, xu_query query,
|
||||
uint16_t size, uint8_t *data)
|
||||
|
@ -634,10 +634,16 @@ bool xu_control_query(
|
|||
node.Property.Flags = KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_TOPOLOGY;
|
||||
break;
|
||||
case XU_QUERY_MIN:
|
||||
offset = 1;
|
||||
node.Property.Flags = KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_TOPOLOGY;
|
||||
break;
|
||||
case XU_QUERY_MAX:
|
||||
offset = 2;
|
||||
node.Property.Flags = KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_TOPOLOGY;
|
||||
break;
|
||||
case XU_QUERY_DEF:
|
||||
get_extension_control_range(device, xu, selector, query, data);
|
||||
return true;
|
||||
node.Property.Flags = KSPROPERTY_TYPE_DEFAULTVALUES | KSPROPERTY_TYPE_TOPOLOGY;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user