| 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 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ |
| 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ | 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // In the shared build, all methods from the STL container will be exported | 65 // In the shared build, all methods from the STL container will be exported |
| 66 // so even though they're not used, they're still depended upon. | 66 // so even though they're not used, they're still depended upon. |
| 67 bool operator==(const VideoCaptureDeviceDescriptor& other) const { | 67 bool operator==(const VideoCaptureDeviceDescriptor& other) const { |
| 68 return (other.device_id == device_id) && (other.capture_api == capture_api); | 68 return (other.device_id == device_id) && (other.capture_api == capture_api); |
| 69 } | 69 } |
| 70 bool operator<(const VideoCaptureDeviceDescriptor& other) const; | 70 bool operator<(const VideoCaptureDeviceDescriptor& other) const; |
| 71 | 71 |
| 72 const char* GetCaptureApiTypeString() const; | 72 const char* GetCaptureApiTypeString() const; |
| 73 // Friendly name of a device, plus the model identifier in parentheses. | 73 // Friendly name of a device, plus the model identifier in parentheses. |
| 74 std::string GetNameAndModel() const; | 74 std::string GetNameAndModel() const; |
| 75 std::string GetHumanReadableName() const; |
| 75 | 76 |
| 76 std::string display_name; // Name that is intended for display in the UI | 77 std::string display_name; // Name that is intended for display in the UI |
| 77 std::string device_id; | 78 std::string device_id; |
| 78 // A unique hardware identifier of the capture device. | 79 // A unique hardware identifier of the capture device. |
| 79 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty | 80 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty |
| 80 // otherwise. | 81 // otherwise. |
| 81 std::string model_id; | 82 std::string model_id; |
| 82 | 83 |
| 83 VideoFacingMode facing; | 84 VideoFacingMode facing; |
| 84 | 85 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 base::Optional<CameraCalibration> camera_calibration; | 102 base::Optional<CameraCalibration> camera_calibration; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>; | 105 using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>; |
| 105 | 106 |
| 106 } // namespace media | 107 } // namespace media |
| 107 | 108 |
| 108 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ | 109 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ |
| OLD | NEW |