| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_descriptor.h" | 5 #include "device/capture/video/video_capture_device_descriptor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace device { |
| 10 | 10 |
| 11 VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor() | 11 VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor() |
| 12 : capture_api(VideoCaptureApi::UNKNOWN), | 12 : capture_api(VideoCaptureApi::UNKNOWN), |
| 13 transport_type(VideoCaptureTransportType::OTHER_TRANSPORT) {} | 13 transport_type(VideoCaptureTransportType::OTHER_TRANSPORT) {} |
| 14 | 14 |
| 15 VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor( | 15 VideoCaptureDeviceDescriptor::VideoCaptureDeviceDescriptor( |
| 16 const std::string& display_name, | 16 const std::string& display_name, |
| 17 const std::string& device_id, | 17 const std::string& device_id, |
| 18 VideoCaptureApi capture_api, | 18 VideoCaptureApi capture_api, |
| 19 VideoCaptureTransportType transport_type) | 19 VideoCaptureTransportType transport_type) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return "Unknown API"; | 67 return "Unknown API"; |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 std::string VideoCaptureDeviceDescriptor::GetNameAndModel() const { | 71 std::string VideoCaptureDeviceDescriptor::GetNameAndModel() const { |
| 72 if (model_id.empty()) | 72 if (model_id.empty()) |
| 73 return display_name; | 73 return display_name; |
| 74 return display_name + " (" + model_id + ")"; | 74 return display_name + " (" + model_id + ")"; |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace media | 77 } // namespace device |
| OLD | NEW |