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 <fcntl.h> | 5 #include <fcntl.h> |
6 #include <linux/videodev2.h> | 6 #include <linux/videodev2.h> |
7 #include <poll.h> | 7 #include <poll.h> |
8 #include <sys/eventfd.h> | 8 #include <sys/eventfd.h> |
9 #include <sys/ioctl.h> | 9 #include <sys/ioctl.h> |
10 #include <sys/mman.h> | 10 #include <sys/mman.h> |
(...skipping 30 matching lines...) Expand all Loading... |
41 do { \ | 41 do { \ |
42 if (device_->Ioctl(type, arg) != 0) \ | 42 if (device_->Ioctl(type, arg) != 0) \ |
43 PLOG(ERROR) << __func__ << "(): ioctl() failed: " << #type; \ | 43 PLOG(ERROR) << __func__ << "(): ioctl() failed: " << #type; \ |
44 } while (0) | 44 } while (0) |
45 | 45 |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 V4L2ImageProcessor::InputRecord::InputRecord() : at_device(false) { | 48 V4L2ImageProcessor::InputRecord::InputRecord() : at_device(false) { |
49 } | 49 } |
50 | 50 |
51 V4L2ImageProcessor::InputRecord::~InputRecord() { | |
52 } | |
53 | |
54 V4L2ImageProcessor::OutputRecord::OutputRecord() | 51 V4L2ImageProcessor::OutputRecord::OutputRecord() |
55 : at_device(false), at_client(false) { | 52 : at_device(false), at_client(false) { |
56 } | 53 } |
57 | 54 |
58 V4L2ImageProcessor::OutputRecord::~OutputRecord() { | |
59 } | |
60 | |
61 V4L2ImageProcessor::JobRecord::JobRecord() { | 55 V4L2ImageProcessor::JobRecord::JobRecord() { |
62 } | 56 } |
63 | 57 |
64 V4L2ImageProcessor::JobRecord::~JobRecord() { | |
65 } | |
66 | |
67 V4L2ImageProcessor::V4L2ImageProcessor(scoped_ptr<V4L2Device> device) | 58 V4L2ImageProcessor::V4L2ImageProcessor(scoped_ptr<V4L2Device> device) |
68 : input_format_(media::VideoFrame::UNKNOWN), | 59 : input_format_(media::VideoFrame::UNKNOWN), |
69 output_format_(media::VideoFrame::UNKNOWN), | 60 output_format_(media::VideoFrame::UNKNOWN), |
70 input_format_fourcc_(0), | 61 input_format_fourcc_(0), |
71 output_format_fourcc_(0), | 62 output_format_fourcc_(0), |
72 input_planes_count_(0), | 63 input_planes_count_(0), |
73 output_planes_count_(0), | 64 output_planes_count_(0), |
74 child_message_loop_proxy_(base::MessageLoopProxy::current()), | 65 child_message_loop_proxy_(base::MessageLoopProxy::current()), |
75 device_(device.Pass()), | 66 device_(device.Pass()), |
76 device_thread_("V4L2ImageProcessorThread"), | 67 device_thread_("V4L2ImageProcessorThread"), |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 output_record.at_device = false; | 710 output_record.at_device = false; |
720 if (!output_record.at_client) | 711 if (!output_record.at_client) |
721 free_output_buffers_.push_back(i); | 712 free_output_buffers_.push_back(i); |
722 } | 713 } |
723 output_buffer_queued_count_ = 0; | 714 output_buffer_queued_count_ = 0; |
724 | 715 |
725 return true; | 716 return true; |
726 } | 717 } |
727 | 718 |
728 } // namespace content | 719 } // namespace content |
OLD | NEW |