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

Reverse order of sensor open in pipeline API #12899

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
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
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
Loading