Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: content/common/gpu/media/v4l2_video_encode_accelerator.cc

Issue 832383004: Revert of Support multiple video decoders and encoders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/gpu/media/v4l2_video_encode_accelerator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
65 V4L2VideoEncodeAccelerator::OutputRecord::OutputRecord() 62 V4L2VideoEncodeAccelerator::OutputRecord::OutputRecord()
66 : at_device(false), address(NULL), length(0) { 63 : at_device(false), address(NULL), length(0) {
67 } 64 }
68 65
69 V4L2VideoEncodeAccelerator::OutputRecord::~OutputRecord() {
70 }
71
72 V4L2VideoEncodeAccelerator::V4L2VideoEncodeAccelerator( 66 V4L2VideoEncodeAccelerator::V4L2VideoEncodeAccelerator(
73 scoped_ptr<V4L2Device> device) 67 scoped_ptr<V4L2Device> device)
74 : child_message_loop_proxy_(base::MessageLoopProxy::current()), 68 : child_message_loop_proxy_(base::MessageLoopProxy::current()),
75 output_buffer_byte_size_(0), 69 output_buffer_byte_size_(0),
76 device_input_format_(media::VideoFrame::UNKNOWN), 70 device_input_format_(media::VideoFrame::UNKNOWN),
77 input_planes_count_(0), 71 input_planes_count_(0),
78 output_format_fourcc_(0), 72 output_format_fourcc_(0),
79 encoder_state_(kUninitialized), 73 encoder_state_(kUninitialized),
80 stream_header_size_(0), 74 stream_header_size_(0),
81 device_(device.Pass()), 75 device_(device.Pass()),
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 reqbufs.count = 0; 1089 reqbufs.count = 0;
1096 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; 1090 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
1097 reqbufs.memory = V4L2_MEMORY_MMAP; 1091 reqbufs.memory = V4L2_MEMORY_MMAP;
1098 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); 1092 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs);
1099 1093
1100 output_buffer_map_.clear(); 1094 output_buffer_map_.clear();
1101 free_output_buffers_.clear(); 1095 free_output_buffers_.clear();
1102 } 1096 }
1103 1097
1104 } // namespace content 1098 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/v4l2_video_encode_accelerator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698