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

Unified Diff: webrtc/api/peerconnection.cc

Issue 1670153003: Introduce struct MediaConfig, with construction-time settings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed test nit; use reference. Created 4 years, 10 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/mediacontroller.cc ('k') | webrtc/api/peerconnectionfactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 70800880fb7bd599d1f954faae5f043159b502a9..eacbeaedc3c8bd2262169362276572d95772ce73 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -616,7 +616,20 @@ bool PeerConnection::Initialize(
// No step delay is used while allocating ports.
port_allocator_->set_step_delay(cricket::kMinimumStepDelay);
- media_controller_.reset(factory_->CreateMediaController());
+ // We rely on default values when constraints aren't found.
+ cricket::MediaConfig media_config;
+
+ media_config.disable_prerenderer_smoothing =
+ configuration.disable_prerenderer_smoothing;
+
+ // Find DSCP constraint.
+ FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp,
+ &media_config.enable_dscp, NULL);
+ // Find constraints for cpu overuse detection.
+ FindConstraint(constraints, MediaConstraintsInterface::kCpuOveruseDetection,
+ &media_config.enable_cpu_overuse_detection, NULL);
+
+ media_controller_.reset(factory_->CreateMediaController(media_config));
remote_stream_factory_.reset(new RemoteMediaStreamFactory(
factory_->signaling_thread(), media_controller_->channel_manager()));
« no previous file with comments | « webrtc/api/mediacontroller.cc ('k') | webrtc/api/peerconnectionfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698