Index: media/capture/video/video_capture_device_factory.h |
diff --git a/media/capture/video/video_capture_device_factory.h b/media/capture/video/video_capture_device_factory.h |
index de16133078b4076e50cba4125c98be7aaebf33ab..a7b05507681fe75ad4e00018311f522754fda5a7 100644 |
--- a/media/capture/video/video_capture_device_factory.h |
+++ b/media/capture/video/video_capture_device_factory.h |
@@ -8,6 +8,7 @@ |
#include "base/macros.h" |
#include "base/threading/thread_checker.h" |
#include "media/capture/video/video_capture_device.h" |
+#include "media/capture/video/video_capture_device_info.h" |
namespace media { |
@@ -25,25 +26,29 @@ class CAPTURE_EXPORT VideoCaptureDeviceFactory { |
// Creates a VideoCaptureDevice object. Returns NULL if something goes wrong. |
virtual std::unique_ptr<VideoCaptureDevice> Create( |
- const VideoCaptureDevice::Name& device_name) = 0; |
+ const VideoCaptureDeviceDescriptor& device_descriptor) = 0; |
- // Asynchronous version of GetDeviceNames calling back to |callback|. |
- virtual void EnumerateDeviceNames( |
+ // Asynchronous version of GetDeviceDescriptors calling back to |callback|. |
+ virtual void EnumerateDeviceDescriptors( |
const base::Callback< |
- void(std::unique_ptr<media::VideoCaptureDevice::Names>)>& callback); |
+ void(std::unique_ptr<VideoCaptureDeviceDescriptors>)>& callback); |
- // Gets the supported formats of a particular device attached to the system. |
+ // Obtains extended information about a device. This includes the supported |
+ // formats. |
// This method should be called before allocating or starting a device. In |
// case format enumeration is not supported, or there was a problem, the |
// formats array will be empty. |
emircan
2016/07/25 22:56:40
Please update the comment.
chfremer
2016/07/26 16:56:35
Done.
|
- virtual void GetDeviceSupportedFormats( |
- const VideoCaptureDevice::Name& device, |
- VideoCaptureFormats* supported_formats) = 0; |
+ virtual void GetDeviceInfo( |
+ const VideoCaptureDeviceDescriptor& device_descriptor, |
+ VideoCaptureDeviceInfo* device_info) = 0; |
emircan
2016/07/25 22:56:40
VideoCaptureDeviceInfo* const device_info
chfremer
2016/07/26 16:56:35
Discussed offline.
I don't see much value in maki
|
protected: |
- // Gets the names of all video capture devices connected to this computer. |
- // Used by the default implementation of EnumerateDeviceNames(). |
- virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names) = 0; |
+ // Gets descriptors of all video capture devices connected to this computer. |
+ // Used by the default implementation of EnumerateDevices(). |
+ // Note: The same physical device may appear more than once if it is |
+ // accessible through different APIs. |
+ virtual void GetDeviceDescriptors( |
+ VideoCaptureDeviceDescriptors* device_descriptors) = 0; |
emircan
2016/07/25 22:56:40
VideoCaptureDeviceDescriptors* const device_descri
chfremer
2016/07/26 16:56:35
Acknowledged.
|
base::ThreadChecker thread_checker_; |