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/linux/video_capture_device_factory_linux.h" | 5 #include "media/capture/video/linux/video_capture_device_factory_linux.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <stdint.h> |
| 10 #include <sys/ioctl.h> |
| 11 |
| 12 #include "base/files/file_enumerator.h" |
| 13 #include "base/files/scoped_file.h" |
| 14 #include "base/posix/eintr_wrapper.h" |
| 15 #include "build/build_config.h" |
| 16 |
9 #if defined(OS_OPENBSD) | 17 #if defined(OS_OPENBSD) |
10 #include <sys/videoio.h> | 18 #include <sys/videoio.h> |
11 #else | 19 #else |
12 #include <linux/videodev2.h> | 20 #include <linux/videodev2.h> |
13 #endif | 21 #endif |
14 #include <sys/ioctl.h> | |
15 | 22 |
16 #include "base/files/file_enumerator.h" | |
17 #include "base/files/scoped_file.h" | |
18 #include "base/posix/eintr_wrapper.h" | |
19 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
20 #include "media/capture/video/linux/video_capture_device_chromeos.h" | 24 #include "media/capture/video/linux/video_capture_device_chromeos.h" |
21 #endif | 25 #endif |
22 #include "media/capture/video/linux/video_capture_device_linux.h" | 26 #include "media/capture/video/linux/video_capture_device_linux.h" |
23 | 27 |
24 namespace media { | 28 namespace media { |
25 | 29 |
26 static bool HasUsableFormats(int fd, uint32_t capabilities) { | 30 static bool HasUsableFormats(int fd, uint32_t capabilities) { |
27 const std::list<uint32_t>& usable_fourccs = | 31 const std::list<uint32_t>& usable_fourccs = |
28 VideoCaptureDeviceLinux::GetListOfUsableFourCCs(false); | 32 VideoCaptureDeviceLinux::GetListOfUsableFourCCs(false); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 219 } |
216 | 220 |
217 // static | 221 // static |
218 VideoCaptureDeviceFactory* | 222 VideoCaptureDeviceFactory* |
219 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( | 223 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( |
220 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 224 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
221 return new VideoCaptureDeviceFactoryLinux(ui_task_runner); | 225 return new VideoCaptureDeviceFactoryLinux(ui_task_runner); |
222 } | 226 } |
223 | 227 |
224 } // namespace media | 228 } // namespace media |
OLD | NEW |