Split RTPSender packet building into helpers The code that attaches the MID and RID header extensions was duplicated in AllocatePacket(), BuildRtxPacket() and both padding paths of GeneratePadding(), and GeneratePadding() had grown long and hard to read. - Move the MID and RID logic into AttachMidAndRid(). - Build media and padding packets in BuildMediaPacket() and BuildPaddingPacket(), and track the maximum CSRC count in UpdateMaxNumCsrcs(). - Split GeneratePadding() with AppendPayloadPadding() and PaddingBytesInPacket(). Checks that cannot change inside the padding loop now return before the loop instead of breaking out of it. The helpers still run under send_mutex_. This prepares https://webrtc-review.googlesource.com/c/src/+/507280, which builds packets after releasing the lock and then only needs to change which state the helpers read. BuildMediaPacket() and UpdateMaxNumCsrcs() will also be used by a per-frame variant of AllocatePacket(). No change in behavior. Bug: webrtc:42223727 Change-Id: I22b7682a65fb7c56d1c92b8cd07af3ef998b0b44 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/507642 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#48809}
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.