diff --git a/common/model-views.cpp b/common/model-views.cpp index e7dce689e0..7d5d22b1bb 100644 --- a/common/model-views.cpp +++ b/common/model-views.cpp @@ -6628,7 +6628,7 @@ namespace rs2 device_changes::device_changes(rs2::context& ctx) { - _changes.emplace(rs2::device_list{}, ctx.query_devices()); + _changes.emplace(rs2::device_list{}, ctx.query_devices(RS2_PRODUCT_LINE_ANY)); ctx.set_devices_changed_callback([&](event_information& info) { add_changes(info); diff --git a/common/ux-window.cpp b/common/ux-window.cpp index d2fff2ccfa..204254fabb 100644 --- a/common/ux-window.cpp +++ b/common/ux-window.cpp @@ -179,7 +179,7 @@ namespace rs2 bool do_200ms = every_200ms; if (_query_devices && do_200ms) { - _missing_device = rs2::context().query_devices().size() == 0; + _missing_device = rs2::context().query_devices(RS2_PRODUCT_LINE_ANY).size() == 0; _hourglass_index = (_hourglass_index + 1) % 5; if (!_missing_device) diff --git a/src/device_hub.cpp b/src/device_hub.cpp index e3b0bd258c..0f9c41817c 100644 --- a/src/device_hub.cpp +++ b/src/device_hub.cpp @@ -29,18 +29,18 @@ namespace librealsense return result; } - device_hub::device_hub(std::shared_ptr ctx, int vid, + device_hub::device_hub(std::shared_ptr ctx, int mask, int vid, bool register_device_notifications) : _ctx(ctx), _vid(vid), _register_device_notifications(register_device_notifications) { - _device_list = filter_by_vid(_ctx->query_devices(RS2_PRODUCT_LINE_ANY), _vid); + _device_list = filter_by_vid(_ctx->query_devices(mask), _vid); auto cb = new hub_devices_changed_callback([&](rs2::event_information& info) { std::unique_lock lock(_mutex); - _device_list = filter_by_vid(_ctx->query_devices(RS2_PRODUCT_LINE_ANY), _vid); + _device_list = filter_by_vid(_ctx->query_devices(mask), _vid); // Current device will point to the first available device _camera_index = 0; diff --git a/src/device_hub.h b/src/device_hub.h index 77defa0c00..a59f3e9d0a 100644 --- a/src/device_hub.h +++ b/src/device_hub.h @@ -15,7 +15,7 @@ namespace librealsense class device_hub { public: - explicit device_hub(std::shared_ptr ctx, int vid = 0, bool register_device_notifications = true); + explicit device_hub(std::shared_ptr ctx, int mask = RS2_PRODUCT_LINE_ANY, int vid = 0, bool register_device_notifications = true); /** * The function implements both blocking and non-blocking device generation functionality based on the input parameters: diff --git a/src/pipeline.cpp b/src/pipeline.cpp index cca15e81cb..f6153c36cc 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -212,7 +212,7 @@ namespace librealsense } //Look for satisfy device in case the user did not specify one. - auto devs = pipe->get_context()->query_devices(RS2_PRODUCT_LINE_ANY); + auto devs = pipe->get_context()->query_devices(RS2_PRODUCT_LINE_ANY_INTEL); for (auto dev_info : devs) { try @@ -352,7 +352,7 @@ namespace librealsense */ pipeline::pipeline(std::shared_ptr ctx) - :_ctx(ctx), _hub(ctx), _dispatcher(10) + :_ctx(ctx), _hub(ctx, RS2_PRODUCT_LINE_ANY_INTEL), _dispatcher(10) {} pipeline::~pipeline()