Skip to content

Commit

Permalink
Merge pull request #9416 from remibettan/resolver-code-minor-cleaning
Browse files Browse the repository at this point in the history
satisfied_streams input removed from map_sub_device method
  • Loading branch information
ev-mp committed Jul 18, 2021
2 parents 0559b01 + 5e12981 commit 11cd519
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 11cd519

Please sign in to comment.