-
Notifications
You must be signed in to change notification settings - Fork 867
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
[core] Added SRTO_PACINGMODE pacing mode #1541
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1ea8908
to
e1433bd
Compare
@@ -228,6 +228,7 @@ CUDT::CUDT(CUDTSocket* parent): m_parent(parent) | |||
m_iIpV6Only = -1; | |||
// Runtime | |||
m_bRcvNakReport = true; // Receiver's Periodic NAK Reports | |||
m_PacingMode = SRT_PACING_UNSET; // API/ABI backward compatible mode |
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.
It make more sense if you simply add kinda m_bHybridPacing
boolean field. This is only required to distinguish the INPUTBW and HYBRIDBW modes. Then, you just set:
- UNLIMITED (default): MAXBW = -1, others ignored
- MAXBW: MAXBW as provided, others ignored
- INPUTBW: MAXBW = 0, INPUTBW as provided, OHEADBW as provided, HYBRIDPACING = false
- ESTINPUTBW: MAXBW = 0, INPUTBW = 0, OHEADBW as provided, HYBRIDPACING = true
- HYBRIDBW: MAXBW = 0, INPUTBW as provided, OHEADBW as provided, HYBRIDPACING = true
Decoding the mode from fields:
- If MAXBW == -1, report UNLIMITED
- If MAXBW > 0, report MAXBW
- if MAXBW == 0:
- if INPUTBW == 0, report ESTINPUTBW (ignore HYBRIDPACING)
- if INPUTBW > 0:
- if HYBRIDPACING is false, report INPUTBW
- otherwise report HYBRIDBW
From the docs,
From the code of if (event_source != TEV_INIT_RESET && m_llMaxBW)
{
HLOGC(rslog.Debug, log << CONID() << "updateCC/TEV_INIT: non-RESET stage and m_llMaxBW already set...");
// Don't change
} |
6d3fa9e
to
8c7957f
Compare
Consider adjusting pacing mode names to be more distinguishable:
|
- Added option SRTO_PACINGMODE - New mode: SRT_PACING_INBW_MINESTIMATE Co-authored-by: duB <[email protected]>
Co-authored-by: Maria Sharabayko <[email protected]>
e6e4773
to
af0adb2
Compare
These changes are extracted from #1383. Closes #1383. Documentation is in PR #1533.
SRTO_PACINGMODE
SRT_PACING_INBW_MINESTIMATE
SRTO_PACINGMODE
option can be used to select the desired output pacing only in live mode.See the description in APISocketOptions.md.
Available modes are:
MAXBW
CalculationSRT_PACING_UNSET
SRT_PACING_MAXBW_DEFAULT
MAXBW
is set to the default value of 1 GbpsSRT_PACING_MAXBW_SET
MAXBW
MAXBW
is set explicitly, in bytes per second, must be positiveSRT_PACING_INBW_SET
INPUTBW
OHEADBW
MAXBW = INPUTBW * (1 + OHEADBW /100)
SRT_PACING_INBW_ESTIMATE
OHEADBW
MAXBW = EST_INPUTBW * (1 + OHEADBW /100)
SRT_PACING_INBW_MINESTIMANTE
INPUTBW
OHEADBW
MAXBW = max(INPUTBW, EST_INPUTBW) * (1 + OHEADBW /100)
TODO
pacing=mode,bw,ohead
.SRTO_MININPUTBW
option should be added.Usage Examples
All required options are set at once together with the pacing mode. See test_socket_options.cpp for more examples.