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

Side by Side Diff: device/capture/video/video_capture_device_factory.cc

Issue 2214533002: move //media/capture to //device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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/capture/video/video_capture_device_factory.h" 5 #include "device/capture/video/video_capture_device_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "device/capture/video/fake_video_capture_device_factory.h"
12 #include "device/capture/video/file_video_capture_device_factory.h"
11 #include "media/base/media_switches.h" 13 #include "media/base/media_switches.h"
12 #include "media/capture/video/fake_video_capture_device_factory.h"
13 #include "media/capture/video/file_video_capture_device_factory.h"
14 14
15 namespace media { 15 namespace device {
16 16
17 // static 17 // static
18 std::unique_ptr<VideoCaptureDeviceFactory> 18 std::unique_ptr<VideoCaptureDeviceFactory>
19 VideoCaptureDeviceFactory::CreateFactory( 19 VideoCaptureDeviceFactory::CreateFactory(
20 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 20 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
21 const base::CommandLine* command_line = 21 const base::CommandLine* command_line =
22 base::CommandLine::ForCurrentProcess(); 22 base::CommandLine::ForCurrentProcess();
23 // Use a Fake or File Video Device Factory if the command line flags are 23 // Use a Fake or File Video Device Factory if the command line flags are
24 // present, otherwise use the normal, platform-dependent, device factory. 24 // present, otherwise use the normal, platform-dependent, device factory.
25 if (command_line->HasSwitch(switches::kUseFakeDeviceForMediaStream)) { 25 if (command_line->HasSwitch(switches::kUseFakeDeviceForMediaStream)) {
26 if (command_line->HasSwitch(switches::kUseFileForFakeVideoCapture)) { 26 if (command_line->HasSwitch(switches::kUseFileForFakeVideoCapture)) {
27 return std::unique_ptr<VideoCaptureDeviceFactory>( 27 return std::unique_ptr<VideoCaptureDeviceFactory>(
28 new media::FileVideoCaptureDeviceFactory()); 28 new FileVideoCaptureDeviceFactory());
29 } else { 29 } else {
30 return std::unique_ptr<VideoCaptureDeviceFactory>( 30 return std::unique_ptr<VideoCaptureDeviceFactory>(
31 new media::FakeVideoCaptureDeviceFactory()); 31 new FakeVideoCaptureDeviceFactory());
32 } 32 }
33 } else { 33 } else {
34 // |ui_task_runner| is needed for the Linux ChromeOS factory to retrieve 34 // |ui_task_runner| is needed for the Linux ChromeOS factory to retrieve
35 // screen rotations. 35 // screen rotations.
36 return std::unique_ptr<VideoCaptureDeviceFactory>( 36 return std::unique_ptr<VideoCaptureDeviceFactory>(
37 CreateVideoCaptureDeviceFactory(ui_task_runner)); 37 CreateVideoCaptureDeviceFactory(ui_task_runner));
38 } 38 }
39 } 39 }
40 40
41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { 41 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
(...skipping 17 matching lines...) Expand all
59 !defined(OS_WIN) 59 !defined(OS_WIN)
60 // static 60 // static
61 VideoCaptureDeviceFactory* 61 VideoCaptureDeviceFactory*
62 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 62 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 63 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
64 NOTIMPLEMENTED(); 64 NOTIMPLEMENTED();
65 return NULL; 65 return NULL;
66 } 66 }
67 #endif 67 #endif
68 68
69 } // namespace media 69 } // namespace device
OLDNEW
« no previous file with comments | « device/capture/video/video_capture_device_factory.h ('k') | device/capture/video/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698