| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Linux specific implementation of VideoCaptureDevice. | 5 // Linux specific implementation of VideoCaptureDevice. |
| 6 // V4L2 is used for capturing. V4L2 does not provide its own thread for | 6 // V4L2 is used for capturing. V4L2 does not provide its own thread for |
| 7 // capturing so this implementation uses a Chromium thread for fetching frames | 7 // capturing so this implementation uses a Chromium thread for fetching frames |
| 8 // from V4L2. | 8 // from V4L2. |
| 9 | 9 |
| 10 #ifndef MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ | 10 #ifndef DEVICE_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ |
| 11 #define MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ | 11 #define DEVICE_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ |
| 12 | 12 |
| 13 #include <stdint.h> | 13 #include <stdint.h> |
| 14 | 14 |
| 15 #include <string> | 15 #include <string> |
| 16 | 16 |
| 17 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
| 18 #include "base/files/scoped_file.h" | 18 #include "base/files/scoped_file.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
| 21 #include "device/capture/video/video_capture_device.h" |
| 21 #include "media/base/video_capture_types.h" | 22 #include "media/base/video_capture_types.h" |
| 22 #include "media/capture/video/video_capture_device.h" | |
| 23 | 23 |
| 24 namespace media { | 24 namespace media { |
| 25 | 25 |
| 26 class V4L2CaptureDelegate; | 26 class V4L2CaptureDelegate; |
| 27 | 27 |
| 28 // Linux V4L2 implementation of VideoCaptureDevice. | 28 // Linux V4L2 implementation of VideoCaptureDevice. |
| 29 class VideoCaptureDeviceLinux : public VideoCaptureDevice { | 29 class VideoCaptureDeviceLinux : public VideoCaptureDevice { |
| 30 public: | 30 public: |
| 31 static VideoPixelFormat V4l2FourCcToChromiumPixelFormat(uint32_t v4l2_fourcc); | 31 static VideoPixelFormat V4l2FourCcToChromiumPixelFormat(uint32_t v4l2_fourcc); |
| 32 static std::list<uint32_t> GetListOfUsableFourCCs(bool favour_mjpeg); | 32 static std::list<uint32_t> GetListOfUsableFourCCs(bool favour_mjpeg); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 52 | 52 |
| 53 base::Thread v4l2_thread_; // Thread used for reading data from the device. | 53 base::Thread v4l2_thread_; // Thread used for reading data from the device. |
| 54 | 54 |
| 55 const Name device_name_; | 55 const Name device_name_; |
| 56 | 56 |
| 57 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux); | 57 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceLinux); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace media | 60 } // namespace media |
| 61 | 61 |
| 62 #endif // MEDIA_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ | 62 #endif // DEVICE_CAPTURE_VIDEO_LINUX_VIDEO_CAPTURE_DEVICE_LINUX_H_ |
| OLD | NEW |