25
25
26
26
#include < src/proc/color-formats-converter.h>
27
27
28
+ #include < rsutils/string/nocase.h>
28
29
#include < rsutils/json.h>
29
30
using rsutils::json;
30
31
@@ -664,7 +665,11 @@ void dds_sensor_proxy::add_processing_block( std::string const & filter_name )
664
665
if ( ! ppb )
665
666
LOG_WARNING ( " Unsupported processing block '" + filter_name + " ' received" );
666
667
else
668
+ {
669
+ // Currently processing block factory does not support block settings, add here if needed.
670
+ add_processing_block_settings ( filter_name, ppb );
667
671
super::add_processing_block ( ppb );
672
+ }
668
673
}
669
674
catch ( std::exception const & e )
670
675
{
@@ -673,5 +678,25 @@ void dds_sensor_proxy::add_processing_block( std::string const & filter_name )
673
678
}
674
679
}
675
680
681
+ void dds_sensor_proxy::add_processing_block_settings ( const std::string & filter_name,
682
+ std::shared_ptr< librealsense::processing_block_interface > & ppb ) const
683
+ {
684
+ if ( rsutils::string::nocase_equal ( filter_name, " Decimation Filter" ) )
685
+ if ( !ppb->supports_option ( RS2_OPTION_STREAM_FILTER ) )
686
+ LOG_ERROR ( " Decimation Filter does not support stream filter option" );
687
+ else
688
+ if ( rsutils::string::nocase_equal ( get_name (), " RGB Camera" ) )
689
+ {
690
+
691
+ ppb->get_option ( RS2_OPTION_STREAM_FILTER ).set ( RS2_STREAM_COLOR );
692
+ ppb->get_option ( RS2_OPTION_STREAM_FORMAT_FILTER ).set ( RS2_FORMAT_ANY );
693
+ }
694
+ else
695
+ {
696
+ ppb->get_option ( RS2_OPTION_STREAM_FILTER ).set ( RS2_STREAM_DEPTH );
697
+ ppb->get_option ( RS2_OPTION_STREAM_FORMAT_FILTER ).set ( RS2_FORMAT_Z16 );
698
+ }
699
+ }
700
+
676
701
677
702
} // namespace librealsense
0 commit comments