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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2295493002: Add a switch to redetermine role when ICE restarts. (Closed)
Patch Set: Add NativeConfiguration method in RTCConfiguration Created 4 years, 3 months 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
« no previous file with comments | « webrtc/api/peerconnectionfactory.cc ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // organization of the implementation, which isn't stable. So we 233 // organization of the implementation, which isn't stable. So we
234 // need getters and setters at least for fields which applications 234 // need getters and setters at least for fields which applications
235 // are interested in. 235 // are interested in.
236 struct RTCConfiguration { 236 struct RTCConfiguration {
237 // This struct is subject to reorganization, both for naming 237 // This struct is subject to reorganization, both for naming
238 // consistency, and to group settings to match where they are used 238 // consistency, and to group settings to match where they are used
239 // in the implementation. To do that, we need getter and setter 239 // in the implementation. To do that, we need getter and setter
240 // methods for all settings which are of interest to applications, 240 // methods for all settings which are of interest to applications,
241 // Chrome in particular. 241 // Chrome in particular.
242 242
243 static RTCConfiguration NativeConfiguration() {
pthatcher1 2016/08/30 20:25:36 Can we call this OptimalConfiguration()? And have
honghaiz3 2016/08/30 21:32:59 Done. Is it better to call it ExperiementalConfigu
244 RTCConfiguration config;
245 config.redetermine_role_on_ice_restart = false;
pthatcher1 2016/08/30 20:25:36 Can you also enable things like max_bundle, requir
honghaiz3 2016/08/30 21:32:59 Will do this in a separate CL as discussed.
246 return config;
247 }
248
243 bool dscp() { return media_config.enable_dscp; } 249 bool dscp() { return media_config.enable_dscp; }
244 void set_dscp(bool enable) { media_config.enable_dscp = enable; } 250 void set_dscp(bool enable) { media_config.enable_dscp = enable; }
245 251
246 // TODO(nisse): The corresponding flag in MediaConfig and 252 // TODO(nisse): The corresponding flag in MediaConfig and
247 // elsewhere should be renamed enable_cpu_adaptation. 253 // elsewhere should be renamed enable_cpu_adaptation.
248 bool cpu_adaptation() { 254 bool cpu_adaptation() {
249 return media_config.video.enable_cpu_overuse_detection; 255 return media_config.video.enable_cpu_overuse_detection;
250 } 256 }
251 void set_cpu_adaptation(bool enable) { 257 void set_cpu_adaptation(bool enable) {
252 media_config.video.enable_cpu_overuse_detection = enable; 258 media_config.video.enable_cpu_overuse_detection = enable;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 bool enable_rtp_data_channel = false; 304 bool enable_rtp_data_channel = false;
299 bool enable_quic = false; 305 bool enable_quic = false;
300 rtc::Optional<int> screencast_min_bitrate; 306 rtc::Optional<int> screencast_min_bitrate;
301 rtc::Optional<bool> combined_audio_video_bwe; 307 rtc::Optional<bool> combined_audio_video_bwe;
302 rtc::Optional<bool> enable_dtls_srtp; 308 rtc::Optional<bool> enable_dtls_srtp;
303 int ice_candidate_pool_size = 0; 309 int ice_candidate_pool_size = 0;
304 bool prune_turn_ports = false; 310 bool prune_turn_ports = false;
305 // If set to true, this means the ICE transport should presume TURN-to-TURN 311 // If set to true, this means the ICE transport should presume TURN-to-TURN
306 // candidate pairs will succeed, even before a binding response is received. 312 // candidate pairs will succeed, even before a binding response is received.
307 bool presume_writable_when_fully_relayed = false; 313 bool presume_writable_when_fully_relayed = false;
314 // If true, ICE role is redetermined when peerconnection sets a local
315 // transport description that indicates an ICE restart.
316 bool redetermine_role_on_ice_restart = true;
308 }; 317 };
309 318
310 struct RTCOfferAnswerOptions { 319 struct RTCOfferAnswerOptions {
311 static const int kUndefined = -1; 320 static const int kUndefined = -1;
312 static const int kMaxOfferToReceiveMedia = 1; 321 static const int kMaxOfferToReceiveMedia = 1;
313 322
314 // The default value for constraint offerToReceiveX:true. 323 // The default value for constraint offerToReceiveX:true.
315 static const int kOfferToReceiveMediaTrue = 1; 324 static const int kOfferToReceiveMediaTrue = 1;
316 325
317 int offer_to_receive_video; 326 int offer_to_receive_video;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 cricket::WebRtcVideoEncoderFactory* encoder_factory, 748 cricket::WebRtcVideoEncoderFactory* encoder_factory,
740 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 749 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
741 return CreatePeerConnectionFactory( 750 return CreatePeerConnectionFactory(
742 worker_and_network_thread, worker_and_network_thread, signaling_thread, 751 worker_and_network_thread, worker_and_network_thread, signaling_thread,
743 default_adm, encoder_factory, decoder_factory); 752 default_adm, encoder_factory, decoder_factory);
744 } 753 }
745 754
746 } // namespace webrtc 755 } // namespace webrtc
747 756
748 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 757 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectionfactory.cc ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698