| OLD | NEW |
| 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/file_video_capture_device_factory.h" | 5 #include "device/capture/video/file_video_capture_device_factory.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "device/capture/video/file_video_capture_device.h" |
| 11 #include "media/base/media_switches.h" | 12 #include "media/base/media_switches.h" |
| 12 #include "media/capture/video/file_video_capture_device.h" | |
| 13 | 13 |
| 14 namespace media { | 14 namespace device { |
| 15 | 15 |
| 16 const char kFileVideoCaptureDeviceName[] = | 16 const char kFileVideoCaptureDeviceName[] = |
| 17 "/dev/placeholder-for-file-backed-fake-capture-device"; | 17 "/dev/placeholder-for-file-backed-fake-capture-device"; |
| 18 | 18 |
| 19 // Inspects the command line and retrieves the file path parameter. | 19 // Inspects the command line and retrieves the file path parameter. |
| 20 base::FilePath GetFilePathFromCommandLine() { | 20 base::FilePath GetFilePathFromCommandLine() { |
| 21 base::FilePath command_line_file_path = | 21 base::FilePath command_line_file_path = |
| 22 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 22 base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
| 23 switches::kUseFileForFakeVideoCapture); | 23 switches::kUseFileForFakeVideoCapture); |
| 24 CHECK(!command_line_file_path.empty()); | 24 CHECK(!command_line_file_path.empty()); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 VideoCaptureFormat capture_format; | 67 VideoCaptureFormat capture_format; |
| 68 if (!FileVideoCaptureDevice::GetVideoCaptureFormat( | 68 if (!FileVideoCaptureDevice::GetVideoCaptureFormat( |
| 69 GetFilePathFromCommandLine(), &capture_format)) { | 69 GetFilePathFromCommandLine(), &capture_format)) { |
| 70 return; | 70 return; |
| 71 } | 71 } |
| 72 | 72 |
| 73 supported_formats->push_back(capture_format); | 73 supported_formats->push_back(capture_format); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace media | 76 } // namespace device |
| OLD | NEW |