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

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

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 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <linux/videodev2.h> 9 #include <linux/videodev2.h>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual void Destroy() override; 62 virtual void Destroy() override;
63 63
64 private: 64 private:
65 // Auto-destroy reference for BitstreamBuffer, for tracking buffers passed to 65 // Auto-destroy reference for BitstreamBuffer, for tracking buffers passed to
66 // this instance. 66 // this instance.
67 struct BitstreamBufferRef; 67 struct BitstreamBufferRef;
68 68
69 // Record for codec input buffers. 69 // Record for codec input buffers.
70 struct InputRecord { 70 struct InputRecord {
71 InputRecord(); 71 InputRecord();
72 ~InputRecord();
72 bool at_device; 73 bool at_device;
73 scoped_refptr<media::VideoFrame> frame; 74 scoped_refptr<media::VideoFrame> frame;
74 }; 75 };
75 76
76 // Record for output buffers. 77 // Record for output buffers.
77 struct OutputRecord { 78 struct OutputRecord {
78 OutputRecord(); 79 OutputRecord();
80 ~OutputRecord();
79 bool at_device; 81 bool at_device;
80 linked_ptr<BitstreamBufferRef> buffer_ref; 82 linked_ptr<BitstreamBufferRef> buffer_ref;
81 void* address; 83 void* address;
82 size_t length; 84 size_t length;
83 }; 85 };
84 86
85 enum { 87 enum {
86 kInitialFramerate = 30, 88 kInitialFramerate = 30,
87 // These are rather subjectively tuned. 89 // These are rather subjectively tuned.
88 kInputBufferCount = 2, 90 kInputBufferCount = 2,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // as both threads will not outlive this object. 270 // as both threads will not outlive this object.
269 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_; 271 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_;
270 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_; 272 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_;
271 273
272 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator); 274 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator);
273 }; 275 };
274 276
275 } // namespace content 277 } // namespace content
276 278
277 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ 279 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/v4l2_video_device.cc ('k') | content/common/gpu/media/v4l2_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698