Index: chrome/browser/media/media_capture_devices_dispatcher.cc |
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc |
index aa4020dcdf3d2705772a24778244841c68865100..1db0f885648aa47237340cd8d58ce54dea3f901d 100644 |
--- a/chrome/browser/media/media_capture_devices_dispatcher.cc |
+++ b/chrome/browser/media/media_capture_devices_dispatcher.cc |
@@ -276,6 +276,19 @@ MediaCaptureDevicesDispatcher::MediaCaptureDevicesDispatcher() |
notifications_registrar_.Add( |
this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
content::NotificationService::AllSources()); |
+ |
+ // AVFoundation is used for video/audio device monitoring and video capture in |
+ // Mac. Experimentally, connect it in Canary and Unknown (developer builds). |
+#if defined(OS_MACOSX) |
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceQTKit)) { |
+ if (channel == chrome::VersionInfo::CHANNEL_CANARY || |
+ channel == chrome::VersionInfo::CHANNEL_UNKNOWN) { |
+ CommandLine::ForCurrentProcess()->AppendSwitch( |
+ switches::kEnableAVFoundation); |
+ } |
+ } |
+#endif |
} |
MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} |