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

Side by Side Diff: media/blink/webaudiosourceprovider_impl.cc

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « media/blink/webaudiosourceprovider_impl.h ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/blink/webaudiosourceprovider_impl.h" 5 #include "media/blink/webaudiosourceprovider_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 sink_->SetVolume(volume); 251 sink_->SetVolume(volume);
252 return true; 252 return true;
253 } 253 }
254 254
255 OutputDeviceInfo WebAudioSourceProviderImpl::GetOutputDeviceInfo() { 255 OutputDeviceInfo WebAudioSourceProviderImpl::GetOutputDeviceInfo() {
256 base::AutoLock auto_lock(sink_lock_); 256 base::AutoLock auto_lock(sink_lock_);
257 return sink_ ? sink_->GetOutputDeviceInfo() 257 return sink_ ? sink_->GetOutputDeviceInfo()
258 : OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND); 258 : OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND);
259 } 259 }
260 260
261 bool WebAudioSourceProviderImpl::IsOptimizedForHardwareParameters() {
262 base::AutoLock auto_lock(sink_lock_);
263 return client_ ? false : true;
264 }
265
261 bool WebAudioSourceProviderImpl::CurrentThreadIsRenderingThread() { 266 bool WebAudioSourceProviderImpl::CurrentThreadIsRenderingThread() {
262 NOTIMPLEMENTED(); 267 NOTIMPLEMENTED();
263 return false; 268 return false;
264 } 269 }
265 270
266 void WebAudioSourceProviderImpl::SwitchOutputDevice( 271 void WebAudioSourceProviderImpl::SwitchOutputDevice(
267 const std::string& device_id, 272 const std::string& device_id,
268 const url::Origin& security_origin, 273 const url::Origin& security_origin,
269 const OutputDeviceStatusCB& callback) { 274 const OutputDeviceStatusCB& callback) {
270 base::AutoLock auto_lock(sink_lock_); 275 base::AutoLock auto_lock(sink_lock_);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 337
333 return num_rendered_frames; 338 return num_rendered_frames;
334 } 339 }
335 340
336 void WebAudioSourceProviderImpl::TeeFilter::OnRenderError() { 341 void WebAudioSourceProviderImpl::TeeFilter::OnRenderError() {
337 DCHECK(IsInitialized()); 342 DCHECK(IsInitialized());
338 renderer_->OnRenderError(); 343 renderer_->OnRenderError();
339 } 344 }
340 345
341 } // namespace media 346 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webaudiosourceprovider_impl.h ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698