Skip to content

Commit

Permalink
PR #13431 from aaron-evercoast: Improve query_devices time on high de…
Browse files Browse the repository at this point in the history
…vice count systems
  • Loading branch information
remibettan authored Nov 18, 2024
2 parents a6d4972 + 216a027 commit 8503b56
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/linux/backend-v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,10 @@ namespace librealsense
}

v4l_uvc_device::v4l_uvc_device(const uvc_device_info& info, bool use_memory_map)
: _name(""), _info(),
: _name(info.id),
_device_path(info.device_path),
_device_usb_spec(info.conn_spec),
_info(info),
_is_capturing(false),
_is_alive(true),
_is_started(false),
Expand All @@ -1217,19 +1220,6 @@ namespace librealsense
_buf_dispatch(use_memory_map),
_frame_drop_monitor(DEFAULT_KPI_FRAME_DROPS_PERCENTAGE)
{
foreach_uvc_device([&info, this](const uvc_device_info& i, const std::string& name)
{
if (i == info)
{
_name = name;
_info = i;
_device_path = i.device_path;
_device_usb_spec = i.conn_spec;
}
});
if (_name == "")
throw linux_backend_exception("device is no longer connected!");

_named_mtx = std::unique_ptr<named_mutex>(new named_mutex(_name, 5000));
}

Expand Down

0 comments on commit 8503b56

Please sign in to comment.