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> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/debug/trace_event.h" | |
15 #include "base/message_loop/message_loop_proxy.h" | 14 #include "base/message_loop/message_loop_proxy.h" |
16 #include "base/numerics/safe_conversions.h" | 15 #include "base/numerics/safe_conversions.h" |
| 16 #include "base/trace_event/trace_event.h" |
17 #include "content/common/gpu/media/v4l2_video_encode_accelerator.h" | 17 #include "content/common/gpu/media/v4l2_video_encode_accelerator.h" |
18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
19 #include "media/base/bitstream_buffer.h" | 19 #include "media/base/bitstream_buffer.h" |
20 | 20 |
21 #define NOTIFY_ERROR(x) \ | 21 #define NOTIFY_ERROR(x) \ |
22 do { \ | 22 do { \ |
23 LOG(ERROR) << "Setting error state:" << x; \ | 23 LOG(ERROR) << "Setting error state:" << x; \ |
24 SetErrorState(x); \ | 24 SetErrorState(x); \ |
25 } while (0) | 25 } while (0) |
26 | 26 |
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 reqbufs.count = 0; | 1145 reqbufs.count = 0; |
1146 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | 1146 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
1147 reqbufs.memory = V4L2_MEMORY_MMAP; | 1147 reqbufs.memory = V4L2_MEMORY_MMAP; |
1148 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); | 1148 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); |
1149 | 1149 |
1150 output_buffer_map_.clear(); | 1150 output_buffer_map_.clear(); |
1151 free_output_buffers_.clear(); | 1151 free_output_buffers_.clear(); |
1152 } | 1152 } |
1153 | 1153 |
1154 } // namespace content | 1154 } // namespace content |
OLD | NEW |