commit | 8679ac1d10e2d1ba4a2e091000dc6246745f49f1 | [log] [tgz] |
---|---|---|
author | Henrik Boström <hbos@webrtc.org> | Fri Apr 16 07:54:18 2021 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Apr 26 10:58:38 2021 |
tree | 1ab40ffab34cc0fa520c42d37bf766da8f1b541a | |
parent | 02400a3e5a54aceee28fc8ed0b7a35e1c3984df3 [diff] |
Fix unsignalled ssrc race in WebRtcVideoChannel. BaseChannel adds and removes receive streams on the worker thread (UpdateRemoteStreams_w) and then posts a task to the network thread to update the demuxer criteria. Until this happens, OnRtpPacket() keeps forwarding "recently removed" ssrc packets to the WebRtcVideoChannel. Furthermore WebRtcVideoChannel::OnPacketReceived() posts task from the network thread to the worker thread, so even if the demuxer criteria was instantly updated we would still have an issue of in-flight packets for old ssrcs arriving late on the worker thread inside WebRtcVideoChannel. The wrong ssrc could also arrive when the demuxer goes from forwarding all packets to a single m= section to forwarding to different m= sections. In this case we get packets with an ssrc for a recently created m= section and the ssrc was never intended for our channel. This is a problem because when WebRtcVideoChannel sees an unknown ssrc it treats it as an unsignalled stream, creating and destroying default streams which can be very expensive and introduce large delays when lots of packets are queued up. This CL addresses the issue with callbacks for when a demuxer criteria update is pending and when it has completed. During this window of time, WebRtcVideoChannel will drop packets for unknown ssrcs. This approach fixes the race without introducing any new locks and packets belonging to ssrcs that were not removed continue to be forwarded even if a demuxer criteria update is pending. This should make a=inactive for 50p receive streams a glitch-free experience. (cherry picked from commit 15e078c574981597c5d6ecc13476f54e667dc568) Bug: webrtc:12258, chromium:1069603 Change-Id: I30d85f53d84e7eddf7d21380fb608631863aad21 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214964 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Taylor <deadbeef@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Original-Commit-Position: refs/heads/master@{#33757} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215976 Cr-Commit-Position: refs/branch-heads/4472@{#8} Cr-Branched-From: 3e0c60ba4ef28a9f26fe991e5eec3150402c7dd3-refs/heads/master@{#33644}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.