Index: media/capture/video/video_capture_device.cc |
diff --git a/media/capture/video/video_capture_device.cc b/media/capture/video/video_capture_device.cc |
index 4b771e564ee9c05c0641bd14b5174cd4d005f6b6..49ca78a05165a43e2998cf4d8eab7cc368f25df4 100644 |
--- a/media/capture/video/video_capture_device.cc |
+++ b/media/capture/video/video_capture_device.cc |
@@ -4,8 +4,10 @@ |
#include "media/capture/video/video_capture_device.h" |
+#include "base/command_line.h" |
#include "base/i18n/timezone.h" |
#include "base/strings/string_util.h" |
+#include "media/base/media_switches.h" |
namespace media { |
@@ -14,7 +16,10 @@ const std::string VideoCaptureDevice::Name::GetNameAndModel() const { |
if (model_id.empty()) |
return device_name_; |
const std::string suffix = " (" + model_id + ")"; |
- if (base::EndsWith(device_name_, suffix, base::CompareCase::SENSITIVE)) |
+ if (base::EndsWith(device_name_, suffix, base::CompareCase::SENSITIVE) || |
+ base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kUseFakeDeviceForMediaStream)) |
+ // Ignore |model_id| if |kUseFakeDeviceForMediaStream| flag is present. |
mcasas
2015/09/04 02:24:50
Hmm it's not that simple :)
Command line flags, s
msu.koo
2015/09/05 07:58:11
Thank you for your comment :)
A little bit hard to
mcasas
2015/09/08 17:50:15
Yeah, so command line flags are supposed to be
li
msu.koo
2015/09/11 07:08:50
I fully agree with you that should minimize using
mcasas
2015/09/15 17:11:49
Hmm is true that changing the whole infra might pr
|
return device_name_; |
return device_name_ + suffix; |
} |