| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/media/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // This is normal video device capture. | 120 // This is normal video device capture. |
| 121 *video_type = MEDIA_DEVICE_VIDEO_CAPTURE; | 121 *video_type = MEDIA_DEVICE_VIDEO_CAPTURE; |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 // Turns off available audio effects (removes the flag) if the options | 126 // Turns off available audio effects (removes the flag) if the options |
| 127 // explicitly turn them off. | 127 // explicitly turn them off. |
| 128 void FilterAudioEffects(const StreamOptions& options, int* effects) { | 128 void FilterAudioEffects(const StreamOptions& options, int* effects) { |
| 129 DCHECK(effects); | 129 DCHECK(effects); |
| 130 // TODO(ajm): Should we also handle ECHO_CANCELLER here? | 130 // TODO(ajm): Should we handle ECHO_CANCELLER here? |
| 131 std::string value; | |
| 132 if (options.GetFirstAudioConstraintByName( | |
| 133 kMediaStreamAudioDucking, &value, NULL) && value == "false") { | |
| 134 *effects &= ~media::AudioParameters::DUCKING; | |
| 135 } | |
| 136 } | 131 } |
| 137 | 132 |
| 138 // Unlike other effects, hotword is off by default, so turn it on if it's | 133 // Unlike other effects, hotword is off by default, so turn it on if it's |
| 139 // requested and available. | 134 // requested and available. |
| 140 void EnableHotwordEffect(const StreamOptions& options, int* effects) { | 135 void EnableHotwordEffect(const StreamOptions& options, int* effects) { |
| 141 DCHECK(effects); | 136 DCHECK(effects); |
| 142 std::string value; | 137 std::string value; |
| 143 if (options.GetFirstAudioConstraintByName( | 138 if (options.GetFirstAudioConstraintByName( |
| 144 kMediaStreamAudioHotword, &value, NULL) && value == "true") { | 139 kMediaStreamAudioHotword, &value, NULL) && value == "true") { |
| 145 #if defined(OS_CHROMEOS) | 140 #if defined(OS_CHROMEOS) |
| (...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2196 } | 2191 } |
| 2197 } | 2192 } |
| 2198 | 2193 |
| 2199 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { | 2194 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { |
| 2200 DCHECK(device_task_runner_->BelongsToCurrentThread()); | 2195 DCHECK(device_task_runner_->BelongsToCurrentThread()); |
| 2201 audio_manager_->SetHasKeyboardMic(); | 2196 audio_manager_->SetHasKeyboardMic(); |
| 2202 } | 2197 } |
| 2203 #endif | 2198 #endif |
| 2204 | 2199 |
| 2205 } // namespace content | 2200 } // namespace content |
| OLD | NEW |