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

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

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing guidou's comments 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
Henrik Grunell 2016/03/25 10:44:40 Ditto.
o1ka 2016/03/29 13:39:54 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/base/output_device_info.h"
6
7 namespace media {
8
9 OutputDeviceInfo::OutputDeviceInfo()
10 : OutputDeviceInfo(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL) {}
11
12 OutputDeviceInfo::OutputDeviceInfo(OutputDeviceStatus device_status)
13 : OutputDeviceInfo(std::string(),
14 device_status,
15 AudioParameters(AudioParameters::AUDIO_FAKE,
miu 2016/03/24 21:32:02 OOC, why specify the AUDIO_FAKE device here? Any
o1ka 2016/03/29 13:39:54 This is a very good question. Default constructor
16 CHANNEL_LAYOUT_NONE,
17 0,
18 0,
19 0)) {}
20
21 OutputDeviceInfo::OutputDeviceInfo(const std::string& device_id,
22 OutputDeviceStatus device_status,
23 const AudioParameters& output_params)
24 : device_id_(device_id),
25 device_status_(device_status),
26 output_params_(output_params) {}
27
28 OutputDeviceInfo::OutputDeviceInfo(const OutputDeviceInfo&) = default;
29
30 OutputDeviceInfo::~OutputDeviceInfo() {}
31
32 OutputDeviceInfo& OutputDeviceInfo::operator=(const OutputDeviceInfo&) =
33 default;
34
35 std::string OutputDeviceInfo::AsHumanReadableString() const {
36 std::ostringstream s;
37 s << "device_id: " << device_id() << " device_status: " << device_status()
38 << " output_params: [ " << output_params().AsHumanReadableString() << " ]";
39 return s.str();
40 }
41
42 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698