Chromium Code Reviews

Side by Side 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.
Jump to:
View unified diff |
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 168 matching lines...)
179 return; 179 return;
180 } 180 }
181 181
182 bool value; 182 bool value;
183 if (FindConstraint(constraints, MediaConstraintsInterface::kEnableIPv6, 183 if (FindConstraint(constraints, MediaConstraintsInterface::kEnableIPv6,
184 &value, nullptr)) { 184 &value, nullptr)) {
185 if (!value) { 185 if (!value) {
186 configuration->disable_ipv6 = true; 186 configuration->disable_ipv6 = true;
187 } 187 }
188 } 188 }
189 ConstraintToOptionalBool(constraints, MediaConstraintsInterface::kEnableDscp, 189 FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp,
190 &configuration->enable_dscp); 190 &configuration->media_config.enable_dscp, nullptr);
191 ConstraintToOptionalBool(constraints, 191 FindConstraint(
192 MediaConstraintsInterface::kCpuOveruseDetection, 192 constraints, MediaConstraintsInterface::kCpuOveruseDetection,
193 &configuration->cpu_overuse_detection); 193 &configuration->media_config.video.enable_cpu_overuse_detection,
194 nullptr);
195 // TODO(nisse): By this logic, it is impossible to disable the flag
196 // 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
194 if (FindConstraint(constraints, 197 if (FindConstraint(constraints,
195 MediaConstraintsInterface::kEnableRtpDataChannels, &value, 198 MediaConstraintsInterface::kEnableRtpDataChannels, &value,
196 NULL) && 199 nullptr) &&
197 value) { 200 value) {
198 configuration->enable_rtp_data_channel = true; 201 configuration->enable_rtp_data_channel = true;
199 } 202 }
200 // Find Suspend Below Min Bitrate constraint. 203 // Find Suspend Below Min Bitrate constraint.
201 ConstraintToOptionalBool( 204 FindConstraint(constraints,
202 constraints, 205 MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate,
203 MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate, 206 &configuration->media_config.video.suspend_below_min_bitrate,
204 &configuration->suspend_below_min_bitrate); 207 nullptr);
205 ConstraintToOptionalInt(constraints, 208 ConstraintToOptionalInt(constraints,
206 MediaConstraintsInterface::kScreencastMinBitrate, 209 MediaConstraintsInterface::kScreencastMinBitrate,
207 &configuration->screencast_min_bitrate); 210 &configuration->screencast_min_bitrate);
208 ConstraintToOptionalBool(constraints, 211 ConstraintToOptionalBool(constraints,
209 MediaConstraintsInterface::kCombinedAudioVideoBwe, 212 MediaConstraintsInterface::kCombinedAudioVideoBwe,
210 &configuration->combined_audio_video_bwe); 213 &configuration->combined_audio_video_bwe);
211 ConstraintToOptionalBool(constraints, 214 ConstraintToOptionalBool(constraints,
212 MediaConstraintsInterface::kEnableDtlsSrtp, 215 MediaConstraintsInterface::kEnableDtlsSrtp,
213 &configuration->enable_dtls_srtp); 216 &configuration->enable_dtls_srtp);
214 } 217 }
215 218
216 } // namespace webrtc 219 } // namespace webrtc
OLDNEW
« 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