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

Side by Side Diff: content/browser/renderer_host/media/video_capture_buffer_pool.h

Issue 1016773002: MJPEG acceleration for video capture using VAAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix coded size, shm handle Created 5 years, 9 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // ReserveForProducer(), and not already passed to HoldForConsumers(). 85 // ReserveForProducer(), and not already passed to HoldForConsumers().
86 void HoldForConsumers(int buffer_id, int num_clients); 86 void HoldForConsumers(int buffer_id, int num_clients);
87 87
88 // Indicate that one or more consumers are done with a particular buffer. This 88 // Indicate that one or more consumers are done with a particular buffer. This
89 // effectively is the opposite of HoldForConsumers(). Once the consumers are 89 // effectively is the opposite of HoldForConsumers(). Once the consumers are
90 // done, a buffer is returned to the pool for reuse. 90 // done, a buffer is returned to the pool for reuse.
91 void RelinquishConsumerHold(int buffer_id, int num_clients); 91 void RelinquishConsumerHold(int buffer_id, int num_clients);
92 92
93 int count() const { return count_; } 93 int count() const { return count_; }
94 94
95 base::SharedMemoryHandle GetBufferSharedMemory(int buffer_id);
96
95 private: 97 private:
96 friend class base::RefCountedThreadSafe<VideoCaptureBufferPool>; 98 friend class base::RefCountedThreadSafe<VideoCaptureBufferPool>;
97 99
98 // Per-buffer state. 100 // Per-buffer state.
99 struct Buffer { 101 struct Buffer {
100 Buffer(); 102 Buffer();
101 103
102 // The memory created to be shared with renderer processes. 104 // The memory created to be shared with renderer processes.
103 base::SharedMemory shared_memory; 105 base::SharedMemory shared_memory;
104 106
(...skipping 23 matching lines...) Expand all
128 130
129 // The buffers, indexed by |buffer_id|. 131 // The buffers, indexed by |buffer_id|.
130 BufferMap buffers_; 132 BufferMap buffers_;
131 133
132 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureBufferPool); 134 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureBufferPool);
133 }; 135 };
134 136
135 } // namespace content 137 } // namespace content
136 138
137 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_ 139 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698