Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 2061423003: Refactor NACK bitrate allocation (Closed)

Created:
4 years, 6 months ago by sprang_webrtc
Modified:
4 years, 5 months ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, video-team_agora.io, danilchap, yujie_mao (webrtc), the sun, zhuangzesen_agora.io, Andrew MacDonald, zhengzhonghou_agora.io, henrika_webrtc, stefan-webrtc, tterriberry_mozilla.com, audio-team_agora.io, qiang.lu, niklas.enbom, peah-webrtc, minyue-webrtc, hlundin-webrtc, pbos-webrtc, perkj_webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Refactor NACK bitrate allocation Nack bitrate allocation should not be done on a per-rtp-module basis, but rather shared bitrate pool per call. This CL moves allocation to the pacer and cleans up a bunch if bitrate stats handling. BUG= R=danilchap@webrtc.org, stefan@webrtc.org, tommi@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/5fc59e810b8ea848702f2dbc740fe190608e1413

Patch Set 1 #

Patch Set 2 : Extended EndToEnd test, various fixes #

Patch Set 3 : Fixed test #

Patch Set 4 : Fixed data race #

Total comments: 23

Patch Set 5 : Moved rate limiter and addressed comments #

Total comments: 28

Patch Set 6 : Moved RateLimiter to separate file, addressed comments #

Patch Set 7 : Fixed compilation issue on win #

Total comments: 14

Patch Set 8 : Addressed comments #

Total comments: 10

Patch Set 9 : Moved rate limiter from congestion controller to call. #

Patch Set 10 : Moved rate limiter back to congestion controller #

Total comments: 37

Patch Set 11 : Addressed comments #

Total comments: 2

Patch Set 12 : Addressed comments #

Total comments: 4

Patch Set 13 : Typo #

Patch Set 14 : Rebase #

Patch Set 15 : Fixed test setup #

Patch Set 16 : Fixed nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+603 lines, -620 lines) Patch
M webrtc/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/base/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/base/base.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A webrtc/base/rate_limiter.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +56 lines, -0 lines 0 comments Download
A webrtc/base/rate_limiter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +65 lines, -0 lines 0 comments Download
A webrtc/base/rate_limiter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +205 lines, -0 lines 0 comments Download
M webrtc/base/rate_statistics.h View 1 2 3 4 5 1 chunk +19 lines, -4 lines 0 comments Download
M webrtc/base/rate_statistics.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -3 lines 0 comments Download
M webrtc/call/rtc_event_log_unittest.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/common_types.h View 1 2 chunks +3 lines, -4 lines 0 comments Download
M webrtc/modules/congestion_controller/congestion_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +22 lines, -1 line 0 comments Download
M webrtc/modules/congestion_controller/include/congestion_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M webrtc/modules/rtp_rtcp/include/receive_statistics.h View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M webrtc/modules/rtp_rtcp/include/rtp_rtcp.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -6 lines 0 comments Download
M webrtc/modules/rtp_rtcp/rtp_rtcp.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
D webrtc/modules/rtp_rtcp/source/bitrate.h View 1 chunk +0 lines, -77 lines 0 comments Download
D webrtc/modules/rtp_rtcp/source/bitrate.cc View 1 chunk +0 lines, -121 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +7 lines, -2 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h View 1 2 3 4 5 chunks +4 lines, -10 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc View 1 2 3 4 5 7 chunks +5 lines, -31 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc View 1 2 3 4 5 3 chunks +4 lines, -6 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +7 lines, -1 line 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender.h View 1 2 3 4 5 10 chunks +8 lines, -55 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 19 chunks +47 lines, -160 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc View 1 2 3 4 5 6 7 17 chunks +42 lines, -31 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender_video.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -7 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc View 1 2 3 4 6 chunks +14 lines, -12 lines 0 comments Download
M webrtc/video/end_to_end_tests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +41 lines, -8 lines 0 comments Download
M webrtc/video/payload_router.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M webrtc/video/payload_router.cc View 1 2 3 4 5 1 chunk +0 lines, -19 lines 0 comments Download
M webrtc/video/payload_router_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -21 lines 0 comments Download
M webrtc/video/rtp_stream_receiver.cc View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M webrtc/video/send_statistics_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/video/send_statistics_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -4 lines 0 comments Download
M webrtc/video/send_statistics_proxy_unittest.cc View 4 chunks +17 lines, -18 lines 0 comments Download
M webrtc/video/video_send_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +3 lines, -1 line 0 comments Download
M webrtc/webrtc_tests.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 36 (9 generated)
sprang_webrtc
4 years, 6 months ago (2016-06-20 15:35:49 UTC) #2
sprang_webrtc
+mflodman for FYI and cleanup of dead code in webrtc/common_types.h
4 years, 6 months ago (2016-06-20 15:39:42 UTC) #4
danilchap
https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h File webrtc/modules/rtp_rtcp/include/rtp_rtcp.h (left): https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h#oldcode289 webrtc/modules/rtp_rtcp/include/rtp_rtcp.h:289: uint32_t* nackRate) const = 0; this would break downstream ...
4 years, 6 months ago (2016-06-20 16:53:46 UTC) #5
sprang_webrtc
+danil as reviewer, perhaps you want to take a first pass? https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h File webrtc/modules/rtp_rtcp/include/rtp_rtcp.h (left): ...
4 years, 6 months ago (2016-06-23 07:54:29 UTC) #7
danilchap
First pass https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/pacing/paced_sender.cc File webrtc/modules/pacing/paced_sender.cc (right): https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/pacing/paced_sender.cc#newcode35 webrtc/modules/pacing/paced_sender.cc:35: const int64_t kMaxRtt = 1000; kMaxRttMs https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/pacing/paced_sender.cc#newcode265 ...
4 years, 6 months ago (2016-06-23 12:46:12 UTC) #8
sprang_webrtc
https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/pacing/paced_sender.cc File webrtc/modules/pacing/paced_sender.cc (right): https://codereview.webrtc.org/2061423003/diff/60001/webrtc/modules/pacing/paced_sender.cc#newcode265 webrtc/modules/pacing/paced_sender.cc:265: retransmission_rate_(kMaxRtt, 8) { // Scale 8 for bits per ...
4 years, 5 months ago (2016-06-28 09:12:33 UTC) #9
danilchap
Mostly nits: https://codereview.webrtc.org/2061423003/diff/80001/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2061423003/diff/80001/webrtc/base/rate_statistics.cc#newcode80 webrtc/base/rate_statistics.cc:80: rtc::Optional<uint32_t> RateStatistics::Rate(int64_t now_ms) const { May be ...
4 years, 5 months ago (2016-06-28 14:26:18 UTC) #10
sprang_webrtc
https://codereview.webrtc.org/2061423003/diff/80001/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2061423003/diff/80001/webrtc/base/rate_statistics.cc#newcode80 webrtc/base/rate_statistics.cc:80: rtc::Optional<uint32_t> RateStatistics::Rate(int64_t now_ms) const { On 2016/06/28 14:26:17, danilchap ...
4 years, 5 months ago (2016-07-04 09:33:04 UTC) #11
danilchap
lgtm % nit https://codereview.webrtc.org/2061423003/diff/120001/webrtc/base/rate_limiter_unittest.cc File webrtc/base/rate_limiter_unittest.cc (right): https://codereview.webrtc.org/2061423003/diff/120001/webrtc/base/rate_limiter_unittest.cc#newcode29 webrtc/base/rate_limiter_unittest.cc:29: static const int64_t kWindowSize = 1000; ...
4 years, 5 months ago (2016-07-04 12:22:57 UTC) #12
sprang_webrtc
+stefan -pbos https://codereview.webrtc.org/2061423003/diff/120001/webrtc/base/rate_limiter_unittest.cc File webrtc/base/rate_limiter_unittest.cc (right): https://codereview.webrtc.org/2061423003/diff/120001/webrtc/base/rate_limiter_unittest.cc#newcode29 webrtc/base/rate_limiter_unittest.cc:29: static const int64_t kWindowSize = 1000; On ...
4 years, 5 months ago (2016-07-04 12:47:01 UTC) #14
sprang_webrtc
ping stefan?
4 years, 5 months ago (2016-07-06 12:07:17 UTC) #15
stefan-webrtc
https://codereview.webrtc.org/2061423003/diff/140001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/140001/webrtc/base/rate_limiter.cc#newcode36 webrtc/base/rate_limiter.cc:36: // allowed due to too high bitrate caused by ...
4 years, 5 months ago (2016-07-06 12:43:21 UTC) #16
sprang_webrtc
https://codereview.webrtc.org/2061423003/diff/140001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/140001/webrtc/base/rate_limiter.cc#newcode36 webrtc/base/rate_limiter.cc:36: // allowed due to too high bitrate caused by ...
4 years, 5 months ago (2016-07-06 14:13:07 UTC) #17
sprang_webrtc
As per offline discussion, moved rate limiter back to congestion controller. ptal -mflodman +tommi as ...
4 years, 5 months ago (2016-07-07 12:09:15 UTC) #19
tommi
took a quick look https://codereview.webrtc.org/2061423003/diff/180001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/180001/webrtc/base/rate_limiter.cc#newcode25 webrtc/base/rate_limiter.cc:25: // current rate. keep the ...
4 years, 5 months ago (2016-07-07 12:48:47 UTC) #20
sprang_webrtc
Tommi, you seem to really really dislike that I made RateLimiter thread safe. As noted ...
4 years, 5 months ago (2016-07-07 13:46:51 UTC) #21
tommi
On 2016/07/07 13:46:51, språng wrote: > Tommi, you seem to really really dislike that I ...
4 years, 5 months ago (2016-07-07 15:27:37 UTC) #22
tommi
looks good - I still have a few minor questions so please bear with me. ...
4 years, 5 months ago (2016-07-08 08:52:20 UTC) #23
sprang_webrtc
https://codereview.webrtc.org/2061423003/diff/180001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/180001/webrtc/base/rate_limiter.cc#newcode27 webrtc/base/rate_limiter.cc:27: rtc::CritScope cs(&lock_); On 2016/07/08 08:52:20, tommi-webrtc wrote: > On ...
4 years, 5 months ago (2016-07-08 11:46:59 UTC) #24
stefan-webrtc
lgtm https://codereview.webrtc.org/2061423003/diff/140001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/140001/webrtc/base/rate_limiter.cc#newcode36 webrtc/base/rate_limiter.cc:36: // allowed due to too high bitrate caused ...
4 years, 5 months ago (2016-07-08 11:55:58 UTC) #25
tommi
just one sanity check and then I'll shut up. https://codereview.webrtc.org/2061423003/diff/220001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/220001/webrtc/base/rate_limiter.cc#newcode30 webrtc/base/rate_limiter.cc:30: ...
4 years, 5 months ago (2016-07-08 14:07:04 UTC) #26
sprang_webrtc
https://codereview.webrtc.org/2061423003/diff/220001/webrtc/base/rate_limiter.cc File webrtc/base/rate_limiter.cc (right): https://codereview.webrtc.org/2061423003/diff/220001/webrtc/base/rate_limiter.cc#newcode30 webrtc/base/rate_limiter.cc:30: int64_t now_ms = clock_->TimeInMilliseconds(); On 2016/07/08 14:07:04, tommi-webrtc wrote: ...
4 years, 5 months ago (2016-07-08 14:16:51 UTC) #27
tommi
On 2016/07/08 14:16:51, språng wrote: > https://codereview.webrtc.org/2061423003/diff/220001/webrtc/base/rate_limiter.cc > File webrtc/base/rate_limiter.cc (right): > > https://codereview.webrtc.org/2061423003/diff/220001/webrtc/base/rate_limiter.cc#newcode30 > ...
4 years, 5 months ago (2016-07-08 14:17:36 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2061423003/300001
4 years, 5 months ago (2016-07-08 14:45:29 UTC) #31
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/5fc59e810b8ea848702f2dbc740fe190608e1413 Cr-Commit-Position: refs/heads/master@{#13416}
4 years, 5 months ago (2016-07-08 16:15:37 UTC) #33
sprang_webrtc
Committed patchset #16 (id:300001) manually as 5fc59e810b8ea848702f2dbc740fe190608e1413 (presubmit successful).
4 years, 5 months ago (2016-07-08 16:15:40 UTC) #35
sprang_webrtc
4 years, 5 months ago (2016-07-08 16:38:37 UTC) #36
Message was sent while issue was closed.
A revert of this CL (patchset #16 id:300001) has been created in
https://codereview.webrtc.org/2131913003/ by sprang@webrtc.org.

The reason for reverting is: Breaks upstream code..

Powered by Google App Engine
This is Rietveld 408576698