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

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

Issue 2083933003: Implement AudioRendererMixerInput::CurrentThreadIsRenderingThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review. Rebase. Created 4 years, 5 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/base/audio_renderer_mixer_input.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::CurrentThreadIsRenderingThread() { 125 bool AudioRendererMixerInput::CurrentThreadIsRenderingThread() {
126 NOTIMPLEMENTED(); 126 return mixer_->CurrentThreadIsRenderingThread();
127 return false;
128 } 127 }
129 128
130 void AudioRendererMixerInput::SwitchOutputDevice( 129 void AudioRendererMixerInput::SwitchOutputDevice(
131 const std::string& device_id, 130 const std::string& device_id,
132 const url::Origin& security_origin, 131 const url::Origin& security_origin,
133 const OutputDeviceStatusCB& callback) { 132 const OutputDeviceStatusCB& callback) {
134 if (!mixer_) { 133 if (!mixer_) {
135 if (pending_switch_callback_.is_null()) { 134 if (pending_switch_callback_.is_null()) {
136 pending_switch_callback_ = callback; 135 pending_switch_callback_ = callback;
137 pending_switch_device_id_ = device_id; 136 pending_switch_device_id_ = device_id;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 base::AutoLock auto_lock(volume_lock_); 187 base::AutoLock auto_lock(volume_lock_);
189 return frames_filled > 0 ? volume_ : 0; 188 return frames_filled > 0 ? volume_ : 0;
190 } 189 }
191 } 190 }
192 191
193 void AudioRendererMixerInput::OnRenderError() { 192 void AudioRendererMixerInput::OnRenderError() {
194 callback_->OnRenderError(); 193 callback_->OnRenderError();
195 } 194 }
196 195
197 } // namespace media 196 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer_input.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698