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

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: reuse VASurface Created 5 years, 7 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 public: 45 public:
46 static const int kInvalidId; 46 static const int kInvalidId;
47 47
48 // Abstraction of a pool's buffer data buffer and size for clients. 48 // Abstraction of a pool's buffer data buffer and size for clients.
49 class BufferHandle { 49 class BufferHandle {
50 public: 50 public:
51 virtual ~BufferHandle() {} 51 virtual ~BufferHandle() {}
52 virtual size_t size() const = 0; 52 virtual size_t size() const = 0;
53 virtual void* data() = 0; 53 virtual void* data() = 0;
54 virtual ClientBuffer AsClientBuffer() = 0; 54 virtual ClientBuffer AsClientBuffer() = 0;
55 virtual base::SharedMemoryHandle AsPlatformHandle() = 0;
55 }; 56 };
56 57
57 explicit VideoCaptureBufferPool(int count); 58 explicit VideoCaptureBufferPool(int count);
58 59
59 // One-time (per client/per-buffer) initialization to share a particular 60 // One-time (per client/per-buffer) initialization to share a particular
60 // buffer to a process. The size of the allocation is returned as 61 // buffer to a process. The size of the allocation is returned as
61 // |memory_size|. 62 // |memory_size|.
62 base::SharedMemoryHandle ShareToProcess(int buffer_id, 63 base::SharedMemoryHandle ShareToProcess(int buffer_id,
63 base::ProcessHandle process_handle, 64 base::ProcessHandle process_handle,
64 size_t* memory_size); 65 size_t* memory_size);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // The buffers, indexed by the first parameter, a buffer id. 158 // The buffers, indexed by the first parameter, a buffer id.
158 using TrackerMap = std::map<int, Tracker*>; 159 using TrackerMap = std::map<int, Tracker*>;
159 TrackerMap trackers_; 160 TrackerMap trackers_;
160 161
161 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureBufferPool); 162 DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureBufferPool);
162 }; 163 };
163 164
164 } // namespace content 165 } // namespace content
165 166
166 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_ 167 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698