6 import pyrealsense2
as rs
7 from rspy
import test,ac
9 devices = test.find_devices_by_product_line_or_exit(rs.product_line.L500)
10 depth_sensor = devices[0].first_depth_sensor()
12 debug_sensor = rs.debug_stream_sensor(depth_sensor)
13 debug_profiles = debug_sensor.get_debug_stream_profiles()
17 test.start(
"FG isn't exposed by get_stream_profiles")
19 matches = list(p
for p
in depth_sensor.profiles
if p.format() == rs.format.fg)
20 test.check(len(matches) == 0 )
24 test.start(
"FG exposed by debug_stream_sensor")
26 matches = list(p
for p
in debug_profiles
if p.format() == rs.format.fg)
27 test.check(len(matches) > 0 )
31 test.start(
"streaming FG 800x600")
33 dp =
next(p
for p
in debug_profiles
if p.fps() == 30
34 and p.stream_type() == rs.stream.depth
35 and p.format() == rs.format.fg
36 and p.as_video_stream_profile().width() == 800
37 and p.as_video_stream_profile().height() == 600)
38 depth_sensor.open( dp )
39 lrs_queue = rs.frame_queue(capacity=10, keep_frames=
False)
40 depth_sensor.start( lrs_queue )
43 lrs_frame = lrs_queue.wait_for_frame(5000)
44 test.check_equal(lrs_frame.profile.format(), rs.format.fg)
46 test.unexpected_exception()
54 test.print_results_and_exit()
virtual frame finish(frame f)
void next(auto_any_t cur, type2type< T, C > *)