Skip to content

Commit

Permalink
software sensor now returns options in the order they were registered
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jul 11, 2024
1 parent 370c21f commit bc97b02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/software-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,12 @@ void software_sensor::add_processing_block( std::shared_ptr< processing_block_in
}


std::vector< rs2_option > software_sensor::get_supported_options() const
{
// Override the default options_container behavior: software sensors return the options in the same order they were
// registered!
return _ordered_options;
}


} // namespace librealsense
4 changes: 4 additions & 0 deletions src/software-sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class software_sensor
void set_metadata( rs2_frame_metadata_value key, rs2_metadata_type value );
void erase_metadata( rs2_frame_metadata_value key );

// options_container
public:
std::vector< rs2_option > get_supported_options() const override;

protected:
frame_interface * allocate_new_frame( rs2_extension, stream_profile_interface *, frame_additional_data && );
frame_interface * allocate_new_video_frame( video_stream_profile_interface *, int stride, int bpp, frame_additional_data && );
Expand Down

0 comments on commit bc97b02

Please sign in to comment.