Skip to content

Commit

Permalink
Merge pull request #2600 from aangerma/platform_camera
Browse files Browse the repository at this point in the history
 Disable platform camera for pipeline - will work only with intel cameras
  • Loading branch information
dorodnic authored Oct 30, 2018
2 parents 0449035 + 6f0389c commit f442762
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6614,7 +6614,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);
Expand Down
2 changes: 1 addition & 1 deletion common/ux-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/device_hub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ namespace librealsense
return result;
}

device_hub::device_hub(std::shared_ptr<librealsense::context> ctx, int vid,
device_hub::device_hub(std::shared_ptr<librealsense::context> 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<std::mutex> 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;
Expand Down
2 changes: 1 addition & 1 deletion src/device_hub.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace librealsense
class device_hub
{
public:
explicit device_hub(std::shared_ptr<librealsense::context> ctx, int vid = 0, bool register_device_notifications = true);
explicit device_hub(std::shared_ptr<librealsense::context> 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:
Expand Down
4 changes: 2 additions & 2 deletions src/pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -352,7 +352,7 @@ namespace librealsense
*/

pipeline::pipeline(std::shared_ptr<librealsense::context> ctx)
:_ctx(ctx), _hub(ctx), _dispatcher(10)
:_ctx(ctx), _hub(ctx, RS2_PRODUCT_LINE_ANY_INTEL), _dispatcher(10)
{}

pipeline::~pipeline()
Expand Down

0 comments on commit f442762

Please sign in to comment.