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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.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: rebase2 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/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 1652b2629590b81b7a3a72dfaa90f433d2fd87ca..6a3e1464de709ba1039f46476bc24b36d2aaa5f8 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -202,7 +202,8 @@ void AudioInputRendererHost::OnStartDevice(int stream_id, int session_id) {
}
void AudioInputRendererHost::OnCreateStream(
- int stream_id, const AudioParameters& params, bool low_latency) {
+ int stream_id, const AudioParameters& params, bool low_latency,
+ const std::string& device_id) {
VLOG(1) << "AudioInputRendererHost::OnCreateStream(stream_id="
<< stream_id << ")";
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -244,10 +245,11 @@ void AudioInputRendererHost::OnCreateStream(
// If we have successfully created the SyncWriter then assign it to the
// entry and construct an AudioInputController.
entry->writer.reset(writer.release());
- entry->controller =
- media::AudioInputController::CreateLowLatency(this,
- audio_params,
- entry->writer.get());
+ entry->controller = media::AudioInputController::CreateLowLatency(
+ this,
+ audio_params,
+ device_id,
+ entry->writer.get());
if (!entry->controller) {
SendErrorMessage(stream_id);
@@ -328,7 +330,8 @@ void AudioInputRendererHost::DeleteEntries() {
}
}
-void AudioInputRendererHost::OnDeviceStarted(int session_id, int index) {
+void AudioInputRendererHost::OnDeviceStarted(
+ int session_id, const std::string& device_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
SessionEntryMap::iterator it = session_entries_.find(session_id);
if (it == session_entries_.end()) {
@@ -337,8 +340,8 @@ void AudioInputRendererHost::OnDeviceStarted(int session_id, int index) {
return;
}
- // Notify the renderer that the device has been started.
- Send(new AudioInputMsg_NotifyDeviceStarted(it->second, index));
+ // Notify the renderer with the id of the opened device.
+ Send(new AudioInputMsg_NotifyDeviceStarted(it->second, device_id));
}
void AudioInputRendererHost::OnDeviceStopped(int session_id) {
« no previous file with comments | « content/browser/renderer_host/media/audio_input_renderer_host.h ('k') | content/common/media/audio_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698