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

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: Created 4 years, 9 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
Index: webrtc/api/mediaconstraintsinterface.cc
diff --git a/webrtc/api/mediaconstraintsinterface.cc b/webrtc/api/mediaconstraintsinterface.cc
index af258917e7acd6f6ce942706f0607caf0f5e5d42..f3a0e2844d2377a6ffb6f18adac2287138037f47 100644
--- a/webrtc/api/mediaconstraintsinterface.cc
+++ b/webrtc/api/mediaconstraintsinterface.cc
@@ -186,22 +186,25 @@ void CopyConstraintsIntoRtcConfiguration(
configuration->disable_ipv6 = true;
}
}
- ConstraintToOptionalBool(constraints, MediaConstraintsInterface::kEnableDscp,
- &configuration->enable_dscp);
- ConstraintToOptionalBool(constraints,
- MediaConstraintsInterface::kCpuOveruseDetection,
- &configuration->cpu_overuse_detection);
+ FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp,
+ &configuration->media_config.enable_dscp, nullptr);
+ FindConstraint(
+ constraints, MediaConstraintsInterface::kCpuOveruseDetection,
+ &configuration->media_config.video.enable_cpu_overuse_detection,
+ nullptr);
+ // TODO(nisse): By this logic, it is impossible to disable the flag
+ // using a constraint. Is that intentional?
hta-webrtc 2016/03/21 14:38:21 I suggest you just change this. It was strange las
nisse-webrtc 2016/03/22 08:33:20 Done. I'm also renaming value --> enable_ipv6, sin
if (FindConstraint(constraints,
MediaConstraintsInterface::kEnableRtpDataChannels, &value,
- NULL) &&
+ nullptr) &&
value) {
configuration->enable_rtp_data_channel = true;
}
// 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') | webrtc/api/mediaconstraintsinterface_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698