Merge pull request #22339 from asenyaev:asen/obsensor_fix_for_win

This commit is contained in:
Alexander Smorkalov 2022-08-05 06:59:45 +00:00
commit 88555948d0
3 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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