Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp

Issue 2055553003: Change the default rtcp mux policy from negotiate to require. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Monior Fix. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 WebRTCBundlePolicy bundlePolicy = WebRTCBundlePolicy::kBalanced; 254 WebRTCBundlePolicy bundlePolicy = WebRTCBundlePolicy::kBalanced;
255 String bundlePolicyString = configuration.bundlePolicy(); 255 String bundlePolicyString = configuration.bundlePolicy();
256 if (bundlePolicyString == "max-compat") { 256 if (bundlePolicyString == "max-compat") {
257 bundlePolicy = WebRTCBundlePolicy::kMaxCompat; 257 bundlePolicy = WebRTCBundlePolicy::kMaxCompat;
258 } else if (bundlePolicyString == "max-bundle") { 258 } else if (bundlePolicyString == "max-bundle") {
259 bundlePolicy = WebRTCBundlePolicy::kMaxBundle; 259 bundlePolicy = WebRTCBundlePolicy::kMaxBundle;
260 } else { 260 } else {
261 DCHECK_EQ(bundlePolicyString, "balanced"); 261 DCHECK_EQ(bundlePolicyString, "balanced");
262 } 262 }
263 263
264 // For the histogram value of "WebRTC.PeerConnection.SelectedRtcpMuxPolicy". 264 // For the histogram value of "WebRTC.PeerConnection.SelectedRtcpMuxPolicy".
foolip 2016/11/29 10:24:42 This histogram exists only to gauge the risk of th
zhihuang1 2016/11/29 22:47:24 Done.
265 *selectedRtcpMuxPolicy = RtcpMuxPolicyDefault; 265 *selectedRtcpMuxPolicy = RtcpMuxPolicyDefault;
266 WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate; 266 WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kRequire;
267 if (configuration.hasRtcpMuxPolicy()) { 267 if (configuration.hasRtcpMuxPolicy()) {
268 String rtcpMuxPolicyString = configuration.rtcpMuxPolicy(); 268 String rtcpMuxPolicyString = configuration.rtcpMuxPolicy();
269 if (rtcpMuxPolicyString == "require") { 269 if (rtcpMuxPolicyString == "require") {
270 *selectedRtcpMuxPolicy = RtcpMuxPolicyRequire; 270 *selectedRtcpMuxPolicy = RtcpMuxPolicyRequire;
271 rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kRequire;
272 } else { 271 } else {
273 DCHECK_EQ(rtcpMuxPolicyString, "negotiate"); 272 DCHECK_EQ(rtcpMuxPolicyString, "negotiate");
273 rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate;
274 *selectedRtcpMuxPolicy = RtcpMuxPolicyNegotiate; 274 *selectedRtcpMuxPolicy = RtcpMuxPolicyNegotiate;
275 } 275 }
276 } 276 }
277 277
278 WebRTCConfiguration webConfiguration; 278 WebRTCConfiguration webConfiguration;
279 webConfiguration.iceTransportPolicy = iceTransportPolicy; 279 webConfiguration.iceTransportPolicy = iceTransportPolicy;
280 webConfiguration.bundlePolicy = bundlePolicy; 280 webConfiguration.bundlePolicy = bundlePolicy;
281 webConfiguration.rtcpMuxPolicy = rtcpMuxPolicy; 281 webConfiguration.rtcpMuxPolicy = rtcpMuxPolicy;
282 282
283 if (configuration.hasIceServers()) { 283 if (configuration.hasIceServers()) {
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 DEFINE_TRACE(RTCPeerConnection) { 1481 DEFINE_TRACE(RTCPeerConnection) {
1482 visitor->trace(m_localStreams); 1482 visitor->trace(m_localStreams);
1483 visitor->trace(m_remoteStreams); 1483 visitor->trace(m_remoteStreams);
1484 visitor->trace(m_dispatchScheduledEventRunner); 1484 visitor->trace(m_dispatchScheduledEventRunner);
1485 visitor->trace(m_scheduledEvents); 1485 visitor->trace(m_scheduledEvents);
1486 EventTargetWithInlineData::trace(visitor); 1486 EventTargetWithInlineData::trace(visitor);
1487 ActiveDOMObject::trace(visitor); 1487 ActiveDOMObject::trace(visitor);
1488 } 1488 }
1489 1489
1490 } // namespace blink 1490 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698