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

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

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
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 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_PROCESSOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_PROCESSOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_PROCESSOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_PROCESSOR_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void Process(const scoped_refptr<media::VideoFrame>& frame, 51 void Process(const scoped_refptr<media::VideoFrame>& frame,
52 const FrameReadyCB& cb); 52 const FrameReadyCB& cb);
53 53
54 // Stop all processing and clean up. 54 // Stop all processing and clean up.
55 void Destroy(); 55 void Destroy();
56 56
57 private: 57 private:
58 // Record for input buffers. 58 // Record for input buffers.
59 struct InputRecord { 59 struct InputRecord {
60 InputRecord(); 60 InputRecord();
61 ~InputRecord();
62 scoped_refptr<media::VideoFrame> frame; 61 scoped_refptr<media::VideoFrame> frame;
63 bool at_device; 62 bool at_device;
64 }; 63 };
65 64
66 // Record for output buffers. 65 // Record for output buffers.
67 struct OutputRecord { 66 struct OutputRecord {
68 OutputRecord(); 67 OutputRecord();
69 ~OutputRecord();
70 bool at_device; 68 bool at_device;
71 bool at_client; 69 bool at_client;
72 std::vector<int> fds; 70 std::vector<int> fds;
73 }; 71 };
74 72
75 // Job record. Jobs are processed in a FIFO order. This is separate from 73 // Job record. Jobs are processed in a FIFO order. This is separate from
76 // InputRecord, because an InputRecord may be returned before we dequeue 74 // InputRecord, because an InputRecord may be returned before we dequeue
77 // the corresponding output buffer. It can't always be associated with 75 // the corresponding output buffer. It can't always be associated with
78 // an OutputRecord immediately either, because at the time of submission we 76 // an OutputRecord immediately either, because at the time of submission we
79 // may not have one available (and don't need one to submit input to the 77 // may not have one available (and don't need one to submit input to the
80 // device). 78 // device).
81 struct JobRecord { 79 struct JobRecord {
82 JobRecord(); 80 JobRecord();
83 ~JobRecord();
84 scoped_refptr<media::VideoFrame> frame; 81 scoped_refptr<media::VideoFrame> frame;
85 FrameReadyCB ready_cb; 82 FrameReadyCB ready_cb;
86 }; 83 };
87 84
88 enum { 85 enum {
89 // Arbitrarily tuned. 86 // Arbitrarily tuned.
90 kInputBufferCount = 2, 87 kInputBufferCount = 2,
91 kOutputBufferCount = 2, 88 kOutputBufferCount = 2,
92 }; 89 };
93 90
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 168
172 // Weak factory for producing weak pointers on the device_thread_ 169 // Weak factory for producing weak pointers on the device_thread_
173 base::WeakPtrFactory<V4L2ImageProcessor> device_weak_factory_; 170 base::WeakPtrFactory<V4L2ImageProcessor> device_weak_factory_;
174 171
175 DISALLOW_COPY_AND_ASSIGN(V4L2ImageProcessor); 172 DISALLOW_COPY_AND_ASSIGN(V4L2ImageProcessor);
176 }; 173 };
177 174
178 } // namespace content 175 } // namespace content
179 176
180 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_PROCESSOR_H_ 177 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_PROCESSOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_encode_accelerator.cc ('k') | content/common/gpu/media/v4l2_image_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698