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

Stop padding if the distributor does not assign all the available #1696

Merged

Conversation

lodoyun
Copy link
Contributor

@lodoyun lodoyun commented Apr 19, 2021

bitrate

Description

This PR addresses an issue where erizo would keep generating padding unnecessarily when using the StreamPriorityBWDistribution.
If the distributor does not use all the available bitrate, the PaddingManager would still assign padding bitrate to the mediaStreams. We don't actually need that since the distributor has already assigned all the needed bitrate according to the defined strategy.
This PR addresses this by instructing the PaddingManager to stop generating padding when there's unneeded available bitrate after a pass of the distribution algorithm.

[] It needs and includes Unit Tests

Changes in Client or Server public APIs

[] It includes documentation for these changes in /doc.

Copy link
Contributor

@jcague jcague left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -349,7 +349,7 @@ void QualityManager::forceLayers(int spatial_layer, int temporal_layer) {
}

void QualityManager::enableSlideShowBelowSpatialLayer(bool enable, int spatial_layer) {
if (enable_fallback_below_min_layer_ == enable && slideshow_below_spatial_layer_ == spatial_layer_) {
if (enable_fallback_below_min_layer_ == enable && slideshow_below_spatial_layer_ == spatial_layer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch! ;)

@@ -99,6 +100,7 @@ void StreamPriorityBWDistributor::distribute(uint32_t remb, uint32_t ssrc,
remb, stream_info.stream->getId().c_str(), remaining_bitrate);
}
}
stats_->getNode()["total"].insertStat("unnasignedBitrate", CumulativeStat{remaining_bitrate});
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@lodoyun lodoyun merged commit cf2ad29 into lynckia:master Apr 20, 2021
@lodoyun lodoyun deleted the add/managePaddingInStreamPrioritization branch April 20, 2021 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants