| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/strings/string_number_conversions.h" | 5 #include "base/strings/string_number_conversions.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "content/renderer/media/mock_media_constraint_factory.h" | 7 #include "content/renderer/media/mock_media_constraint_factory.h" |
| 8 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface
.h" | 8 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface
.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 void MockMediaConstraintFactory::AddOptional(const std::string& key, | 78 void MockMediaConstraintFactory::AddOptional(const std::string& key, |
| 79 bool value) { | 79 bool value) { |
| 80 const std::string string_value = value ? kValueTrue : kValueFalse; | 80 const std::string string_value = value ? kValueTrue : kValueFalse; |
| 81 AddOptional(key, string_value); | 81 AddOptional(key, string_value); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void MockMediaConstraintFactory::DisableDefaultAudioConstraints() { | 84 void MockMediaConstraintFactory::DisableDefaultAudioConstraints() { |
| 85 static const char* kDefaultAudioConstraints[] = { | 85 static const char* kDefaultAudioConstraints[] = { |
| 86 webrtc::MediaConstraintsInterface::kEchoCancellation, | 86 webrtc::MediaConstraintsInterface::kEchoCancellation, |
| 87 webrtc::MediaConstraintsInterface::kExperimentalEchoCancellation, | 87 webrtc::MediaConstraintsInterface::kExtendedFilterEchoCancellation, |
| 88 webrtc::MediaConstraintsInterface::kAutoGainControl, | 88 webrtc::MediaConstraintsInterface::kAutoGainControl, |
| 89 webrtc::MediaConstraintsInterface::kExperimentalAutoGainControl, | 89 webrtc::MediaConstraintsInterface::kExperimentalAutoGainControl, |
| 90 webrtc::MediaConstraintsInterface::kNoiseSuppression, | 90 webrtc::MediaConstraintsInterface::kNoiseSuppression, |
| 91 webrtc::MediaConstraintsInterface::kHighpassFilter, | 91 webrtc::MediaConstraintsInterface::kHighpassFilter, |
| 92 webrtc::MediaConstraintsInterface::kTypingNoiseDetection, | 92 webrtc::MediaConstraintsInterface::kTypingNoiseDetection, |
| 93 webrtc::MediaConstraintsInterface::kExperimentalNoiseSuppression | 93 webrtc::MediaConstraintsInterface::kExperimentalNoiseSuppression |
| 94 }; | 94 }; |
| 95 MockMediaConstraintFactory factory; | 95 MockMediaConstraintFactory factory; |
| 96 for (size_t i = 0; i < arraysize(kDefaultAudioConstraints); ++i) { | 96 for (size_t i = 0; i < arraysize(kDefaultAudioConstraints); ++i) { |
| 97 AddMandatory(kDefaultAudioConstraints[i], false); | 97 AddMandatory(kDefaultAudioConstraints[i], false); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace content | 101 } // namespace content |
| OLD | NEW |