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

Side by Side Diff: content/renderer/pepper/pepper_platform_audio_input.cc

Issue 509893002: Revert of Remove the last piece of deprecated synchronous IO code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/renderer/pepper/pepper_platform_audio_input.h" 5 #include "content/renderer/pepper/pepper_platform_audio_input.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (!GetMediaDeviceManager()) 165 if (!GetMediaDeviceManager())
166 return false; 166 return false;
167 167
168 ipc_ = RenderThreadImpl::current() 168 ipc_ = RenderThreadImpl::current()
169 ->audio_input_message_filter() 169 ->audio_input_message_filter()
170 ->CreateAudioInputIPC(render_frame->render_view()->GetRoutingID()); 170 ->CreateAudioInputIPC(render_frame->render_view()->GetRoutingID());
171 171
172 params_.Reset(media::AudioParameters::AUDIO_PCM_LINEAR, 172 params_.Reset(media::AudioParameters::AUDIO_PCM_LINEAR,
173 media::CHANNEL_LAYOUT_MONO, 173 media::CHANNEL_LAYOUT_MONO,
174 ppapi::kAudioInputChannels, 174 ppapi::kAudioInputChannels,
175 0,
175 sample_rate, 176 sample_rate,
176 ppapi::kBitsPerAudioInputSample, 177 ppapi::kBitsPerAudioInputSample,
177 frames_per_buffer); 178 frames_per_buffer);
178 179
179 // We need to open the device and obtain the label and session ID before 180 // We need to open the device and obtain the label and session ID before
180 // initializing. 181 // initializing.
181 pending_open_device_id_ = GetMediaDeviceManager()->OpenDevice( 182 pending_open_device_id_ = GetMediaDeviceManager()->OpenDevice(
182 PP_DEVICETYPE_DEV_AUDIOCAPTURE, 183 PP_DEVICETYPE_DEV_AUDIOCAPTURE,
183 device_id.empty() ? media::AudioManagerBase::kDefaultDeviceId : device_id, 184 device_id.empty() ? media::AudioManagerBase::kDefaultDeviceId : device_id,
184 document_url, 185 document_url,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() { 287 PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() {
287 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread()); 288 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread());
288 289
289 RenderFrameImpl* const render_frame = 290 RenderFrameImpl* const render_frame =
290 RenderFrameImpl::FromRoutingID(render_frame_id_); 291 RenderFrameImpl::FromRoutingID(render_frame_id_);
291 return render_frame ? 292 return render_frame ?
292 PepperMediaDeviceManager::GetForRenderFrame(render_frame) : NULL; 293 PepperMediaDeviceManager::GetForRenderFrame(render_frame) : NULL;
293 } 294 }
294 295
295 } // namespace content 296 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_local_audio_track_unittest.cc ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698