Fix potential deadlock in RTCStatsCollector during shutdown. When stats gathering on the network thread is cancelled (e.g., during PC closure), the `SafeTask` evaluating the partial results on the network thread may be dropped without executing. This causes its closures (including `RtpTransceiverStatsInfo` objects) to be destructed on the network thread. Because `RtpTransceiverStatsInfo` holds `scoped_refptr` references to `RtpTransceiver` and `RtpReceiverInternal` (which may respectively hold `VideoTrackProxyWithInternal`), their destruction on the network thread can trigger a blocking call back to the signaling thread (via the proxies), potentially leading to a deadlock if the signaling thread is issuing a blocking call to the network thread. This change prevents clears the object references (`transceiver` and `receivers`) on the signaling thread before posting to the network thread. When the task is dropped on the network thread, the subsequent destruction of `RtpTransceiverStatsInfo` will be a no-op that avoids cross-thread blocking. Bug: b/483026914 Change-Id: Ifc5c317e6a26cc0c97c9ca67101ef8b0cc90ba1e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/448940 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#46897}
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.