mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 05:06:29 +08:00
Merge pull request #22339 from asenyaev:asen/obsensor_fix_for_win
This commit is contained in:
commit
88555948d0
@ -195,7 +195,7 @@ std::vector<UvcDeviceInfo> MFContext::queryUvcDeviceInfoList()
|
||||
std::string uid, guid;
|
||||
if (!parseUvcDeviceSymbolicLink(symbolicLink, vid, pid, mi, uid, guid))
|
||||
continue;
|
||||
uvcDevList.emplace_back(UvcDeviceInfo({ symbolicLink, name, uid, vid, pid, mi }));
|
||||
uvcDevList.emplace_back(UvcDeviceInfo{ symbolicLink, name, uid, vid, pid, mi });
|
||||
CV_LOG_INFO(NULL, "UVC device found: name=" << name << ", vid=" << vid << ", pid=" << pid << ", mi=" << mi << ", uid=" << uid << ", guid=" << guid);
|
||||
}
|
||||
return uvcDevList;
|
||||
|
@ -101,7 +101,7 @@ std::vector<UvcDeviceInfo> V4L2Context::queryUvcDeviceInfoList()
|
||||
cv::utils::fs::glob(videosDir, "*", videos, false, true);
|
||||
for (const auto& video : videos)
|
||||
{
|
||||
UvcDeviceInfo uvcDev;
|
||||
UvcDeviceInfo uvcDev{};
|
||||
cv::String videoName = video.substr(video.find_last_of("/") + 1);
|
||||
char buf[PATH_MAX];
|
||||
if (realpath(video.c_str(), buf) == nullptr || cv::String(buf).find("virtual") != std::string::npos)
|
||||
|
@ -33,12 +33,12 @@ namespace obsensor {
|
||||
|
||||
struct UvcDeviceInfo
|
||||
{
|
||||
std::string id = ""; // uvc sub-device id
|
||||
std::string name = "";
|
||||
std::string uid = ""; // parent usb device id
|
||||
uint16_t vid = 0;
|
||||
uint16_t pid = 0;
|
||||
uint16_t mi = 0; // uvc interface index
|
||||
std::string id; // uvc sub-device id
|
||||
std::string name;
|
||||
std::string uid; // parent usb device id
|
||||
uint16_t vid;
|
||||
uint16_t pid;
|
||||
uint16_t mi; // uvc interface index
|
||||
};
|
||||
|
||||
enum StreamState
|
||||
|
Loading…
Reference in New Issue
Block a user