-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SimulcastConsumer::GetDesiredBitrate(): Choose the highest bitrate among all Producer streams #992
Conversation
…ong all Producer streams Instead of assuming that the highest simulcast stream is the one consuming highest bitrate, iterate all them and pick up the highest value. This is because wWhen the sender enables a higher stream, initially the bitrate of it could be less than the bitrate of a lower stream. In a few seconds it will become higher. However don't report its irrelevant current bitrate in the meantime.
Pull reviewers statsStats of the last 365 days for mediasoup:
|
@nazar-pc I strongly think we should freeze Rust version in mediasoup-rust to avoid these unexpected and totally unrelated CI errors: https://github.com/versatica/mediasoup/actions/runs/4023390642/jobs/6914204443 |
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.
Makes sense.
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.
Sure, I'll add config that locks the version so we can update it manually. These changes are easy to fix though, just run cargo clippy --all-targets
and fix things until it stops complaining.
The changes here make sense to me.
Problem is that cargo clippy works for me in my computer. How should I update Rust? Via brew install rust? Or brew install cargo? |
New version was out yesterday with new lints enabled by default: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html |
@nazar-pc I need help here: |
Trying to apply this change: --- a/rust/src/worker.rs
+++ b/rust/src/worker.rs
@@ -500,8 +500,7 @@ impl Inner {
Err(error) => Err(io::Error::new(
io::ErrorKind::Other,
format!(
- "unexpected first notification from worker [id:{}]: {:?}; error = {}",
- id, notification, error
+ "unexpected first notification from worker [id:{id}]: {notification}; error = {error}"
),
)),
}; |
It was format!(
"unexpected first notification from worker [id:{id}]: {notification:?}; \
error = {error}"
), When strings are longer than configured length formatter gives up formatting other code around it sometimes, so better splitting it into multiple lines explicitly in those cases. UPD: Error message actually suggested |
Thanks @nazar-pc, pushed. Should be green now. |
Rust is not happy with your skills today, sir. Use |
Did |
I don't think that was the case, tests are covered by that command. |
Only plain variables can be used, not expressions or property accesses like |
… adding basic support to print things now in 2023
All fixed in last commit. |
…com:versatica/mediasoup into improve-simulcastconsumer-getdesiredbitrate # Conflicts: # worker/build.rs
This error didn't show locally: https://github.com/versatica/mediasoup/actions/runs/4024845039/jobs/6917332591 |
Because it is platform-specific code. Unless you're on Windows, it is not compiled.
|
amazing |
All 🟢 |
…ong all Producer streams (versatica#992)
Instead of assuming that the highest simulcast stream is the one consuming highest bitrate, iterate all them and pick up the highest value.
This is because when the sender enables a higher stream, initially the bitrate of it could be less than the bitrate of a lower stream. In a few seconds it will become higher. However don't report its irrelevant current bitrate in the meantime.
NOTE: This PR is not intended to fix #989