Skip to content
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

Bandwidth Estimation (BWE) for subscribers (WIP) #3278

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
00ec2f0
First foundation of BWE context, using TWCC feedback
lminiero Jul 6, 2023
38003df
Also keep track of monotonic time of delivery of each inflight packet
lminiero Jul 6, 2023
503646f
Added first draft of basic bitrate tracker for BWE purposes
lminiero Aug 1, 2023
9668640
WIP: fixes to parsing and stats evaluation
atoppi Aug 3, 2023
c46d7c8
Move trigger to update BWE stats to handle loop source, and added pla…
lminiero Aug 3, 2023
74b6256
Use double for bw estimate. Try to address recv delta for not consecu…
atoppi Aug 3, 2023
728b6fe
Initialize int var to 0
atoppi Aug 3, 2023
2301f8f
Track inflight packets after nice_agent_send
atoppi Aug 4, 2023
784c217
Further experiments, and basic integration in VideoRoom
lminiero Sep 7, 2023
a308d17
Aligned to recent fixes upstream
lminiero Sep 7, 2023
f505e3e
First draft of probing mechanism
lminiero Sep 11, 2023
b5d4edc
Added APIs to dynamically enable/disable probing from plugins
lminiero Sep 12, 2023
1ee053a
Fire probing related events more often
lminiero Sep 19, 2023
8f7cb4b
Refactored calculation of current bitrates, and changed estimate trigger
lminiero Sep 21, 2023
8ad151a
Fixed missing temporal layer change notification at startup
lminiero Sep 27, 2023
6c333a7
Changed delay tracking to moving average, and added CSV debugging
lminiero Sep 27, 2023
8718e90
Smoothen temporary layer transitions when driven by BWE
lminiero Sep 28, 2023
8f3eb5c
Weighted average for delays, and experiments with smoother probing
lminiero Sep 28, 2023
317657b
Refactored probing API to chase a bitrate target
lminiero Oct 4, 2023
c1d5a87
Experiment with live debugging of stats, and more probing tweaks
lminiero Oct 9, 2023
63a65a7
Added Admin API methods to tweak BWE debugging
lminiero Oct 9, 2023
11449cc
Add missing objects for fuzzing targets
atoppi Oct 13, 2023
8c16c7a
Reduced buildup step
lminiero Nov 21, 2023
9880f4a
Aligned to latest changes in master
lminiero Nov 21, 2023
626e193
Aligned with latest changes in master
lminiero Feb 4, 2024
d95c713
Aligned to latest changes
lminiero Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion fuzzers/config.sh
Expand Up @@ -23,7 +23,7 @@ COVERAGE_LDFLAGS="-O1 -fno-omit-frame-pointer -g -ggdb3 -fprofile-instr-generate
JANUS_CONF_FLAGS="--disable-docs --disable-post-processing --disable-turn-rest-api --disable-all-transports --disable-all-plugins --disable-all-handlers --disable-data-channels"

# Janus objects needed for fuzzing
JANUS_OBJECTS="janus-log.o janus-utils.o janus-rtcp.o janus-rtp.o janus-sdp-utils.o"
JANUS_OBJECTS="janus-log.o janus-utils.o janus-rtcp.o janus-rtp.o janus-sdp-utils.o janus-bwe.o janus-ip-utils.o"

# CFLAGS for fuzzer dependencies
DEPS_CFLAGS="$(pkg-config --cflags glib-2.0)"
Expand Down
4 changes: 2 additions & 2 deletions fuzzers/rtcp_fuzzer.c
Expand Up @@ -61,8 +61,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
janus_rtcp_cap_remb((char *)copy_data[idx++], size, 256000);
janus_rtcp_swap_report_blocks((char *)copy_data[idx++], size, 2);
janus_rtcp_fix_report_data((char *)copy_data[idx++], size, 2000, 1000, 2, 2, 2, TRUE);
janus_rtcp_fix_ssrc(&ctx0, (char *)copy_data[idx++], size, 1, 2, 2);
janus_rtcp_parse(&ctx1, (char *)copy_data[idx++], size);
janus_rtcp_fix_ssrc(&ctx0, NULL, (char *)copy_data[idx++], size, 1, 2, 2);
janus_rtcp_parse(&ctx1, NULL, (char *)copy_data[idx++], size);
janus_rtcp_remove_nacks((char *)copy_data[idx++], size);
/* Functions that allocate new memory */
char *output_data = janus_rtcp_filter((char *)data, size, &newlen);
Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.am
Expand Up @@ -4,7 +4,7 @@ CLEANFILES = $(NULL)
bin_PROGRAMS = janus

headerdir = $(includedir)/janus
header_HEADERS = apierror.h config.h log.h debug.h mutex.h record.h \
header_HEADERS = apierror.h config.h log.h debug.h mutex.h record.h bwe.h \
rtcp.h rtp.h rtpsrtp.h sdp-utils.h ip-utils.h utils.h refcount.h text2pcap.h

pluginsheaderdir = $(includedir)/janus/plugins
Expand Down Expand Up @@ -72,6 +72,8 @@ janus_SOURCES = \
apierror.h \
auth.c \
auth.h \
bwe.c \
bwe.h \
config.c \
config.h \
debug.h \
Expand Down