Skip to content

Commit 64ff9a6

Browse files
authored
PR #12420 from Eran: fix PR #12378 missing recordable<recommended-pbs>
2 parents fba9065 + f48eb30 commit 64ff9a6

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

src/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ target_sources(${LRS_TARGET}
3434
"${CMAKE_CURRENT_LIST_DIR}/pose-frame.h"
3535
"${CMAKE_CURRENT_LIST_DIR}/processing.h"
3636
"${CMAKE_CURRENT_LIST_DIR}/processing-block-interface.h"
37-
"${CMAKE_CURRENT_LIST_DIR}/recommended-proccesing-blocks-interface.h"
37+
"${CMAKE_CURRENT_LIST_DIR}/recommended-processing-blocks-interface.h"
3838
"${CMAKE_CURRENT_LIST_DIR}/sensor-interface.h"
3939
"${CMAKE_CURRENT_LIST_DIR}/serialization.h"
4040
"${CMAKE_CURRENT_LIST_DIR}/stream-interface.h"

src/core/sensor-interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "info-interface.h"
77
#include "options-container.h"
8-
#include "recommended-proccesing-blocks-interface.h"
8+
#include "recommended-processing-blocks-interface.h"
99

1010
#include "tagged-profile.h"
1111

src/sensor.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// License: Apache 2.0. See LICENSE file in root directory.
22
// Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3-
43
#pragma once
54

65
#include "core/sensor-interface.h"
@@ -51,6 +50,7 @@ namespace librealsense
5150
, public virtual sensor_interface
5251
, public options_container
5352
, public virtual info_container
53+
, public recordable< recommended_proccesing_blocks_interface >
5454
{
5555
public:
5656
explicit sensor_base( std::string const & name, device * device );
@@ -86,6 +86,15 @@ namespace librealsense
8686
return {};
8787
}
8888

89+
// recordable< recommended_proccesing_blocks_interface > is needed to record our recommended processing blocks
90+
public:
91+
void enable_recording( std::function< void( const recommended_proccesing_blocks_interface & ) > ) override {}
92+
void create_snapshot( std::shared_ptr< recommended_proccesing_blocks_interface > & snapshot ) const override
93+
{
94+
snapshot
95+
= std::make_shared< recommended_proccesing_blocks_snapshot >( get_recommended_processing_blocks() );
96+
}
97+
8998
protected:
9099
// Since _profiles is private, we need a way to get the final profiles
91100
stream_profiles const & initialized_profiles() const { return *_profiles; }

unit-tests/live/rec-play/test-got-playback-frames.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,24 @@ def stop_sensor( sensor ):
175175
depth_sensor.stop()
176176
depth_sensor.close()
177177

178+
color_filters = [f.get_info(rs.camera_info.name) for f in color_sensor.get_recommended_filters()]
179+
depth_filters = [f.get_info(rs.camera_info.name) for f in depth_sensor.get_recommended_filters()]
180+
181+
test.check( len(color_filters) > 0 )
182+
test.check( len(depth_filters) > 0 )
183+
178184
ctx = rs.context()
179185
playback = ctx.load_device( file_name )
180186

181187
depth_sensor = playback.first_depth_sensor()
182188
color_sensor = playback.first_color_sensor()
183189

190+
playback_color_filters = [f.get_info(rs.camera_info.name) for f in color_sensor.get_recommended_filters()]
191+
playback_depth_filters = [f.get_info(rs.camera_info.name) for f in depth_sensor.get_recommended_filters()]
192+
193+
test.check_equal_lists( playback_color_filters, color_filters )
194+
test.check_equal_lists( playback_depth_filters, depth_filters )
195+
184196
restart_profiles()
185197

186198
depth_sensor.open( dp )

0 commit comments

Comments
 (0)