Skip to content

Commit

Permalink
Disable slowlink events by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Nov 10, 2021
1 parent 326b00c commit 4e86131
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ or on the command line:
-W, --slowlink-threshold=number
Number of lost packets (per s) that should
trigger a 'slowlink' Janus API event to users
(default=0, feature disabled)
-r, --rtp-port-range=min-max Port range to use for RTP/RTCP (only available
if the installed libnice supports it)
-B, --twcc-period=number How often (in ms) to send TWCC feedback back to
Expand Down
4 changes: 2 additions & 2 deletions conf/janus.jcfg.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ certificates: {
# starting MTU for DTLS (1200 by default, it adapts automatically),
# how much time, in seconds, should pass with no media (audio or
# video) being received before Janus notifies you about this (default=1s,
# 0 disables these events entirely), how many lost packets should trigger
# a 'slowlink' event to users (default=4), and how often, in milliseconds,
# 0 disables these events entirely), how many lost packets should trigger a
# 'slowlink' event to users (default=0, disabled), and how often, in milliseconds,
# to send the Transport Wide Congestion Control feedback information back
# to senders, if negotiated (default=200ms). Finally, if you're using BoringSSL
# you can customize the frequency of retransmissions: OpenSSL has a fixed
Expand Down
7 changes: 5 additions & 2 deletions ice.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,11 @@ uint janus_get_no_media_timer(void) {
}

/* Number of lost packets per seconds on a media stream (uplink or downlink,
* audio or video), that should result in a slow-link event to the iser */
#define DEFAULT_SLOWLINK_THRESHOLD 4
* audio or video), that should result in a slow-link event to the user.
* By default the feature is disabled (threshold=0), as it can be quite
* verbose and is often redundant information, since the same info on lost
* packets (in and out) can already be retrieved via client-side stats */
#define DEFAULT_SLOWLINK_THRESHOLD 0
static uint slowlink_threshold = DEFAULT_SLOWLINK_THRESHOLD;
void janus_set_slowlink_threshold(uint packets) {
slowlink_threshold = packets;
Expand Down
2 changes: 1 addition & 1 deletion janus.1
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Minimum size of the NACK queue (in ms) per user for retransmissions, no matter t
Time (in s) that should pass with no media (audio or video) being received before Janus notifies you about this
.TP
.BR \-W ", " \-\-slowlink-threshold=\fInumber\fR
Number of lost packets (per s) that should trigger a 'slowlink' Janus API event to users
Number of lost packets (per s) that should trigger a 'slowlink' Janus API event to users (default=0, feature disabled)
.TP
.BR \-r ", " \-\-rtp-port-range=\fImin\-max\fR
Port range to use for RTP/RTCP
Expand Down
2 changes: 1 addition & 1 deletion janus.ggo
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ option "ice-lite" I "Whether to enable the ICE Lite mode or not" flag off
option "ice-tcp" T "Whether to enable ICE-TCP or not (warning: only works with ICE Lite)" flag off
option "min-nack-queue" Q "Minimum size of the NACK queue (in ms) per user for retransmissions, no matter the RTT" int typestr="number" optional
option "no-media-timer" t "Time (in s) that should pass with no media (audio or video) being received before Janus notifies you about this" int typestr="number" optional
option "slowlink-threshold" W "Number of lost packets (per s) that should trigger a 'slowlink' Janus API event to users" int typestr="number" optional
option "slowlink-threshold" W "Number of lost packets (per s) that should trigger a 'slowlink' Janus API event to users (default=0, feature disabled)" int typestr="number" optional
option "rtp-port-range" r "Port range to use for RTP/RTCP" string typestr="min-max" optional
option "twcc-period" B "How often (in ms) to send TWCC feedback back to senders, if negotiated (default=200ms)" int typestr="number" optional
option "server-name" n "Public name of this Janus instance (default=MyJanusInstance)" string typestr="name" optional
Expand Down

0 comments on commit 4e86131

Please sign in to comment.