OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 {MediaConstraintsInterface::kAutoGainControl, options->auto_gain_control}, | 43 {MediaConstraintsInterface::kAutoGainControl, options->auto_gain_control}, |
44 {MediaConstraintsInterface::kExperimentalAutoGainControl, | 44 {MediaConstraintsInterface::kExperimentalAutoGainControl, |
45 options->experimental_agc}, | 45 options->experimental_agc}, |
46 {MediaConstraintsInterface::kNoiseSuppression, | 46 {MediaConstraintsInterface::kNoiseSuppression, |
47 options->noise_suppression}, | 47 options->noise_suppression}, |
48 {MediaConstraintsInterface::kExperimentalNoiseSuppression, | 48 {MediaConstraintsInterface::kExperimentalNoiseSuppression, |
49 options->experimental_ns}, | 49 options->experimental_ns}, |
50 {MediaConstraintsInterface::kHighpassFilter, options->highpass_filter}, | 50 {MediaConstraintsInterface::kHighpassFilter, options->highpass_filter}, |
51 {MediaConstraintsInterface::kTypingNoiseDetection, | 51 {MediaConstraintsInterface::kTypingNoiseDetection, |
52 options->typing_detection}, | 52 options->typing_detection}, |
53 {MediaConstraintsInterface::kAudioMirroring, options->stereo_swapping}, | 53 {MediaConstraintsInterface::kAudioMirroring, options->stereo_swapping} |
54 {MediaConstraintsInterface::kAecDump, options->aec_dump} | |
55 }; | 54 }; |
56 | 55 |
57 for (const auto& constraint : constraints) { | 56 for (const auto& constraint : constraints) { |
58 bool value = false; | 57 bool value = false; |
59 if (!rtc::FromString(constraint.value, &value)) | 58 if (!rtc::FromString(constraint.value, &value)) |
60 continue; | 59 continue; |
61 | 60 |
62 for (auto& entry : key_to_value) { | 61 for (auto& entry : key_to_value) { |
63 if (constraint.key.compare(entry.name) == 0) | 62 if (constraint.key.compare(entry.name) == 0) |
64 entry.value = rtc::Optional<bool>(value); | 63 entry.value = rtc::Optional<bool>(value); |
(...skipping 22 matching lines...) Expand all Loading... |
87 // constraints. | 86 // constraints. |
88 FromConstraints(constraints->GetOptional(), &options_); | 87 FromConstraints(constraints->GetOptional(), &options_); |
89 | 88 |
90 cricket::AudioOptions mandatory_options; | 89 cricket::AudioOptions mandatory_options; |
91 FromConstraints(constraints->GetMandatory(), &mandatory_options); | 90 FromConstraints(constraints->GetMandatory(), &mandatory_options); |
92 options_.SetAll(mandatory_options); | 91 options_.SetAll(mandatory_options); |
93 source_state_ = kLive; | 92 source_state_ = kLive; |
94 } | 93 } |
95 | 94 |
96 } // namespace webrtc | 95 } // namespace webrtc |
OLD | NEW |