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

Issue 2469093003: Remove RED/RTX workaround from sender/receiver and VideoEngine2. (Closed)

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

Description

Remove RED/RTX workaround from sender/receiver and VideoEngine2. In older Chrome versions, the associated payload type in the RTX header of retransmitted packets was always set to be the original media payload type, regardless of the actual payload type of the packet. This meant that packets encapsulated with RED headers had incorrect payload type information in the RTX header. Due to an assumption in the receiver, this incorrect payload type information would effectively be undone, leading to a working system. Albeit working, this behaviour was undesired, and thus removed. In the interim, several workarounds were introduced to not destroy interop between old and new Chrome versions: (1) https://codereview.webrtc.org/1649493004 - If no payload type mapping existed for RED over RTX, the payload type of the underlying media would be used. - If RED had been negotiated, received RTX packets would always be assumed to contain RED. (2) https://codereview.webrtc.org/1964473002 - If RED was removed from the remote description answer, it would be disabled in the local receiver as well. (3) https://codereview.webrtc.org/2033763002 - If RED was negotiated in the SDP, it would always be used, regardless if ULPFEC was negotiated and used, or not. Since the Chrome versions that exhibited the original bug now are very old, this CL removes the workarounds from (1) and (2). In particular, after this change, we will have the following behaviour: - We assume that a payload type mapping for RED over RTX always is set. If this is not the case, the RTX packet is not sent. - The associated payload type of received RTX packets will always be obeyed. - The (non)-existence of RED in the remote description does not affect the local receiver. The workaround in (3) still needs to exist, in order to interop with receivers that did not have the workarounds in (1) and (2) removed. The change in (3) can be removed in a couple of Chrome versions. TESTED=Using AppRTC between patched Chrome (connected to ethernet) and standard Chrome M54 (connected to lossy internal Google WiFi), with and without FEC turned off using AppRTC flag. Also using "Munge SDP" sample on patched Chrome over loopback interface, with 100ms delay and 5% packet loss simulated using tc. BUG=webrtc:6650 Committed: https://crrev.com/e6f98c7a379aae970e7570ac3cf99e2a21f256c0 Cr-Commit-Position: refs/heads/master@{#15038}

Patch Set 1 : Remove RED/RTX workaround from sender/receiver and VideoEngine2. #

Total comments: 9

Patch Set 2 : Response to danilchap. #

Patch Set 3 : Response to holmer. #

Total comments: 7

Patch Set 4 : Fix broken code. #

Patch Set 5 : Change tests to expect RED, as before. #

Patch Set 6 : Log payload type as int, not uint8. #

Patch Set 7 : Fix comment. #

Total comments: 3

Patch Set 8 : Rebase. #

Patch Set 9 : Enable RED and ULPFEC separately in RtpStreamReceiver. #

Patch Set 10 : Rebase. #

Patch Set 11 : Remove use_rtx_payload_mapping_on_restore from VideoReceiveStream::Config. #

Patch Set 12 : Rebase. #

Patch Set 13 : Fix warning message. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -165 lines) Patch
M webrtc/media/engine/webrtcvideoengine2.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +1 line, -12 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +3 lines, -31 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 2 chunks +3 lines, -9 lines 0 comments Download
M webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h View 1 2 3 4 5 6 4 chunks +7 lines, -16 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc View 1 2 3 4 5 4 chunks +14 lines, -15 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc View 1 chunk +0 lines, -20 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 1 chunk +4 lines, -8 lines 0 comments Download
M webrtc/video/rtp_stream_receiver.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/video/rtp_stream_receiver.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -16 lines 0 comments Download
M webrtc/video/video_send_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +36 lines, -30 lines 0 comments Download
M webrtc/video/video_send_stream_tests.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/video_receive_stream.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 33 (12 generated)
brandtr
Please have a look at this CL. Stefan: general Danil: changes to RTP module Do ...
4 years, 1 month ago (2016-11-02 11:54:19 UTC) #4
danilchap
https://codereview.webrtc.org/2469093003/diff/20001/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h File webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h (left): https://codereview.webrtc.org/2469093003/diff/20001/webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h#oldcode175 webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h:175: // When true, use rtx_payload_type_map_ when restoring RTX packets ...
4 years, 1 month ago (2016-11-02 13:56:53 UTC) #5
stefan-webrtc
https://codereview.webrtc.org/2469093003/diff/20001/webrtc/video/video_send_stream.cc File webrtc/video/video_send_stream.cc (right): https://codereview.webrtc.org/2469093003/diff/20001/webrtc/video/video_send_stream.cc#newcode958 webrtc/video/video_send_stream.cc:958: DisableUlpfec(); As discussed offline, this is not safe to ...
4 years, 1 month ago (2016-11-02 14:24:53 UTC) #6
brandtr
https://codereview.webrtc.org/2469093003/diff/20001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc File webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc (right): https://codereview.webrtc.org/2469093003/diff/20001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc#newcode260 webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc:260: int associated_payload_type; On 2016/11/02 13:56:52, danilchap wrote: > might ...
4 years, 1 month ago (2016-11-03 12:02:48 UTC) #8
danilchap
https://codereview.webrtc.org/2469093003/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc File webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc (right): https://codereview.webrtc.org/2469093003/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc#newcode261 webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc:261: int associated_payload_type = apt_mapping->second; do not think you can ...
4 years, 1 month ago (2016-11-03 12:10:36 UTC) #9
stefan-webrtc
https://codereview.webrtc.org/2469093003/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc File webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc (right): https://codereview.webrtc.org/2469093003/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc#newcode265 webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc:265: associated_payload_type) == 0) { I prefer find() over count() ...
4 years, 1 month ago (2016-11-03 12:17:15 UTC) #10
brandtr
Addressed comments and improved code. This still needs some further testing though: with the last ...
4 years, 1 month ago (2016-11-03 13:48:09 UTC) #11
danilchap
webrtc/modules/rtp_rtcp/ lgtm https://codereview.webrtc.org/2469093003/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc File webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc (right): https://codereview.webrtc.org/2469093003/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc#newcode270 webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc:270: << "Suppressing further warnings for this payload ...
4 years, 1 month ago (2016-11-03 14:21:08 UTC) #12
brandtr
https://codereview.webrtc.org/2469093003/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc File webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc (right): https://codereview.webrtc.org/2469093003/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc#newcode270 webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc:270: << "Suppressing further warnings for this payload type."; On ...
4 years, 1 month ago (2016-11-03 14:30:10 UTC) #13
danilchap
https://codereview.webrtc.org/2469093003/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc File webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc (right): https://codereview.webrtc.org/2469093003/diff/140001/webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc#newcode270 webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc:270: << "Suppressing further warnings for this payload type."; On ...
4 years, 1 month ago (2016-11-03 14:47:50 UTC) #14
brandtr
Probable reason for broken video when negotiating RED without ULPFEC: the RtpStreamReceiver will only accept ...
4 years, 1 month ago (2016-11-03 15:09:06 UTC) #15
brandtr
Rebase.
4 years, 1 month ago (2016-11-03 15:33:56 UTC) #16
brandtr
Rebase.
4 years, 1 month ago (2016-11-07 12:08:43 UTC) #17
brandtr
Now separately enabling RED and ULPFEC in RtpStreamReceiver. This allows us to receive RED packets, ...
4 years, 1 month ago (2016-11-07 12:13:02 UTC) #18
stefan-webrtc
lgtm
4 years, 1 month ago (2016-11-07 12:45:14 UTC) #19
brandtr
Hey holmer, I missed removing a now unnecessary config variable in the previous patchsets, so ...
4 years, 1 month ago (2016-11-10 08:24:44 UTC) #20
brandtr
Rebase.
4 years, 1 month ago (2016-11-10 09:04:36 UTC) #21
stefan-webrtc
On 2016/11/10 08:24:44, brandtr wrote: > Hey holmer, > > I missed removing a now ...
4 years, 1 month ago (2016-11-11 10:22:08 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/2469093003/250001
4 years, 1 month ago (2016-11-11 11:25:19 UTC) #29
commit-bot: I haz the power
Committed patchset #13 (id:250001)
4 years, 1 month ago (2016-11-11 11:28:34 UTC) #31
commit-bot: I haz the power
4 years, 1 month ago (2016-11-11 11:28:44 UTC) #33
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/e6f98c7a379aae970e7570ac3cf99e2a21f256c0
Cr-Commit-Position: refs/heads/master@{#15038}

Powered by Google App Engine
This is Rietveld 408576698