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

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 2297663004: Use AggressiveConfiguration as the default configuration in IOS (Closed)
Patch Set: Fix a comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/android/jni/peerconnection_jni.cc ('k') | webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 624c67f9cba562bbc111fb79fe80ca2d6eafe31c..bcb6170c1226ee57f4b26d8855a25ac5dbbd2d5e 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -227,6 +227,15 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
GATHER_CONTINUALLY
};
+ enum class RTCConfigurationType {
+ // A configuration that is safer to use, despite not having the best
+ // performance. Currently this is the default configuration.
+ kSafe,
+ // An aggressive configuration that has better performance, although it
+ // may be riskier and may need extra support in the application.
+ kAggressive
+ };
+
// TODO(hbos): Change into class with private data and public getters.
// TODO(nisse): In particular, accessing fields directly from an
// application is brittle, since the organization mirrors the
@@ -240,16 +249,11 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
// methods for all settings which are of interest to applications,
// Chrome in particular.
- // A configuration that is safer to use, despite it may not have the best
- // performance.
- static RTCConfiguration SafeConfiguration() { return RTCConfiguration(); }
-
- // An aggressive configuration that has better performance, although it
- // may be riskier and may need extra support in the application.
- static RTCConfiguration AggressiveConfiguration() {
- RTCConfiguration config;
- config.redetermine_role_on_ice_restart = false;
- return config;
+ RTCConfiguration() = default;
+ RTCConfiguration(RTCConfigurationType type) {
+ if (type == RTCConfigurationType::kAggressive) {
+ redetermine_role_on_ice_restart = false;
+ }
}
bool dscp() { return media_config.enable_dscp; }
« no previous file with comments | « webrtc/api/android/jni/peerconnection_jni.cc ('k') | webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698