Skip to content

Commit

Permalink
PR #12899 from Nir-Az: Reverse order of sensor open in pipeline API
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir-Az authored May 7, 2024
2 parents 6b9e947 + ea2f45b commit 88285da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 11 additions & 3 deletions src/pipeline/resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,17 @@ namespace librealsense

void open()
{
for (auto && kvp : _dev_to_profiles) {
auto&& sub = _results.at(kvp.first);
sub->open(kvp.second);
// Camera has a limitation such that opening the color sensor after the
// depth sensor may cause the depth sensor a reset.
// This artifact may cause unexpected behavior when we ask to stop the sensor in parallel or control it
// while it is doing a reset.
// As a workaround for pipeline API usage, we use the assumption that depth sensor is first in the map if it is added to the configuration,
// When we reverse iterate it, the depth sensor opening will be last This should not affect other stream
// which are capable of being opened decoupled from other sensors
for( auto it = _dev_to_profiles.rbegin(); it != _dev_to_profiles.rend(); it++ )
{
auto && sub = _results.at( it->first );
sub->open( it->second );
}
}

Expand Down
5 changes: 3 additions & 2 deletions unit-tests/live/frames/test-pipeline-start-stop.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# License: Apache 2.0. See LICENSE file in root directory.
# Copyright(c) 2023 Intel Corporation. All Rights Reserved.
# Copyright(c) 2023-2024 Intel Corporation. All Rights Reserved.

# test:donotrun:!nightly
# Currently, we exclude D457 as it's failing
# test:device each(D400*) !D457

Expand All @@ -10,7 +11,7 @@
import time

# Run multiple start stop of all streams and verify we get a frame for each once
ITERATIONS_COUNT = 2
ITERATIONS_COUNT = 50

dev = test.find_first_device_or_exit()

Expand Down

0 comments on commit 88285da

Please sign in to comment.