Source code
Revision control
Copy as Markdown
Other Tools
From: Michael Froman <mjfroman@mac.com>
Date: Wed, 24 Sep 2025 16:10:48 -0500
Revert "Remove rtp_header_extensions_set()"
This reverts commit 3ff035e2787b7da182ee79e143da0b7ac099b4a8.
Reason for revert: Reverting https://webrtc-review.googlesource.com/c/src/+/396640 to investigate a downstream issue. This CL depends on https://webrtc-review.googlesource.com/c/src/+/396640 so to have a clean revert let's revert this one as well.
Bug: webrtc:425296984
Original change's description:
> Remove rtp_header_extensions_set()
>
> It seems to be unused and useless.
>
> Bug: webrtc:425296984
> Change-Id: Iee68aec438889f8c1dd7ee69ea444606f17ff485
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#44968}
Bug: webrtc:425296984, b/425662432, b/426394283
Change-Id: I5e124a6fd4fbe8bc516716a6dd9645251f2bdce5
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45006}
---
pc/channel.cc | 6 +++++-
pc/session_description.h | 11 ++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/pc/channel.cc b/pc/channel.cc
index 2b548064a4..8b8d7a7ffb 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -99,7 +99,11 @@ void MediaChannelParametersFromMediaDescription(
desc->type() == MediaType::VIDEO);
params->is_stream_active = is_stream_active;
params->codecs = desc->codecs();
- params->extensions = extensions;
+ // TODO: bugs.webrtc.org/11513 - See if we really need
+ // rtp_header_extensions_set() and remove it if we don't.
+ if (desc->rtp_header_extensions_set()) {
+ params->extensions = extensions;
+ }
params->rtcp.reduced_size = desc->rtcp_reduced_size();
params->rtcp.remote_estimate = desc->remote_estimate();
}
diff --git a/pc/session_description.h b/pc/session_description.h
index 37272c4106..4a330c5439 100644
--- a/pc/session_description.h
+++ b/pc/session_description.h
@@ -135,10 +135,18 @@ class MediaContentDescription {
}
void set_rtp_header_extensions(const RtpHeaderExtensions& extensions) {
rtp_header_extensions_ = extensions;
+ rtp_header_extensions_set_ = true;
}
void AddRtpHeaderExtension(const RtpExtension& ext) {
rtp_header_extensions_.push_back(ext);
- }
+ rtp_header_extensions_set_ = true;
+ }
+ // We can't always tell if an empty list of header extensions is
+ // because the other side doesn't support them, or just isn't hooked up to
+ // signal them. For now we assume an empty list means no signaling, but
+ // provide the ClearRtpHeaderExtensions method to allow "no support" to be
+ // clearly indicated (i.e. when derived from other information).
+ bool rtp_header_extensions_set() const { return rtp_header_extensions_set_; }
const StreamParamsVec& streams() const { return send_streams_; }
// TODO(pthatcher): Remove this by giving mediamessage.cc access
// to MediaContentDescription
@@ -254,6 +262,7 @@ class MediaContentDescription {
std::string bandwidth_type_ = kApplicationSpecificBandwidth;
std::vector<RtpExtension> rtp_header_extensions_;
+ bool rtp_header_extensions_set_ = false;
StreamParamsVec send_streams_;
bool conference_mode_ = false;
RtpTransceiverDirection direction_ = RtpTransceiverDirection::kSendRecv;