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

Side by Side Diff: media/base/mac/avfoundation_glue.mm

Issue 819203002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « media/base/android/browser_cdm_factory_android.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "media/base/mac/avfoundation_glue.h" 5 #import "media/base/mac/avfoundation_glue.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // This contains the logic of checking whether AVFoundation is supported. 120 // This contains the logic of checking whether AVFoundation is supported.
121 // It's called only once and the results are cached in a static bool. 121 // It's called only once and the results are cached in a static bool.
122 bool IsAVFoundationSupportedHelper() { 122 bool IsAVFoundationSupportedHelper() {
123 // AVFoundation is only available on OS Lion and above. 123 // AVFoundation is only available on OS Lion and above.
124 if (!base::mac::IsOSLionOrLater()) { 124 if (!base::mac::IsOSLionOrLater()) {
125 LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_OS_PREVIOUS_TO_LION); 125 LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_OS_PREVIOUS_TO_LION);
126 return false; 126 return false;
127 } 127 }
128 128
129 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 129 const base::CommandLine* command_line =
130 base::CommandLine::ForCurrentProcess();
130 // The force-qtkit flag takes precedence over enable-avfoundation. 131 // The force-qtkit flag takes precedence over enable-avfoundation.
131 if (command_line->HasSwitch(switches::kForceQTKit)) { 132 if (command_line->HasSwitch(switches::kForceQTKit)) {
132 LogCaptureApi(CAPTURE_API_QTKIT_FORCED_BY_FLAG); 133 LogCaptureApi(CAPTURE_API_QTKIT_FORCED_BY_FLAG);
133 return false; 134 return false;
134 } 135 }
135 136
136 if (!command_line->HasSwitch(switches::kEnableAVFoundation)) { 137 if (!command_line->HasSwitch(switches::kEnableAVFoundation)) {
137 LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_NO_FLAG); 138 LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_NO_FLAG);
138 return false; 139 return false;
139 } 140 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 @implementation AVCaptureDeviceInputGlue 233 @implementation AVCaptureDeviceInputGlue
233 234
234 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device 235 + (CrAVCaptureDeviceInput*)deviceInputWithDevice:(CrAVCaptureDevice*)device
235 error:(NSError**)outError { 236 error:(NSError**)outError {
236 return [[AVFoundationGlue::AVFoundationBundle() 237 return [[AVFoundationGlue::AVFoundationBundle()
237 classNamed:@"AVCaptureDeviceInput"] deviceInputWithDevice:device 238 classNamed:@"AVCaptureDeviceInput"] deviceInputWithDevice:device
238 error:outError]; 239 error:outError];
239 } 240 }
240 241
241 @end // @implementation AVCaptureDeviceInputGlue 242 @end // @implementation AVCaptureDeviceInputGlue
OLDNEW
« no previous file with comments | « media/base/android/browser_cdm_factory_android.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698