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

Side by Side Diff: media/audio/audio_output_device.cc

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: Created 3 years, 8 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
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 "media/audio/audio_output_device.h" 5 #include "media/audio/audio_output_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return false; 138 return false;
139 139
140 if (!task_runner()->PostTask(FROM_HERE, 140 if (!task_runner()->PostTask(FROM_HERE,
141 base::Bind(&AudioOutputDevice::SetVolumeOnIOThread, this, volume))) { 141 base::Bind(&AudioOutputDevice::SetVolumeOnIOThread, this, volume))) {
142 return false; 142 return false;
143 } 143 }
144 144
145 return true; 145 return true;
146 } 146 }
147 147
148 OutputDeviceInfo AudioOutputDevice::GetOutputDeviceInfo() { 148 OutputDeviceInfo AudioOutputDevice::GetOutputDeviceInfo(
149 const AudioParameters& preferred_params) {
149 CHECK(!task_runner()->BelongsToCurrentThread()); 150 CHECK(!task_runner()->BelongsToCurrentThread());
150 did_receive_auth_.Wait(); 151 did_receive_auth_.Wait();
151 return OutputDeviceInfo(AudioDeviceDescription::UseSessionIdToSelectDevice( 152 return OutputDeviceInfo(AudioDeviceDescription::UseSessionIdToSelectDevice(
152 session_id_, device_id_) 153 session_id_, device_id_)
153 ? matched_device_id_ 154 ? matched_device_id_
154 : device_id_, 155 : device_id_,
155 device_status_, output_params_); 156 device_status_, output_params_);
156 } 157 }
157 158
158 bool AudioOutputDevice::CurrentThreadIsRenderingThread() { 159 bool AudioOutputDevice::CurrentThreadIsRenderingThread() {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 render_callback_->Render(delay, delay_timestamp, frames_skipped, 488 render_callback_->Render(delay, delay_timestamp, frames_skipped,
488 output_bus_.get()); 489 output_bus_.get());
489 } 490 }
490 491
491 bool AudioOutputDevice::AudioThreadCallback:: 492 bool AudioOutputDevice::AudioThreadCallback::
492 CurrentThreadIsAudioDeviceThread() { 493 CurrentThreadIsAudioDeviceThread() {
493 return thread_checker_.CalledOnValidThread(); 494 return thread_checker_.CalledOnValidThread();
494 } 495 }
495 496
496 } // namespace media 497 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698