| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // a different algorithm will be required. | 51 // a different algorithm will be required. |
| 52 for (iter = constraints.begin(); iter != constraints.end(); ++iter) { | 52 for (iter = constraints.begin(); iter != constraints.end(); ++iter) { |
| 53 bool value = false; | 53 bool value = false; |
| 54 | 54 |
| 55 if (!rtc::FromString(iter->value, &value)) | 55 if (!rtc::FromString(iter->value, &value)) |
| 56 continue; | 56 continue; |
| 57 | 57 |
| 58 if (iter->key == MediaConstraintsInterface::kEchoCancellation) | 58 if (iter->key == MediaConstraintsInterface::kEchoCancellation) |
| 59 options->echo_cancellation.Set(value); | 59 options->echo_cancellation.Set(value); |
| 60 else if (iter->key == | 60 else if (iter->key == |
| 61 MediaConstraintsInterface::kExtendedFilterEchoCancellation) | 61 MediaConstraintsInterface::kExperimentalEchoCancellation) |
| 62 options->extended_filter_aec.Set(value); | 62 options->experimental_aec.Set(value); |
| 63 else if (iter->key == MediaConstraintsInterface::kDAEchoCancellation) | 63 else if (iter->key == MediaConstraintsInterface::kDAEchoCancellation) |
| 64 options->delay_agnostic_aec.Set(value); | 64 options->delay_agnostic_aec.Set(value); |
| 65 else if (iter->key == MediaConstraintsInterface::kAutoGainControl) | 65 else if (iter->key == MediaConstraintsInterface::kAutoGainControl) |
| 66 options->auto_gain_control.Set(value); | 66 options->auto_gain_control.Set(value); |
| 67 else if (iter->key == | 67 else if (iter->key == |
| 68 MediaConstraintsInterface::kExperimentalAutoGainControl) | 68 MediaConstraintsInterface::kExperimentalAutoGainControl) |
| 69 options->experimental_agc.Set(value); | 69 options->experimental_agc.Set(value); |
| 70 else if (iter->key == MediaConstraintsInterface::kNoiseSuppression) | 70 else if (iter->key == MediaConstraintsInterface::kNoiseSuppression) |
| 71 options->noise_suppression.Set(value); | 71 options->noise_suppression.Set(value); |
| 72 else if (iter->key == | 72 else if (iter->key == |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // constraints. | 104 // constraints. |
| 105 FromConstraints(constraints->GetOptional(), &options_); | 105 FromConstraints(constraints->GetOptional(), &options_); |
| 106 | 106 |
| 107 cricket::AudioOptions mandatory_options; | 107 cricket::AudioOptions mandatory_options; |
| 108 FromConstraints(constraints->GetMandatory(), &mandatory_options); | 108 FromConstraints(constraints->GetMandatory(), &mandatory_options); |
| 109 options_.SetAll(mandatory_options); | 109 options_.SetAll(mandatory_options); |
| 110 source_state_ = kLive; | 110 source_state_ = kLive; |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace webrtc | 113 } // namespace webrtc |
| OLD | NEW |