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

Unified Diff: content/browser/renderer_host/media/video_capture_buffer_pool.h

Issue 1267883002: Pass GpuMemoryBuffer backed VideoFrame from browser to renderer processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmbtracker-multiple
Patch Set: Rebase Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_buffer_pool.h
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.h b/content/browser/renderer_host/media/video_capture_buffer_pool.h
index 16f5bff5e0d1e7c8487856cd0abe165072ff49bf..44d55f3cc50a9dca8c59292592e24052facefb88 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.h
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.h
@@ -51,7 +51,8 @@ class CONTENT_EXPORT VideoCaptureBufferPool
class BufferHandle {
public:
virtual ~BufferHandle() {}
- virtual size_t size() const = 0;
+ virtual gfx::Size dimensions() const = 0;
+ virtual size_t mapped_size() const = 0;
virtual void* data(int plane) = 0;
virtual ClientBuffer AsClientBuffer(int plane) = 0;
#if defined(OS_POSIX)
@@ -62,11 +63,14 @@ class CONTENT_EXPORT VideoCaptureBufferPool
explicit VideoCaptureBufferPool(int count);
// One-time (per client/per-buffer) initialization to share a particular
- // buffer to a process. The size of the allocation is returned as
- // |memory_size|.
- base::SharedMemoryHandle ShareToProcess(int buffer_id,
- base::ProcessHandle process_handle,
- size_t* memory_size);
+ // buffer to a process. The shared handle is returned as |new_handle|.
+ bool ShareToProcess(int buffer_id,
+ base::ProcessHandle process_handle,
+ base::SharedMemoryHandle* new_handle);
+ bool ShareToProcess2(int buffer_id,
+ int plane,
+ base::ProcessHandle process_handle,
+ gfx::GpuMemoryBufferHandle* new_handle);
// Try and obtain a BufferHandle for |buffer_id|.
scoped_ptr<BufferHandle> GetBufferHandle(int buffer_id);
@@ -144,11 +148,12 @@ class CONTENT_EXPORT VideoCaptureBufferPool
// Returns a handle to the underlying storage, be that a block of Shared
// Memory, or a GpuMemoryBuffer.
virtual scoped_ptr<BufferHandle> GetBufferHandle() = 0;
- // The actual size of the underlying backing resource.
- virtual size_t mapped_size() const = 0;
virtual bool ShareToProcess(base::ProcessHandle process_handle,
base::SharedMemoryHandle* new_handle) = 0;
+ virtual bool ShareToProcess2(int plane,
+ base::ProcessHandle process_handle,
+ gfx::GpuMemoryBufferHandle* new_handle) = 0;
private:
size_t pixel_count_;

Powered by Google App Engine
This is Rietveld 408576698