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

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

Issue 1769933002: Looking up device id by session id for AudioRendererMixerInput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/mock_audio_renderer_sink.h" 5 #include "media/base/mock_audio_renderer_sink.h"
6 #include "media/base/fake_output_device.h" 6 #include "media/base/fake_output_device.h"
7 7
8 namespace media { 8 namespace media {
9
10 //--- MockAudioRendererSink
Henrik Grunell 2016/03/08 21:09:57 Remove comment.
o1ka 2016/04/05 15:13:38 Acknowledged.
9 MockAudioRendererSink::MockAudioRendererSink() 11 MockAudioRendererSink::MockAudioRendererSink()
10 : MockAudioRendererSink(OUTPUT_DEVICE_STATUS_OK) {} 12 : MockAudioRendererSink(OUTPUT_DEVICE_STATUS_OK) {}
11 13
12 MockAudioRendererSink::MockAudioRendererSink(OutputDeviceStatus device_status) 14 MockAudioRendererSink::MockAudioRendererSink(OutputDeviceStatus device_status)
13 : output_device_(new FakeOutputDevice(device_status)) {} 15 : output_device_(new FakeOutputDevice(device_status)) {}
14 16
15 MockAudioRendererSink::~MockAudioRendererSink() {} 17 MockAudioRendererSink::~MockAudioRendererSink() {}
16 18
17 void MockAudioRendererSink::Initialize(const AudioParameters& params, 19 void MockAudioRendererSink::Initialize(const AudioParameters& params,
18 RenderCallback* renderer) { 20 RenderCallback* renderer) {
19 callback_ = renderer; 21 callback_ = renderer;
20 } 22 }
21 23
22 OutputDevice* MockAudioRendererSink::GetOutputDevice() { 24 OutputDevice* MockAudioRendererSink::GetOutputDevice() {
23 return output_device_.get(); 25 return output_device_.get();
24 } 26 }
25 27
28 //--- MockAudioRendererMixerSink
Henrik Grunell 2016/03/08 21:09:57 Remove comment.
o1ka 2016/04/05 15:13:38 Acknowledged.
29 MockAudioRendererMixerSink::MockAudioRendererMixerSink()
30 : MockAudioRendererMixerSink(OUTPUT_DEVICE_STATUS_OK) {}
31
32 MockAudioRendererMixerSink::MockAudioRendererMixerSink(
33 OutputDeviceStatus device_status)
34 : output_device_(new FakeOutputDevice(device_status)) {}
35
36 MockAudioRendererMixerSink::MockAudioRendererMixerSink(
37 const std::string& device_id,
38 OutputDeviceStatus device_status)
39 : output_device_(new FakeOutputDevice(device_status)),
40 device_id_(device_id) {}
41
42 MockAudioRendererMixerSink::MockAudioRendererMixerSink(
43 const std::string& device_id,
44 OutputDeviceStatus device_status,
45 const AudioParameters& device_output_params)
46 : output_device_(new FakeOutputDevice(device_status, device_output_params)),
47 device_id_(device_id) {}
48
49 MockAudioRendererMixerSink::~MockAudioRendererMixerSink() {}
50
51 void MockAudioRendererMixerSink::Initialize(const AudioParameters& params,
52 RenderCallback* renderer) {
53 callback_ = renderer;
54 }
55
56 OutputDevice* MockAudioRendererMixerSink::GetOutputDevice() {
57 return output_device_.get();
58 }
59
26 } // namespace media 60 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698