Pass estimator options through GCC - #178
Merged
Merged
Conversation
The GCC option builds the estimator itself, so a caller can only set the initial and maximum bitrate. Any other gcc.Option is unreachable, which means configuring the estimator at all requires editing this package. Accept a variadic gcc.Option on GCC, setupGCC and newGCCFactory, and append it after the bitrate options so a caller can also override those. Adding a variadic parameter is backward compatible, so the existing two-argument callers are unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
==========================================
+ Coverage 52.59% 52.70% +0.11%
==========================================
Files 21 21
Lines 2181 2182 +1
==========================================
+ Hits 1147 1150 +3
+ Misses 947 946 -1
+ Partials 87 86 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hanguyen-nuro
approved these changes
Aug 31, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
GCCoption constructs the estimator itself, so a caller can only influence it through the two bitrate arguments:Every other
gcc.Option— the pacer, and anything added to that package later — is unreachable. Configuring the estimator at all currently means editing this package.This accepts a variadic
...gcc.OptiononGCC,setupGCCandnewGCCFactory, and appends it after the bitrate options:Appending last is deliberate, so a caller can also override the two bitrate options rather than only add to them.
Backward compatible. Adding a variadic parameter does not change existing call sites, so the two-argument callers in
examples/and the tests are untouched.TestGCCRemainsCallableWithTwoArgumentspins that.Three tests: that an option reaches
NewSendSideBWE, that a later option overrides theinitialBitrateargument, and that the two-argument form still compiles and runs. Removing theappendfails the first two.gofmt,go vetandgo test ./sender/are green.