Skip to content

Conversation

@backportbot-nextcloud
Copy link

backport of #5885

danxuliu added 5 commits July 1, 2021 14:45
The stats were reset whenever "setAnalysisEnabledXXX(true)" was called.
Due to this, if the analysis for audio or video was already enabled and
the method was called again the stats were wrongly reset. The stats
should be reset only when the analysis is really started again.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
This makes the attribute consistent with the stats, and will also make
possible to directly get the quality value given a string identifying
its kind ("audio" or "video").

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When no packets are transmitted the packet lost ratio is set to a value
higher than 1 to move towards a "no transmitted data" state faster,
although not immediately. Both the "no transmitted data" and "very bad
quality" states are based on the packet lost ratio, so this causes the
"very bad quality" state to be triggered as soon as no packets are
transmitted.

However, the stats reported by the browser can sometimes stall for a
second (it is unclear whether the browser does not update the stats or
Janus does not send them, though). When that happens the stats are still
reported, but with the same values as in the previous report. As there
were no transmitted packets the "very bad quality" state was (wrongly)
triggered.

To solve this now if there were no transmitted packets in the last
report the analysis is kept on hold. If in the next report the number of
packets has changed then the previous report is considered to have
stalled and the new values are distributed between the previous and
current report. If the number of packets is still zero then the previous
report is considered to have been legit and the previous and current
values are added as normal.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@nickvergessen nickvergessen merged commit 9adc98e into stable22 Jul 1, 2021
@nickvergessen nickvergessen deleted the backport/5885/stable22 branch July 1, 2021 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants