OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |