| 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 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_INFO_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_INFO_H_ |
| 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_INFO_H_ | 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_INFO_H_ |
| 7 | 7 |
| 8 #include "media/base/video_capture_types.h" | 8 #include "media/base/video_capture_types.h" |
| 9 #include "media/capture/video/video_capture_device.h" | 9 #include "media/capture/video/video_capture_device_descriptor.h" |
| 10 | 10 |
| 11 namespace media { | 11 namespace media { |
| 12 | 12 |
| 13 // A convenience wrap of a device's name and associated supported formats. | |
| 14 struct CAPTURE_EXPORT VideoCaptureDeviceInfo { | 13 struct CAPTURE_EXPORT VideoCaptureDeviceInfo { |
| 15 VideoCaptureDeviceInfo(); | 14 VideoCaptureDeviceInfo(); |
| 16 VideoCaptureDeviceInfo(const VideoCaptureDevice::Name& name, | |
| 17 const VideoCaptureFormats& supported_formats); | |
| 18 VideoCaptureDeviceInfo(const VideoCaptureDeviceInfo& other); | 15 VideoCaptureDeviceInfo(const VideoCaptureDeviceInfo& other); |
| 19 ~VideoCaptureDeviceInfo(); | 16 ~VideoCaptureDeviceInfo(); |
| 20 | 17 |
| 21 VideoCaptureDevice::Name name; | 18 // Friendly name of a device, plus the model identifier in parentheses. |
| 19 std::string GetNameAndModel() const; |
| 20 |
| 21 VideoCaptureDeviceDescriptor descriptor; |
| 22 VideoCaptureFormats supported_formats; | 22 VideoCaptureFormats supported_formats; |
| 23 // A unique hardware identifier of the capture device. |
| 24 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty |
| 25 // otherwise. |
| 26 std::string model_id; |
| 23 }; | 27 }; |
| 24 | 28 |
| 25 typedef std::vector<VideoCaptureDeviceInfo> VideoCaptureDeviceInfos; | 29 typedef std::vector<VideoCaptureDeviceInfo> VideoCaptureDeviceInfos; |
| 26 | 30 |
| 27 } // namespace media | 31 } // namespace media |
| 28 | 32 |
| 29 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_INFO_H_ | 33 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_INFO_H_ |
| OLD | NEW |