From 35c5cc8a6f5f256d28629205e397c46a2122dc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Thu, 14 Apr 2022 09:23:20 +0200 Subject: [PATCH] Enable DSCP by default. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DSCP is controlled by the spec-compliant API RTCRtpEncodingParameters.networkPriority[1]. It already has a default value that is the same as when DSCP is disabled. - If you want non-default DSCP default values, you need to set networkPriority and shouldn't need to set a non-standard googDscp flag for it to have an effect. - If you want the default DSCP value, you wouldn't change networkPriority and so you don't care if enable_dscp is true... you'll get the default regardless. Drive-by: This CL also adds crbug references to other goog flags. [1] https://w3c.github.io/webrtc-priority/#dom-rtcrtpencodingparameters-networkpriority Bug: chromium:1315574 Change-Id: I15a0470fa04f55e2534cee0d240eeb03446c2de6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258940 Reviewed-by: Harald Alvestrand Commit-Queue: Henrik Boström Cr-Commit-Position: refs/heads/main@{#36550} --- api/peer_connection_interface.h | 4 ++-- media/base/media_channel.h | 2 ++ media/base/media_config.h | 8 +++++++- pc/peer_connection_interface_unittest.cc | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h index a9026d984e..5f1f09937e 100644 --- a/api/peer_connection_interface.h +++ b/api/peer_connection_interface.h @@ -428,8 +428,8 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface { ////////////////////////////////////////////////////////////////////////// // If set to true, don't gather IPv6 ICE candidates. - // TODO(deadbeef): Remove this? IPv6 support has long stopped being - // experimental + // TODO(https://crbug.com/1315576): Remove the ability to set it in Chromium + // and delete this flag. bool disable_ipv6 = false; // If set to true, don't gather IPv6 ICE candidates on Wi-Fi. diff --git a/media/base/media_channel.h b/media/base/media_channel.h index 7da3fbe310..a3ab18ab9b 100644 --- a/media/base/media_channel.h +++ b/media/base/media_channel.h @@ -137,6 +137,8 @@ struct VideoOptions { // Force screencast to use a minimum bitrate. This flag comes from // the PeerConnection constraint 'googScreencastMinBitrate'. It is // copied to the encoder config by WebRtcVideoChannel. + // TODO(https://crbug.com/1315155): Remove the ability to set it in Chromium + // and delete this flag (it should default to 100 kbps). absl::optional screencast_min_bitrate_kbps; // Set by screencast sources. Implies selection of encoding settings // suitable for screencast. Most likely not the right way to do diff --git a/media/base/media_config.h b/media/base/media_config.h index be314a8aa3..b383c9aa3d 100644 --- a/media/base/media_config.h +++ b/media/base/media_config.h @@ -18,12 +18,16 @@ namespace cricket { struct MediaConfig { // Set DSCP value on packets. This flag comes from the // PeerConnection constraint 'googDscp'. - bool enable_dscp = false; + // TODO(https://crbug.com/1315574): Remove the ability to set it in Chromium + // and delete this flag. + bool enable_dscp = true; // Video-specific config. struct Video { // Enable WebRTC CPU Overuse Detection. This flag comes from the // PeerConnection constraint 'googCpuOveruseDetection'. + // TODO(https://crbug.com/1315569): Remove the ability to set it in Chromium + // and delete this flag. bool enable_cpu_adaptation = true; // Enable WebRTC suspension of video. No video frames will be sent @@ -31,6 +35,8 @@ struct MediaConfig { // flag comes from the PeerConnection constraint // 'googSuspendBelowMinBitrate', and WebRtcVideoChannel copies it // to VideoSendStream::Config::suspend_below_min_bitrate. + // TODO(https://crbug.com/1315564): Remove the ability to set it in Chromium + // and delete this flag. bool suspend_below_min_bitrate = false; // Enable buffering and playout timing smoothing of decoded frames. diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc index 15e7da4cf1..245c0f4d1c 100644 --- a/pc/peer_connection_interface_unittest.cc +++ b/pc/peer_connection_interface_unittest.cc @@ -3692,7 +3692,7 @@ TEST_F(PeerConnectionMediaConfigTest, TestDefaults) { const cricket::MediaConfig& media_config = TestCreatePeerConnection(config); - EXPECT_FALSE(media_config.enable_dscp); + EXPECT_TRUE(media_config.enable_dscp); EXPECT_TRUE(media_config.video.enable_cpu_adaptation); EXPECT_TRUE(media_config.video.enable_prerenderer_smoothing); EXPECT_FALSE(media_config.video.suspend_below_min_bitrate);