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 #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 Loading... |
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(); | |
73 bool at_device; | 72 bool at_device; |
74 scoped_refptr<media::VideoFrame> frame; | 73 scoped_refptr<media::VideoFrame> frame; |
75 }; | 74 }; |
76 | 75 |
77 // Record for output buffers. | 76 // Record for output buffers. |
78 struct OutputRecord { | 77 struct OutputRecord { |
79 OutputRecord(); | 78 OutputRecord(); |
80 ~OutputRecord(); | |
81 bool at_device; | 79 bool at_device; |
82 linked_ptr<BitstreamBufferRef> buffer_ref; | 80 linked_ptr<BitstreamBufferRef> buffer_ref; |
83 void* address; | 81 void* address; |
84 size_t length; | 82 size_t length; |
85 }; | 83 }; |
86 | 84 |
87 enum { | 85 enum { |
88 kInitialFramerate = 30, | 86 kInitialFramerate = 30, |
89 // These are rather subjectively tuned. | 87 // These are rather subjectively tuned. |
90 kInputBufferCount = 2, | 88 kInputBufferCount = 2, |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // as both threads will not outlive this object. | 268 // as both threads will not outlive this object. |
271 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_; | 269 base::WeakPtr<V4L2VideoEncodeAccelerator> weak_this_; |
272 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_; | 270 base::WeakPtrFactory<V4L2VideoEncodeAccelerator> weak_this_ptr_factory_; |
273 | 271 |
274 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator); | 272 DISALLOW_COPY_AND_ASSIGN(V4L2VideoEncodeAccelerator); |
275 }; | 273 }; |
276 | 274 |
277 } // namespace content | 275 } // namespace content |
278 | 276 |
279 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ | 277 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_ |
OLD | NEW |