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); |