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

Unified Diff: webrtc/api/mediaconstraintsinterface.cc

Issue 1818033002: Embed a cricket::MediaConfig in RTCConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased. Created 4 years, 8 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 | « no previous file | webrtc/api/mediaconstraintsinterface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/mediaconstraintsinterface.cc
diff --git a/webrtc/api/mediaconstraintsinterface.cc b/webrtc/api/mediaconstraintsinterface.cc
index af258917e7acd6f6ce942706f0607caf0f5e5d42..a5678701867681f5039f7c0a0280eb3f98e20b18 100644
--- a/webrtc/api/mediaconstraintsinterface.cc
+++ b/webrtc/api/mediaconstraintsinterface.cc
@@ -179,29 +179,23 @@ void CopyConstraintsIntoRtcConfiguration(
return;
}
- bool value;
+ bool enable_ipv6;
if (FindConstraint(constraints, MediaConstraintsInterface::kEnableIPv6,
- &value, nullptr)) {
- if (!value) {
- configuration->disable_ipv6 = true;
- }
- }
- ConstraintToOptionalBool(constraints, MediaConstraintsInterface::kEnableDscp,
- &configuration->enable_dscp);
- ConstraintToOptionalBool(constraints,
- MediaConstraintsInterface::kCpuOveruseDetection,
- &configuration->cpu_overuse_detection);
- if (FindConstraint(constraints,
- MediaConstraintsInterface::kEnableRtpDataChannels, &value,
- NULL) &&
- value) {
- configuration->enable_rtp_data_channel = true;
+ &enable_ipv6, nullptr)) {
+ configuration->disable_ipv6 = !enable_ipv6;
}
+ FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp,
+ &configuration->media_config.enable_dscp, nullptr);
+ FindConstraint(
+ constraints, MediaConstraintsInterface::kCpuOveruseDetection,
+ &configuration->media_config.video.enable_cpu_overuse_detection, nullptr);
+ FindConstraint(constraints, MediaConstraintsInterface::kEnableRtpDataChannels,
+ &configuration->enable_rtp_data_channel, nullptr);
// Find Suspend Below Min Bitrate constraint.
- ConstraintToOptionalBool(
- constraints,
- MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate,
- &configuration->suspend_below_min_bitrate);
+ FindConstraint(constraints,
+ MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate,
+ &configuration->media_config.video.suspend_below_min_bitrate,
+ nullptr);
ConstraintToOptionalInt(constraints,
MediaConstraintsInterface::kScreencastMinBitrate,
&configuration->screencast_min_bitrate);
« no previous file with comments | « no previous file | webrtc/api/mediaconstraintsinterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698