Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1225)

Unified Diff: content/renderer/media/webrtc_audio_device_impl.cc

Issue 8491044: Link things together and enable the device selection for linux and mac. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: enable the device selection for linux and mac Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_audio_device_impl.cc
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index 240ea8974dc811378b494939b588ac78fb4823b8..3b589a8a023228a3cab882f6fd7c9e9a3c61d3db 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/string_util.h"
+#include "content/browser/renderer_host/media/audio_input_device_manager.h"
#include "content/common/view_messages.h"
#include "content/renderer/render_thread_impl.h"
#include "media/audio/audio_util.h"
@@ -173,11 +174,11 @@ void WebRtcAudioDeviceImpl::Capture(
}
}
-void WebRtcAudioDeviceImpl::OnDeviceStarted(int device_index) {
- VLOG(1) << "OnDeviceStarted (device_index=" << device_index << ")";
+void WebRtcAudioDeviceImpl::OnDeviceStarted(const std::string& device_uid) {
+ VLOG(1) << "OnDeviceStarted (device_uid=" << device_uid << ")";
// -1 is an invalid device index. Do nothing if a valid device has
// been started. Otherwise update the |recording_| state to false.
- if (device_index != -1)
+ if (device_uid != media_stream::AudioInputDeviceManager::kInvalidDeviceUId)
return;
base::AutoLock auto_lock(lock_);
@@ -371,7 +372,7 @@ int32_t WebRtcAudioDeviceImpl::Init() {
DLOG(ERROR) << "Only 48kHz sample rate is supported on Linux.";
return -1;
}
- input_channels = 1;
+ input_channels = 2;
output_channels = 1;
// Based on tests using the current ALSA implementation in Chrome, we have

Powered by Google App Engine
This is Rietveld 408576698