Skip to content

Commit

Permalink
fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
noacoohen committed Jan 14, 2025
1 parent a74f79c commit a966de6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/dds/rs-dds-sensor-proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ rsutils::subscription dds_sensor_proxy::register_options_changed_callback( optio

stream_profiles dds_sensor_proxy::get_active_streams() const
{
return _target_profiles;
return _active_converted_profiles;
}

std::shared_ptr< realdds::dds_video_stream_profile >
Expand Down Expand Up @@ -247,7 +247,7 @@ dds_sensor_proxy::find_profile( sid_index sidx, realdds::dds_motion_stream_profi
void dds_sensor_proxy::open( const stream_profiles & profiles )
{
_formats_converter.prepare_to_convert( profiles );
_target_profiles = profiles;
_active_converted_profiles = profiles;
const auto & source_profiles = _formats_converter.get_active_source_profiles();
// TODO - register processing block options?

Expand Down Expand Up @@ -582,6 +582,13 @@ void dds_sensor_proxy::stop()
}


void dds_sensor_proxy::close()
{
software_sensor::close();
_active_converted_profiles.clear();
}


class dds_option_roi_method : public region_of_interest_method
{
std::shared_ptr< rs_dds_option > _rs_option;
Expand Down
3 changes: 2 additions & 1 deletion src/dds/rs-dds-sensor-proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class dds_sensor_proxy : public software_sensor
std::map< std::string, streaming_impl > _streaming_by_name;

formats_converter _formats_converter;
stream_profiles _target_profiles;
stream_profiles _active_converted_profiles;

public:
dds_sensor_proxy( std::string const & sensor_name,
Expand All @@ -81,6 +81,7 @@ class dds_sensor_proxy : public software_sensor
void open( const stream_profiles & profiles ) override;
void start( rs2_frame_callback_sptr callback ) override;
void stop();
void close() override;

void add_option( std::shared_ptr< realdds::dds_option > option );

Expand Down

0 comments on commit a966de6

Please sign in to comment.