| 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/audio_input_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 audio_params, | 452 audio_params, |
| 453 device_id, | 453 device_id, |
| 454 entry->writer.get(), | 454 entry->writer.get(), |
| 455 user_input_monitor_, | 455 user_input_monitor_, |
| 456 config.automatic_gain_control); | 456 config.automatic_gain_control); |
| 457 oss << ", AGC=" << config.automatic_gain_control; | 457 oss << ", AGC=" << config.automatic_gain_control; |
| 458 | 458 |
| 459 // Only count for captures from desktop media picker dialog and system loop | 459 // Only count for captures from desktop media picker dialog and system loop |
| 460 // back audio. | 460 // back audio. |
| 461 if (entry->controller.get() && type == MEDIA_DESKTOP_AUDIO_CAPTURE && | 461 if (entry->controller.get() && type == MEDIA_DESKTOP_AUDIO_CAPTURE && |
| 462 device_id == media::AudioDeviceDescription::kLoopbackInputDeviceId) { | 462 (device_id == media::AudioDeviceDescription::kLoopbackInputDeviceId || |
| 463 device_id == |
| 464 media::AudioDeviceDescription::kLoopbackWithMuteDeviceId)) { |
| 463 IncrementDesktopCaptureCounter(SYSTEM_LOOPBACK_AUDIO_CAPTURER_CREATED); | 465 IncrementDesktopCaptureCounter(SYSTEM_LOOPBACK_AUDIO_CAPTURER_CREATED); |
| 464 } | 466 } |
| 465 } | 467 } |
| 466 | 468 |
| 467 if (!entry->controller.get()) { | 469 if (!entry->controller.get()) { |
| 468 SendErrorMessage(stream_id, STREAM_CREATE_ERROR); | 470 SendErrorMessage(stream_id, STREAM_CREATE_ERROR); |
| 469 MaybeUnregisterKeyboardMicStream(config); | 471 MaybeUnregisterKeyboardMicStream(config); |
| 470 return; | 472 return; |
| 471 } | 473 } |
| 472 | 474 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 if (entry->input_debug_writer.get()) { | 722 if (entry->input_debug_writer.get()) { |
| 721 BrowserThread::PostTask( | 723 BrowserThread::PostTask( |
| 722 BrowserThread::FILE, FROM_HERE, | 724 BrowserThread::FILE, FROM_HERE, |
| 723 base::Bind(&DeleteInputDebugWriterOnFileThread, | 725 base::Bind(&DeleteInputDebugWriterOnFileThread, |
| 724 base::Passed(std::move(entry->input_debug_writer)))); | 726 base::Passed(std::move(entry->input_debug_writer)))); |
| 725 } | 727 } |
| 726 } | 728 } |
| 727 #endif // defined(ENABLE_WEBRTC) | 729 #endif // defined(ENABLE_WEBRTC) |
| 728 | 730 |
| 729 } // namespace content | 731 } // namespace content |
| OLD | NEW |