Upstream commit: https://webrtc.googlesource.com/src/+/9017801a374d091654f75f360182b00d5565e24f 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}
69 lines
2.5 KiB
Diff
69 lines
2.5 KiB
Diff
From: Michael Froman <mfroman@mozilla.com>
|
|
Date: Thu, 10 Oct 2024 13:42:00 +0000
|
|
Subject: Bug 1921707 - libwebrtc preprocessor, .json, .gni, and *.gn changes
|
|
r=ng,webrtc-reviewers
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D224076
|
|
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/7017edc7cfc880bb19f94115d4f48a8c58920a9b
|
|
---
|
|
.gn | 2 +-
|
|
media/BUILD.gn | 2 +-
|
|
modules/video_coding/BUILD.gn | 2 +-
|
|
webrtc.gni | 4 ++--
|
|
4 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/.gn b/.gn
|
|
index 82164c084e..a97e2f18b4 100644
|
|
--- a/.gn
|
|
+++ b/.gn
|
|
@@ -18,7 +18,7 @@ script_executable = "python3"
|
|
# The secondary source root is a parallel directory tree where
|
|
# GN build files are placed when they can not be placed directly
|
|
# in the source tree, e.g. for third party source trees.
|
|
-secondary_source = "//build/secondary/"
|
|
+secondary_source = "//libwebrtc/"
|
|
|
|
# These are the targets to skip header checking by default. The files in targets
|
|
# matching these patterns (see "gn help label_pattern" for format) will not have
|
|
diff --git a/media/BUILD.gn b/media/BUILD.gn
|
|
index 45611f6db2..b5f7fb10f7 100644
|
|
--- a/media/BUILD.gn
|
|
+++ b/media/BUILD.gn
|
|
@@ -7,7 +7,7 @@
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
import("//build/config/linux/pkg_config.gni")
|
|
-import("//third_party/libaom/options.gni")
|
|
+import("//libwebrtc/third_party/libaom/options.gni")
|
|
import("../webrtc.gni")
|
|
|
|
group("media") {
|
|
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
|
|
index e61afe7718..09f8f56fbc 100644
|
|
--- a/modules/video_coding/BUILD.gn
|
|
+++ b/modules/video_coding/BUILD.gn
|
|
@@ -7,7 +7,7 @@
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
import("//build/config/linux/pkg_config.gni")
|
|
-import("//third_party/libaom/options.gni")
|
|
+import("//libwebrtc/third_party/libaom/options.gni")
|
|
import("../../webrtc.gni")
|
|
|
|
rtc_library("encoded_frame") {
|
|
diff --git a/webrtc.gni b/webrtc.gni
|
|
index 428702516c..d5daa54c3f 100644
|
|
--- a/webrtc.gni
|
|
+++ b/webrtc.gni
|
|
@@ -487,8 +487,8 @@ all_poison_types = [
|
|
"default_neural_residual_echo_estimator",
|
|
]
|
|
|
|
-absl_include_config = "//third_party/abseil-cpp:absl_include_config"
|
|
-absl_define_config = "//third_party/abseil-cpp:absl_define_config"
|
|
+absl_include_config = "//libwebrtc/third_party/abseil-cpp:absl_include_config"
|
|
+absl_define_config = "//libwebrtc/third_party/abseil-cpp:absl_define_config"
|
|
|
|
# Abseil Flags are testonly, so this config will only be applied to WebRTC targets
|
|
# that are testonly.
|