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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ipc/unix_domain_socket_util_unittest.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('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 (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_manager_base.h" 5 #include "media/audio/audio_manager_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 DispatcherParams* dispatcher_params = 259 DispatcherParams* dispatcher_params =
260 new DispatcherParams(params, output_params, input_device_id); 260 new DispatcherParams(params, output_params, input_device_id);
261 261
262 AudioOutputDispatchers::iterator it = 262 AudioOutputDispatchers::iterator it =
263 std::find_if(output_dispatchers_.begin(), output_dispatchers_.end(), 263 std::find_if(output_dispatchers_.begin(), output_dispatchers_.end(),
264 CompareByParams(dispatcher_params)); 264 CompareByParams(dispatcher_params));
265 if (it != output_dispatchers_.end()) { 265 if (it != output_dispatchers_.end()) {
266 delete dispatcher_params; 266 delete dispatcher_params;
267 return new AudioOutputProxy((*it)->dispatcher); 267 return new AudioOutputProxy((*it)->dispatcher.get());
268 } 268 }
269 269
270 const base::TimeDelta kCloseDelay = 270 const base::TimeDelta kCloseDelay =
271 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); 271 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds);
272 272
273 if (output_params.format() != AudioParameters::AUDIO_FAKE) { 273 if (output_params.format() != AudioParameters::AUDIO_FAKE) {
274 scoped_refptr<AudioOutputDispatcher> dispatcher = 274 scoped_refptr<AudioOutputDispatcher> dispatcher =
275 new AudioOutputResampler(this, params, output_params, input_device_id, 275 new AudioOutputResampler(this, params, output_params, input_device_id,
276 kCloseDelay); 276 kCloseDelay);
277 dispatcher_params->dispatcher = dispatcher; 277 dispatcher_params->dispatcher = dispatcher;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 return GetPreferredOutputStreamParameters(AudioParameters()); 385 return GetPreferredOutputStreamParameters(AudioParameters());
386 } 386 }
387 387
388 AudioParameters AudioManagerBase::GetInputStreamParameters( 388 AudioParameters AudioManagerBase::GetInputStreamParameters(
389 const std::string& device_id) { 389 const std::string& device_id) {
390 NOTREACHED(); 390 NOTREACHED();
391 return AudioParameters(); 391 return AudioParameters();
392 } 392 }
393 393
394 } // namespace media 394 } // namespace media
OLDNEW
« no previous file with comments | « ipc/unix_domain_socket_util_unittest.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698