Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: media/video/capture/mac/avfoundation_glue.mm

Issue 260873011: Mac: Add flag to force QTKit in otherwise AVFoundation-enabled builds/configs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/media_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/mac/avfoundation_glue.mm
diff --git a/media/video/capture/mac/avfoundation_glue.mm b/media/video/capture/mac/avfoundation_glue.mm
index a22898610029dcd5ec42f2cc1f33c1f358be32bd..afc92d159bfad89c2ed5c1bee2a5ff1b0de5eda3 100644
--- a/media/video/capture/mac/avfoundation_glue.mm
+++ b/media/video/capture/mac/avfoundation_glue.mm
@@ -108,11 +108,13 @@ static base::LazyInstance<AVFoundationInternal> g_avfoundation_handle =
bool AVFoundationGlue::IsAVFoundationSupported() {
// DeviceMonitorMac will initialize this static bool from the main UI thread
// once, during Chrome startup so this construction is thread safe.
+ // Use AVFoundation if possible, enabled, and QTKit is not explicitly forced.
+ static CommandLine* command_line = CommandLine::ForCurrentProcess();
static bool is_av_foundation_supported = base::mac::IsOSLionOrLater() &&
- (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAVFoundation) ||
- base::FieldTrialList::FindFullName("AVFoundationMacVideoCapture")
- == "Enabled") && [AVFoundationBundle() load];
+ ((command_line->HasSwitch(switches::kEnableAVFoundation) &&
+ !command_line->HasSwitch(switches::kForceQTKit)) ||
+ base::FieldTrialList::FindFullName("AVFoundationMacVideoCapture")
+ == "Enabled") && [AVFoundationBundle() load];
return is_av_foundation_supported;
}
« no previous file with comments | « media/base/media_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698