Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

satisfied_streams input removed from map_sub_device method #9416

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pipeline/resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,10 @@ namespace librealsense
return r;
}

stream_profiles map_sub_device(stream_profiles profiles, std::set<index_type> satisfied_streams, const device_interface* dev) const
stream_profiles map_sub_device(stream_profiles profiles,const device_interface* dev) const
{
stream_profiles rv;
std::set<index_type> satisfied_streams;
try
{
std::vector<stream_profile> targets;
Expand Down Expand Up @@ -433,16 +434,15 @@ namespace librealsense
std::multimap<int, std::shared_ptr<stream_profile_interface>> map_streams(const device_interface* dev) const
{
std::multimap<int, std::shared_ptr<stream_profile_interface>> out;
std::set<index_type> satisfied_streams;

// Algorithm assumes get_adjacent_devices always
// returns the devices in the same order
for (size_t i = 0; i < dev->get_sensors_count(); ++i)
{
auto&& sub = dev->get_sensor(i);

auto default_profiles = map_sub_device(sub.get_stream_profiles(profile_tag::PROFILE_TAG_SUPERSET), satisfied_streams, dev);
auto any_profiles = map_sub_device(sub.get_stream_profiles(profile_tag::PROFILE_TAG_ANY), satisfied_streams, dev);
auto default_profiles = map_sub_device(sub.get_stream_profiles(profile_tag::PROFILE_TAG_SUPERSET), dev);
auto any_profiles = map_sub_device(sub.get_stream_profiles(profile_tag::PROFILE_TAG_ANY), dev);

//use any streams if default streams wasn't satisfy
auto profiles = default_profiles.size() == any_profiles.size() ? default_profiles : any_profiles;
Expand Down