Adds remote estimate RTCP packet.
This adds the RemoteEstimate rtcp packet and wires it up to GoogCC where
it's used to improve congestion controller behavior.
The functionality is negotiated using SDP.
It's added with a field trial that allow disabling the functionality in
case there's any issues.
Bug: webrtc:10742
Change-Id: I1ea8e4216a27cd2b00505c99b42d1e38726256c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146602
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28654}
diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc
index a022e56..3e0cf42 100644
--- a/pc/webrtc_sdp.cc
+++ b/pc/webrtc_sdp.cc
@@ -185,6 +185,8 @@
static const char kAttributeXGoogleFlag[] = "x-google-flag";
static const char kValueConference[] = "conference";
+static const char kAttributeRtcpRemoteEstimate[] = "remote-net-estimate";
+
// Candidate
static const char kCandidateHost[] = "host";
static const char kCandidateSrflx[] = "srflx";
@@ -1666,6 +1668,11 @@
AddLine(os.str(), message);
}
+ if (media_desc->remote_estimate()) {
+ InitAttrLine(kAttributeRtcpRemoteEstimate, &os);
+ AddLine(os.str(), message);
+ }
+
// RFC 4568
// a=crypto:<tag> <crypto-suite> <key-params> [<session-params>]
for (const CryptoParams& crypto_params : media_desc->cryptos()) {
@@ -3238,6 +3245,8 @@
media_desc->set_rtcp_mux(true);
} else if (HasAttribute(line, kAttributeRtcpReducedSize)) {
media_desc->set_rtcp_reduced_size(true);
+ } else if (HasAttribute(line, kAttributeRtcpRemoteEstimate)) {
+ media_desc->set_remote_estimate(true);
} else if (HasAttribute(line, kAttributeSsrcGroup)) {
if (!ParseSsrcGroupAttribute(line, &ssrc_groups, error)) {
return false;