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

Side by Side Diff: media/base/audio_renderer_mixer_input.cc

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using the new BelongsTo...() function for thread checking. Created 4 years, 6 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/base/audio_renderer_mixer_input.h" 5 #include "media/base/audio_renderer_mixer_input.h"
6 6
7 #include <cmath> 7 #include <cmath>
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return true; 115 return true;
116 } 116 }
117 117
118 OutputDeviceInfo AudioRendererMixerInput::GetOutputDeviceInfo() { 118 OutputDeviceInfo AudioRendererMixerInput::GetOutputDeviceInfo() {
119 return mixer_ 119 return mixer_
120 ? mixer_->GetOutputDeviceInfo() 120 ? mixer_->GetOutputDeviceInfo()
121 : mixer_pool_->GetOutputDeviceInfo(owner_id_, 0 /* session_id */, 121 : mixer_pool_->GetOutputDeviceInfo(owner_id_, 0 /* session_id */,
122 device_id_, security_origin_); 122 device_id_, security_origin_);
123 } 123 }
124 124
125 bool AudioRendererMixerInput::BelongsToRenderingThread() {
126 NOTIMPLEMENTED();
DaleCurtis 2016/06/10 18:24:49 Ditto.
Henrik Grunell 2016/06/13 12:46:15 There's no as simple implementation as for NullAud
127 return false;
128 }
129
125 void AudioRendererMixerInput::SwitchOutputDevice( 130 void AudioRendererMixerInput::SwitchOutputDevice(
126 const std::string& device_id, 131 const std::string& device_id,
127 const url::Origin& security_origin, 132 const url::Origin& security_origin,
128 const OutputDeviceStatusCB& callback) { 133 const OutputDeviceStatusCB& callback) {
129 if (!mixer_) { 134 if (!mixer_) {
130 if (pending_switch_callback_.is_null()) { 135 if (pending_switch_callback_.is_null()) {
131 pending_switch_callback_ = callback; 136 pending_switch_callback_ = callback;
132 pending_switch_device_id_ = device_id; 137 pending_switch_device_id_ = device_id;
133 pending_switch_security_origin_ = security_origin; 138 pending_switch_security_origin_ = security_origin;
134 } else { 139 } else {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 base::AutoLock auto_lock(volume_lock_); 188 base::AutoLock auto_lock(volume_lock_);
184 return frames_filled > 0 ? volume_ : 0; 189 return frames_filled > 0 ? volume_ : 0;
185 } 190 }
186 } 191 }
187 192
188 void AudioRendererMixerInput::OnRenderError() { 193 void AudioRendererMixerInput::OnRenderError() {
189 callback_->OnRenderError(); 194 callback_->OnRenderError();
190 } 195 }
191 196
192 } // namespace media 197 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698