Add field trial to enable negotiation of encrypted RTP header extensions

Bug: webrtc:358039777
Change-Id: I2c59f4c8a3ed16862077c7c3484c1b5b39864c81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364661
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
Cr-Commit-Position: refs/heads/main@{#43203}
This commit is contained in:
Emil Vardar 2024-10-04 12:13:15 +00:00 committed by WebRTC LUCI CQ
parent 32590ef877
commit 81d5ab8efb
2 changed files with 10 additions and 0 deletions

View File

@ -146,6 +146,9 @@ ACTIVE_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([
FieldTrial('WebRTC-RtcEventLogEncodeNetEqSetMinimumDelayKillSwitch',
42225058,
date(2024, 4, 1)),
FieldTrial('WebRTC-EncryptedRtpHeaderExtensions',
358039777,
date(2025, 10, 4)),
FieldTrial('WebRTC-SetReadyToSendFalseIfSendFail',
361124449,
date(2024, 12, 1)),

View File

@ -761,6 +761,11 @@ RTCError PeerConnection::Initialize(
configuration_ = configuration;
if (configuration_.crypto_options) {
configuration_.crypto_options->srtp.enable_encrypted_rtp_header_extensions =
trials().IsEnabled("WebRTC-EncryptedRtpHeaderExtensions");
}
legacy_stats_ = std::make_unique<LegacyStatsCollector>(this);
stats_collector_ = RTCStatsCollector::Create(this, env_);
@ -815,6 +820,8 @@ JsepTransportController* PeerConnection::InitializeTransportController_n(
config.crypto_options = configuration.crypto_options.has_value()
? *configuration.crypto_options
: options_.crypto_options;
config.crypto_options.srtp.enable_encrypted_rtp_header_extensions =
trials().IsEnabled("WebRTC-EncryptedRtpHeaderExtensions");
config.transport_observer = this;
config.rtcp_handler = InitializeRtcpCallback();
config.un_demuxable_packet_handler = InitializeUnDemuxablePacketHandler();