refactor & optimize frame creation, invocation, metadata syncing - #11615
Merged
Conversation
OhadMeir
reviewed
Mar 26, 2023
| auto it = _stream_name_to_syncer.find( stream_name ); | ||
| if( it != _stream_name_to_syncer.end() ) | ||
| it->second.enqueue_metadata( | ||
| std::stoull( rsutils::json::get< std::string >( dds_md["header"], "frame-id" ) ), |
Contributor
Author
There was a problem hiding this comment.
That's OK here, it'll be caught and report it
OhadMeir
reviewed
Mar 26, 2023
|
|
||
| class dds_sensor_proxy : public software_sensor | ||
| { | ||
| std::map< std::string, frame_metadata_syncer > _stream_name_to_syncer; |
Contributor
There was a problem hiding this comment.
Keep it with the rest of the private members
OhadMeir
reviewed
Mar 26, 2023
| data.timestamp; // from metadata | ||
| data.timestamp_domain; // from metadata | ||
| data.depth_units; // from metadata | ||
| data.frame_number = ! dds_frame.frame_id.empty() ? std::stoi( dds_frame.frame_id ) : 0; |
Contributor
Author
There was a problem hiding this comment.
Changed both (video/motion) to set to 0 if invalid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
metadata_arraytype with proper initialization and ctor inframe_additional_dataframe_metadata_syncerno longer a templateframe::dataon_metadata_availableframe_holderusage for proper lifecycleThere may be a use-case where the timestamp+domain aren't set at all if no metadata is available. I'll take care of this in the next PR.
Also next, I'll be moving the syncer out of
context.cpp(into realdds), generating unit-tests for it, and finish the metadata unit-tests. Then will be changing things to be timestamp-based.