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

Side by Side Diff: media/video/capture/win/video_capture_device_factory_win.cc

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 5 years, 12 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 unified diff | Download patch
« no previous file with comments | « media/video/capture/video_capture_device_factory.cc ('k') | ppapi/nacl_irt/ppapi_dispatcher.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "media/video/capture/win/video_capture_device_factory_win.h" 5 #include "media/video/capture/win/video_capture_device_factory_win.h"
6 6
7 #include <mfapi.h> 7 #include <mfapi.h>
8 #include <mferror.h> 8 #include <mferror.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 static bool g_dlls_available = LoadMediaFoundationDlls(); 377 static bool g_dlls_available = LoadMediaFoundationDlls();
378 return g_dlls_available; 378 return g_dlls_available;
379 } 379 }
380 380
381 VideoCaptureDeviceFactoryWin::VideoCaptureDeviceFactoryWin() { 381 VideoCaptureDeviceFactoryWin::VideoCaptureDeviceFactoryWin() {
382 // Use Media Foundation for Metro processes (after and including Win8) and 382 // Use Media Foundation for Metro processes (after and including Win8) and
383 // DirectShow for any other versions, unless forced via flag. Media Foundation 383 // DirectShow for any other versions, unless forced via flag. Media Foundation
384 // can also be forced if appropriate flag is set and we are in Windows 7 or 384 // can also be forced if appropriate flag is set and we are in Windows 7 or
385 // 8 in non-Metro mode. 385 // 8 in non-Metro mode.
386 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 386 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
387 use_media_foundation_ = (base::win::IsMetroProcess() && 387 use_media_foundation_ = (base::win::IsMetroProcess() &&
388 !cmd_line->HasSwitch(switches::kForceDirectShowVideoCapture)) || 388 !cmd_line->HasSwitch(switches::kForceDirectShowVideoCapture)) ||
389 (base::win::GetVersion() >= base::win::VERSION_WIN7 && 389 (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
390 cmd_line->HasSwitch(switches::kForceMediaFoundationVideoCapture)); 390 cmd_line->HasSwitch(switches::kForceMediaFoundationVideoCapture));
391 } 391 }
392 392
393 393
394 scoped_ptr<VideoCaptureDevice> VideoCaptureDeviceFactoryWin::Create( 394 scoped_ptr<VideoCaptureDevice> VideoCaptureDeviceFactoryWin::Create(
395 const Name& device_name) { 395 const Name& device_name) {
396 DCHECK(thread_checker_.CalledOnValidThread()); 396 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 460
461 // static 461 // static
462 VideoCaptureDeviceFactory* 462 VideoCaptureDeviceFactory*
463 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 463 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
464 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 464 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
465 return new VideoCaptureDeviceFactoryWin(); 465 return new VideoCaptureDeviceFactoryWin();
466 } 466 }
467 467
468 } // namespace media 468 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_device_factory.cc ('k') | ppapi/nacl_irt/ppapi_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698