Add SFrame packet buffer for RTP-level frame assembly
This CL adds the foundational components for SFrame receive-side support
in WebRTC, as specified in draft-ietf-avtcore-rtp-sframe. These
components sit upstream of the existing PacketBuffer and handle
SFrame-specific parsing and frame boundary validation before packets
enter the standard video receive pipeline.
Three new components, with BUILD.gn targets and unit tests:
SFrameDescriptor -- header-only struct representing the 1-byte SFrame
payload descriptor (S/E/T bits: start-of-frame, end-of-frame,
per-packet vs per-frame mode).
SframeRtpPacketReceived -- lightweight wrapper pairing an
RtpPacketReceived with its parsed SFrameDescriptor, so downstream code
can inspect S/E/T bits without re-parsing.
SFramePacketBuffer -- circular buffer that collects SFrame RTP packets
and validates complete S->E runs (contiguous start-to-end sequences)
before releasing them for decryption and depacketization. Follows the
same circular-buffer pattern as the existing PacketBuffer: starts at 96
slots, doubles up to 2048, validates frame consistency (T-bit, payload
type, timestamp), and supports ClearTo for window management.
Why this is needed
SFrame (draft-ietf-avtcore-rtp-sframe) adds a 1-byte payload descriptor
to each RTP packet indicating frame boundaries and encryption mode.
Before SFrame packets can enter the existing codec depacketizer
pipeline, we need to:
1. Parse and strip the SFrame descriptor byte
2. Collect packets into complete frames (S->E runs) at the RTP level
3. Branch on the T-bit to determine whether decryption is per-packet
(T=1) or per-frame (T=0)
The existing PacketBuffer operates on codec-depacketized payloads and
cannot perform this pre-processing. A separate buffer layer is required.
More on architecture plan:
https://github.com/webex/webrtc-sframe/tree/sframe-receive-pipeline
Bug: webrtc:479862368
Change-Id: I40c076739a7e237eae344a6a3282948c53d5420b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/466920
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47856}
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.