-
Notifications
You must be signed in to change notification settings - Fork 5k
Add bandwidth info message for DDS streams #14186
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds bandwidth calculation and logging functionality for DDS video streams. The implementation calculates expected bandwidth usage based on stream parameters (width, height, framerate, and bits per pixel) and logs this information when streams are opened.
- Adds a new
calculate_bandwidthmethod to compute and log stream bandwidth information - Integrates bandwidth calculation into the stream opening process
- Supports multiple video formats with appropriate bits-per-pixel calculations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/dds/rs-dds-sensor-proxy.h | Adds forward declaration and method signature for bandwidth calculation |
| src/dds/rs-dds-sensor-proxy.cpp | Implements bandwidth calculation logic and integrates it into stream opening |
9c82f0e to
857a456
Compare
src/dds/rs-dds-sensor-proxy.cpp
Outdated
| size_t height = vsp->get_height(); | ||
| size_t fps = vsp->get_framerate(); | ||
| size_t bpp = 0; | ||
| switch( vsp->get_format() ) // Expected raw formats from the sensor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have a utility function for it?
We have it in several places, maybe better to add if not exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a utility function get_image_bpp. I thought to support only "raw" formats that we expect to get from the camera. Maybe it's not that crucial, if you prefer I will change to use the existing function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, will update to use utility function
Tracked on [RSDEV-3646]