OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/capture/video/video_capture_device_info.h" | 5 #include "media/capture/video/video_capture_device_info.h" |
6 | 6 |
7 namespace media { | 7 namespace media { |
8 | 8 |
9 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo() { | 9 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo() { |
10 } | 10 } |
11 | 11 |
12 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo( | 12 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo( |
13 const VideoCaptureDevice::Name& name, | |
14 const VideoCaptureFormats& supported_formats) | |
15 : name(name), supported_formats(supported_formats) { | |
16 } | |
17 | |
18 VideoCaptureDeviceInfo::VideoCaptureDeviceInfo( | |
19 const VideoCaptureDeviceInfo& other) = default; | 13 const VideoCaptureDeviceInfo& other) = default; |
20 | 14 |
21 VideoCaptureDeviceInfo::~VideoCaptureDeviceInfo() { | 15 VideoCaptureDeviceInfo::~VideoCaptureDeviceInfo() { |
22 } | 16 } |
23 | 17 |
18 std::string VideoCaptureDeviceInfo::GetNameAndModel() const { | |
19 if (model_id.empty()) { | |
20 return descriptor.friendly_name; | |
21 } | |
mcasas
2016/07/26 23:52:04
No need for {} for one-line bodies (might
not be f
chfremer
2016/07/27 23:10:18
Done.
| |
22 return descriptor.friendly_name + " (" + model_id + ")"; | |
23 } | |
24 | |
24 } // namespace media | 25 } // namespace media |
OLD | NEW |