This repository was archived by the owner on Mar 22, 2022. It is now read-only.
Expose PeerConnectionInterface::SetBitrate #109
Merged
jehumb-havok merged 4 commits intomicrosoft:masterfrom Oct 24, 2019
Merged
Expose PeerConnectionInterface::SetBitrate #109jehumb-havok merged 4 commits intomicrosoft:masterfrom
jehumb-havok merged 4 commits intomicrosoft:masterfrom
Conversation
jehumb-havok
suggested changes
Oct 24, 2019
Comment on lines
+604
to
+611
| /// Set the bitrate allocated to all RTP streams sent by this connection. | ||
| /// Other limitations might affect these limits and are respected (for example | ||
| /// "b=AS" in SDP). | ||
| /// | ||
| /// Setting |start_bitrate_bps| will reset the current bitrate estimate to the | ||
| /// provided value. | ||
| /// | ||
| /// If any of the arguments has a negative value, it will be ignored. |
Member
There was a problem hiding this comment.
Please add the unit of those (i.e. expand "bps" to "bits-per-second").
Comment on lines
+1167
to
+1169
| /// <param name="minBitrateBps">Minimum bitrate.</param> | ||
| /// <param name="startBitrateBps">Start/current target bitrate.</param> | ||
| /// <param name="maxBitrateBps">Maximum bitrate.</param> |
Member
There was a problem hiding this comment.
Same: "Minimum bitrate, in bits per second.", etc.
Comment on lines
+1176
to
+1180
| if (PeerConnectionInterop.PeerConnection_SetBitrate(_nativePeerhandle, | ||
| signedMinBitrateBps, signedStartBitrateBps, signedMaxBitrateBps) != Utils.MRS_SUCCESS) | ||
| { | ||
| throw new InvalidOperationException(); | ||
| } |
Member
There was a problem hiding this comment.
uint res = PeerConnectionInterop.PeerConnection_SetBitrate(...);
Utils.ThrowOnErrorCode(res);This makes customizing the mapping {error code} <-> {exception} must easier, for example if we add new exception types in the future, and keeps it consistent.
jehumb-havok
approved these changes
Oct 24, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add usage example in TestAppUWP.
Mitigates #107.