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

Issue 2531383002: Wire up BitrateAllocation to be sent as RTCP TargetBitrate (Closed)

Created:
4 years ago by sprang_webrtc
Modified:
4 years ago
CC:
webrtc-reviews_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhuangzesen_agora.io, zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, mflodman
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Wire up BitrateAllocation to be sent as RTCP TargetBitrate BUG=webrtc:6301

Patch Set 1 #

Patch Set 2 : end to end test #

Patch Set 3 : don't send when inactive #

Patch Set 4 : Flaky test, racy shutdown #

Total comments: 19

Patch Set 5 : Addressed comments #

Total comments: 6

Patch Set 6 : Comments #

Patch Set 7 : Send single extended report with multiple members #

Patch Set 8 : Simulcast fix #

Total comments: 12

Patch Set 9 : Addressed comments, removed crit from video sender #

Patch Set 10 : Rebase #

Patch Set 11 : Undo crit removal #

Unified diffs Side-by-side diffs Delta from patch set Stats (+394 lines, -195 lines) Patch
M webrtc/common_video/include/video_bitrate_allocator.h View 1 chunk +9 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/include/rtp_rtcp.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h View 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtcp_sender.h View 1 2 3 4 5 6 7 8 7 chunks +16 lines, -13 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtcp_sender.cc View 1 2 3 4 5 6 7 8 9 8 chunks +61 lines, -44 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc View 1 chunk +36 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/video_coding_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +18 lines, -8 lines 0 comments Download
M webrtc/modules/video_coding/video_coding_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/video_coding/video_sender.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +21 lines, -10 lines 0 comments Download
M webrtc/modules/video_coding/video_sender_unittest.cc View 6 chunks +9 lines, -9 lines 0 comments Download
M webrtc/video/end_to_end_tests.cc View 1 2 3 4 5 6 7 8 9 3 chunks +91 lines, -88 lines 0 comments Download
M webrtc/video/payload_router.h View 2 chunks +4 lines, -2 lines 0 comments Download
M webrtc/video/payload_router.cc View 1 2 3 4 5 6 7 3 chunks +22 lines, -2 lines 0 comments Download
M webrtc/video/payload_router_unittest.cc View 1 2 3 4 5 6 7 6 chunks +53 lines, -5 lines 0 comments Download
M webrtc/video/video_send_stream.cc View 1 2 3 4 5 6 7 8 9 11 chunks +19 lines, -10 lines 0 comments Download
M webrtc/video/vie_encoder.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -0 lines 0 comments Download
M webrtc/video/vie_encoder.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +18 lines, -3 lines 0 comments Download

Messages

Total messages: 48 (32 generated)
sprang_webrtc
4 years ago (2016-11-29 09:44:28 UTC) #16
danilchap
https://codereview.webrtc.org/2531383002/diff/60001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc File webrtc/modules/rtp_rtcp/source/rtcp_sender.cc (right): https://codereview.webrtc.org/2531383002/diff/60001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc#newcode1018 webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:1018: std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildTargetBitrate( move this methods to other Builders, after ...
4 years ago (2016-11-29 10:39:32 UTC) #19
sprang_webrtc
https://codereview.webrtc.org/2531383002/diff/60001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc File webrtc/modules/rtp_rtcp/source/rtcp_sender.cc (right): https://codereview.webrtc.org/2531383002/diff/60001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc#newcode1018 webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:1018: std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildTargetBitrate( On 2016/11/29 10:39:31, danilchap wrote: > move ...
4 years ago (2016-11-29 12:24:01 UTC) #20
danilchap
lgtm https://codereview.webrtc.org/2531383002/diff/60001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc File webrtc/modules/rtp_rtcp/source/rtcp_sender.cc (right): https://codereview.webrtc.org/2531383002/diff/60001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc#newcode1036 webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:1036: video_bitrate_allocation_ = rtc::Optional<BitrateAllocation>(); On 2016/11/29 12:24:01, språng wrote: ...
4 years ago (2016-11-29 13:13:14 UTC) #21
sprang_webrtc
https://codereview.webrtc.org/2531383002/diff/80001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc File webrtc/modules/rtp_rtcp/source/rtcp_sender.cc (right): https://codereview.webrtc.org/2531383002/diff/80001/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc#newcode743 webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:743: return std::unique_ptr<rtcp::RtcpPacket>(std::move(xr)); On 2016/11/29 13:13:14, danilchap wrote: > return ...
4 years ago (2016-11-29 13:34:55 UTC) #22
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/2531383002/100001
4 years ago (2016-11-29 13:35:10 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/10773)
4 years ago (2016-11-29 13:38:41 UTC) #27
sprang_webrtc
Seems the test turned flaky, and rewriting the test rtcp parser would be more work ...
4 years ago (2016-11-29 15:14:02 UTC) #28
danilchap
Nice! lgtm
4 years ago (2016-11-29 15:54:06 UTC) #29
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/2531383002/120001
4 years ago (2016-11-29 16:03:36 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/10792)
4 years ago (2016-11-29 16:07:07 UTC) #33
sprang_webrtc
+stefan as owner
4 years ago (2016-11-30 08:54:56 UTC) #35
sprang_webrtc
Found another issue: when using simulcast, there shall be one target bitrate message sent per ...
4 years ago (2016-11-30 15:10:04 UTC) #36
stefan-webrtc
https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h File webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h (right): https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h#newcode108 webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h:108: kRtcpXrTargetBitrate This looks a bit odd. Should this really ...
4 years ago (2016-12-01 08:42:21 UTC) #37
danilchap
This CL is growing big. May be it is time to split it, e.g. changes ...
4 years ago (2016-12-01 10:18:55 UTC) #42
sprang_webrtc
4 years ago (2016-12-01 10:47:58 UTC) #47
I moved the rtcp parts to a new cl: https://codereview.webrtc.org/2546713002/
Will move the video parts to another one as well, without a rebase in the middle
:/
Let's close this one for now.

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/rtp_rtcp/...
File webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h (right):

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/rtp_rtcp/...
webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h:108: kRtcpXrTargetBitrate
On 2016/12/01 08:42:20, stefan-webrtc (holmer) wrote:
> This looks a bit odd. Should this really belong to RTCPPacketType?

The problem is in rtcp sender, it becomes either rather complicated or we'll
have to change the type in a number of places from enum to uint32_t... I would
have liked to rather go the other way (to an enum class) in the not too distant
future. 

I'll change to an uint32_t for now and remove this. Let's keep the  refactorings
to separate cls.

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/rtp_rtcp/...
File webrtc/modules/rtp_rtcp/source/rtcp_sender.cc (right):

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/rtp_rtcp/...
webrtc/modules/rtp_rtcp/source/rtcp_sender.cc:854: feedback_state.has_last_xr_rr
|| video_bitrate_allocation_) {
On 2016/12/01 08:42:20, stefan-webrtc (holmer) wrote:
> Seems like we now have two checks for this. First here we check if any
extended
> reports should be added, then in BuildExtendedReports we check each of these
> again to see which of them should be added. Why not keep as it was and just
> SetFlag on those which are available here?

Because we don't want to have separate builders for each type, creating
individual extended reports containing a single type. Any of them should trigger
just a single builder. If we set all the flags here, and map each of these types
to the same extended reports builder, we would call that multiple times, and
would then there have to check again if the various xr types have already been
built. Or we would have to do a concurrent modification of the set that's being
iterated over. Neither are very nice options.

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/video_cod...
File webrtc/modules/video_coding/video_coding_impl.h (right):

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/video_cod...
webrtc/modules/video_coding/video_coding_impl.h:85: uint8_t lossRate,
On 2016/12/01 08:42:20, stefan-webrtc (holmer) wrote:
> Please change to loss_rate

Done.

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/video_cod...
webrtc/modules/video_coding/video_coding_impl.h:92: void
UpdateChannelParemeters(
On 2016/12/01 08:42:20, stefan-webrtc (holmer) wrote:
> I think it would be good to clarify what the difference is between this method
> and SetChannelParameters. When should this be used and how does it differ from
> the other one?

Done.

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/video_cod...
File webrtc/modules/video_coding/video_sender.cc (right):

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/modules/video_cod...
webrtc/modules/video_coding/video_sender.cc:216:
bitrate_updated_callback->OnBitrateAllocationUpdated(bitrate_allocation);
On 2016/12/01 08:42:20, stefan-webrtc (holmer) wrote:
> You are holding params_crit_ when calling out here. Is that necessary? Doesn't
> look like it since the crit isn't held when calling UpdateEncoderParameters
from
> SetChannelParameters.

I changed the one usage that made the crit useful instead, and removed the crit
entierly.

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/video/end_to_end_...
File webrtc/video/end_to_end_tests.cc (right):

https://codereview.webrtc.org/2531383002/diff/140001/webrtc/video/end_to_end_...
webrtc/video/end_to_end_tests.cc:3076: }
On 2016/12/01 08:42:20, stefan-webrtc (holmer) wrote:
> Should we add a test for the new target bitrates extended report too?

sent_rtcp_target_bitrate_ is already part of RtcpXrObserver test?

Powered by Google App Engine
This is Rietveld 408576698