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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size) | 52 BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size) |
53 : id(id), shm(shm.Pass()), size(size) {} | 53 : id(id), shm(shm.Pass()), size(size) {} |
54 const int32 id; | 54 const int32 id; |
55 const scoped_ptr<base::SharedMemory> shm; | 55 const scoped_ptr<base::SharedMemory> shm; |
56 const size_t size; | 56 const size_t size; |
57 }; | 57 }; |
58 | 58 |
59 V4L2VideoEncodeAccelerator::InputRecord::InputRecord() : at_device(false) { | 59 V4L2VideoEncodeAccelerator::InputRecord::InputRecord() : at_device(false) { |
60 } | 60 } |
61 | 61 |
| 62 V4L2VideoEncodeAccelerator::InputRecord::~InputRecord() { |
| 63 } |
| 64 |
62 V4L2VideoEncodeAccelerator::OutputRecord::OutputRecord() | 65 V4L2VideoEncodeAccelerator::OutputRecord::OutputRecord() |
63 : at_device(false), address(NULL), length(0) { | 66 : at_device(false), address(NULL), length(0) { |
64 } | 67 } |
65 | 68 |
| 69 V4L2VideoEncodeAccelerator::OutputRecord::~OutputRecord() { |
| 70 } |
| 71 |
66 V4L2VideoEncodeAccelerator::V4L2VideoEncodeAccelerator( | 72 V4L2VideoEncodeAccelerator::V4L2VideoEncodeAccelerator( |
67 scoped_ptr<V4L2Device> device) | 73 scoped_ptr<V4L2Device> device) |
68 : child_message_loop_proxy_(base::MessageLoopProxy::current()), | 74 : child_message_loop_proxy_(base::MessageLoopProxy::current()), |
69 output_buffer_byte_size_(0), | 75 output_buffer_byte_size_(0), |
70 device_input_format_(media::VideoFrame::UNKNOWN), | 76 device_input_format_(media::VideoFrame::UNKNOWN), |
71 input_planes_count_(0), | 77 input_planes_count_(0), |
72 output_format_fourcc_(0), | 78 output_format_fourcc_(0), |
73 encoder_state_(kUninitialized), | 79 encoder_state_(kUninitialized), |
74 stream_header_size_(0), | 80 stream_header_size_(0), |
75 device_(device.Pass()), | 81 device_(device.Pass()), |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 reqbufs.count = 0; | 1095 reqbufs.count = 0; |
1090 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | 1096 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
1091 reqbufs.memory = V4L2_MEMORY_MMAP; | 1097 reqbufs.memory = V4L2_MEMORY_MMAP; |
1092 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); | 1098 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); |
1093 | 1099 |
1094 output_buffer_map_.clear(); | 1100 output_buffer_map_.clear(); |
1095 free_output_buffers_.clear(); | 1101 free_output_buffers_.clear(); |
1096 } | 1102 } |
1097 | 1103 |
1098 } // namespace content | 1104 } // namespace content |
OLD | NEW |