| 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 #include "media/capture/video/linux/video_capture_device_linux.h" | 5 #include "media/capture/video/linux/video_capture_device_linux.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Gets a list of usable Four CC formats prioritized. | 31 // Gets a list of usable Four CC formats prioritized. |
| 32 // static | 32 // static |
| 33 std::list<uint32_t> VideoCaptureDeviceLinux::GetListOfUsableFourCCs( | 33 std::list<uint32_t> VideoCaptureDeviceLinux::GetListOfUsableFourCCs( |
| 34 bool favour_mjpeg) { | 34 bool favour_mjpeg) { |
| 35 return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg); | 35 return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg); |
| 36 } | 36 } |
| 37 | 37 |
| 38 VideoCaptureDeviceLinux::VideoCaptureDeviceLinux( | 38 VideoCaptureDeviceLinux::VideoCaptureDeviceLinux( |
| 39 const VideoCaptureDeviceDescriptor& device_descriptor) | 39 const VideoCaptureDeviceDescriptor& device_descriptor) |
| 40 : v4l2_thread_("V4L2CaptureThread"), | 40 : device_descriptor_(device_descriptor), |
| 41 device_descriptor_(device_descriptor) {} | 41 v4l2_thread_("V4L2CaptureThread") {} |
| 42 | 42 |
| 43 VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() { | 43 VideoCaptureDeviceLinux::~VideoCaptureDeviceLinux() { |
| 44 // Check if the thread is running. | 44 // Check if the thread is running. |
| 45 // This means that the device has not been StopAndDeAllocate()d properly. | 45 // This means that the device has not been StopAndDeAllocate()d properly. |
| 46 DCHECK(!v4l2_thread_.IsRunning()); | 46 DCHECK(!v4l2_thread_.IsRunning()); |
| 47 v4l2_thread_.Stop(); | 47 v4l2_thread_.Stop(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void VideoCaptureDeviceLinux::AllocateAndStart( | 50 void VideoCaptureDeviceLinux::AllocateAndStart( |
| 51 const VideoCaptureParams& params, | 51 const VideoCaptureParams& params, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return V4L2_CID_POWER_LINE_FREQUENCY_50HZ; | 127 return V4L2_CID_POWER_LINE_FREQUENCY_50HZ; |
| 128 case media::PowerLineFrequency::FREQUENCY_60HZ: | 128 case media::PowerLineFrequency::FREQUENCY_60HZ: |
| 129 return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; | 129 return V4L2_CID_POWER_LINE_FREQUENCY_60HZ; |
| 130 default: | 130 default: |
| 131 // If we have no idea of the frequency, at least try and set it to AUTO. | 131 // If we have no idea of the frequency, at least try and set it to AUTO. |
| 132 return V4L2_CID_POWER_LINE_FREQUENCY_AUTO; | 132 return V4L2_CID_POWER_LINE_FREQUENCY_AUTO; |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace media | 136 } // namespace media |
| OLD | NEW |