-
Couldn't load subscription status.
- Fork 4.9k
Fixed deadlock on pipeline.stop() with playback device in non realtime #8625
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
Changes from 2 commits
c3a619d
84ba61c
a1d1794
7021d88
2147ee8
b38f300
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # License: Apache 2.0. See LICENSE file in root directory. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Matan put his record & playback test under func/rec-play/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| # Copyright(c) 2020 Intel Corporation. All Rights Reserved. | ||
|
||
|
|
||
| import os | ||
| import pyrealsense2 as rs2 | ||
| from rspy import test | ||
|
|
||
| # This test checks that stop of pipeline with playback file | ||
| # and non realtime mode is not stuck due to deadlock of | ||
| # pipeline stop thread and syncer blocking enqueue thread (DSO-15157) | ||
| ############################################################################################# | ||
| test.start("Playback with non realtime doesn't stuck at stop") | ||
|
||
| current_dir = os.path.dirname( os.path.abspath( __file__ )) | ||
| filename = current_dir + os.sep + 'recording.bag' | ||
|
||
| pipeline = rs2.pipeline() | ||
| config = rs2.config() | ||
| config.enable_all_streams() | ||
| config.enable_device_from_file(filename, repeat_playback=False) | ||
| profile = pipeline.start(config) | ||
| device = profile.get_device().as_playback().set_real_time(False) | ||
| success = True | ||
| while success: | ||
| success, _ = pipeline.try_wait_for_frames(1000) | ||
| print("stopping...") | ||
| pipeline.stop() | ||
| print("stopped") | ||
|
|
||
| test.finish() | ||
| ############################################################################################# | ||
|
|
||
| test.print_results_and_exit() | ||
Uh oh!
There was an error while loading. Please reload this page.