Index: content/common/media/media_devices.cc |
diff --git a/content/common/media/media_devices.cc b/content/common/media/media_devices.cc |
index a18349b88136609038468d56e3c2b8fe064b35e5..82b92e39cf8ad96b848b1afac4cb7add5f75b8bd 100644 |
--- a/content/common/media/media_devices.cc |
+++ b/content/common/media/media_devices.cc |
@@ -4,9 +4,14 @@ |
#include "content/common/media/media_devices.h" |
#include "media/audio/audio_device_description.h" |
+#include "media/capture/video/video_capture_device_descriptor.h" |
namespace content { |
+MediaDeviceInfo::MediaDeviceInfo() = default; |
+ |
+MediaDeviceInfo::~MediaDeviceInfo() = default; |
+ |
MediaDeviceInfo::MediaDeviceInfo(const std::string& device_id, |
const std::string& label, |
const std::string& group_id) |
@@ -18,6 +23,12 @@ MediaDeviceInfo::MediaDeviceInfo( |
label(device_description.device_name), |
group_id(device_description.group_id) {} |
+MediaDeviceInfo::MediaDeviceInfo( |
+ const media::VideoCaptureDeviceDescriptor& descriptor) |
+ : device_id(descriptor.device_id), |
+ label(descriptor.GetNameAndModel()), |
+ model_id(descriptor.model_id) {} |
+ |
bool operator==(const MediaDeviceInfo& first, const MediaDeviceInfo& second) { |
return first.device_id == second.device_id && first.label == second.label; |
} |