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

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

Issue 826663002: Support multiple video decoders and encoders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address piman's review comments 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
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 30 matching lines...) Expand all
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
51 V4L2ImageProcessor::OutputRecord::OutputRecord() 54 V4L2ImageProcessor::OutputRecord::OutputRecord()
52 : at_device(false), at_client(false) { 55 : at_device(false), at_client(false) {
53 } 56 }
54 57
58 V4L2ImageProcessor::OutputRecord::~OutputRecord() {
59 }
60
55 V4L2ImageProcessor::JobRecord::JobRecord() { 61 V4L2ImageProcessor::JobRecord::JobRecord() {
56 } 62 }
57 63
64 V4L2ImageProcessor::JobRecord::~JobRecord() {
65 }
66
58 V4L2ImageProcessor::V4L2ImageProcessor(scoped_ptr<V4L2Device> device) 67 V4L2ImageProcessor::V4L2ImageProcessor(scoped_ptr<V4L2Device> device)
59 : input_format_(media::VideoFrame::UNKNOWN), 68 : input_format_(media::VideoFrame::UNKNOWN),
60 output_format_(media::VideoFrame::UNKNOWN), 69 output_format_(media::VideoFrame::UNKNOWN),
61 input_format_fourcc_(0), 70 input_format_fourcc_(0),
62 output_format_fourcc_(0), 71 output_format_fourcc_(0),
63 input_planes_count_(0), 72 input_planes_count_(0),
64 output_planes_count_(0), 73 output_planes_count_(0),
65 child_message_loop_proxy_(base::MessageLoopProxy::current()), 74 child_message_loop_proxy_(base::MessageLoopProxy::current()),
66 device_(device.Pass()), 75 device_(device.Pass()),
67 device_thread_("V4L2ImageProcessorThread"), 76 device_thread_("V4L2ImageProcessorThread"),
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 output_record.at_device = false; 719 output_record.at_device = false;
711 if (!output_record.at_client) 720 if (!output_record.at_client)
712 free_output_buffers_.push_back(i); 721 free_output_buffers_.push_back(i);
713 } 722 }
714 output_buffer_queued_count_ = 0; 723 output_buffer_queued_count_ = 0;
715 724
716 return true; 725 return true;
717 } 726 }
718 727
719 } // namespace content 728 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/v4l2_image_processor.h ('k') | content/common/gpu/media/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698