Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syncer bug causing wrong frame order #8378

Merged
merged 9 commits into from
Feb 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,28 +533,28 @@ namespace librealsense
LOG_DEBUG("by_pass_composite_matcher: " << _name << " " << frame_to_string(f));
_callback(std::move(f), env);
}
std::string frame_to_string(const frame_holder & f)

std::string frame_to_string( const frame_holder & f )
{
std::ostringstream s;
auto composite = dynamic_cast< composite_frame * >( f.frame );
if( composite )
{
std::ostringstream s;
auto composite = dynamic_cast<composite_frame*>(f.frame);
if (composite)
{
for (int i = 0; i < composite->get_embedded_frames_count(); i++)
{
auto frame = composite->get_frame(i);
s << frame->get_stream()->get_stream_type() << " " << frame->get_frame_number() << " " << std::fixed << frame->get_frame_timestamp() << " ";
}
}
else
for( int i = 0; i < composite->get_embedded_frames_count(); i++ )
{
s << f->get_stream()->get_stream_type();
s << " " << f->get_stream()->get_unique_id();
s << " " << f->get_frame_number();
s << " " << std::fixed << (double)f->get_frame_timestamp();
s << " ";
auto frame = composite->get_frame( i );
s << frame->get_stream()->get_stream_type() << " " << frame->get_frame_number()
<< " " << std::fixed << frame->get_frame_timestamp() << " ";
}
return s.str();
}
else
{
s << f->get_stream()->get_stream_type();
s << " " << f->get_stream()->get_unique_id();
s << " " << f->get_frame_number();
s << " " << std::fixed << (double)f->get_frame_timestamp();
s << " ";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?

}
return s.str();
}
}
} // namespace librealsense