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

Unified Diff: content/renderer/media/video_capture_impl.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
« no previous file with comments | « content/common/media/video_capture_messages.h ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl.h
diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h
index e03a2fb1a2d466a9986e2b8228db83ed9acf35a1..df077c999e9d2bda3353bffe008ef651f214d9e1 100644
--- a/content/renderer/media/video_capture_impl.h
+++ b/content/renderer/media/video_capture_impl.h
@@ -84,20 +84,25 @@ class CONTENT_EXPORT VideoCaptureImpl
// Carries a shared memory for transferring video frames from browser to
// renderer.
class ClientBuffer;
+ class ClientBuffer2;
// VideoCaptureMessageFilter::Delegate interface.
void OnBufferCreated(base::SharedMemoryHandle handle,
int length,
int buffer_id) override;
+ void OnBufferCreated2(const std::vector<gfx::GpuMemoryBufferHandle>& handles,
+ const gfx::Size& size,
+ int buffer_id) override;
void OnBufferDestroyed(int buffer_id) override;
- void OnBufferReceived(int buffer_id,
- base::TimeTicks timestamp,
- const base::DictionaryValue& metadata,
- media::VideoPixelFormat pixel_format,
- media::VideoFrame::StorageType storage_type,
- const gfx::Size& coded_size,
- const gfx::Rect& visible_rect,
- const gpu::MailboxHolder& mailbox_holder) override;
+ void OnBufferReceived(
+ int buffer_id,
+ base::TimeTicks timestamp,
+ const base::DictionaryValue& metadata,
+ media::VideoPixelFormat pixel_format,
+ media::VideoFrame::StorageType storage_type,
+ const gfx::Size& coded_size,
+ const gfx::Rect& visible_rect,
+ const gpu::MailboxHolder& mailbox_holder) override;
void OnStateChanged(VideoCaptureState state) override;
void OnDeviceSupportedFormatsEnumerated(
const media::VideoCaptureFormats& supported_formats) override;
@@ -107,10 +112,16 @@ class CONTENT_EXPORT VideoCaptureImpl
// Sends an IPC message to browser process when all clients are done with the
// buffer.
- void OnClientBufferFinished(int buffer_id,
- const scoped_refptr<ClientBuffer>& buffer,
- uint32 release_sync_point,
- double consumer_resource_utilization);
+ void OnClientBufferFinished(
+ int buffer_id,
+ const scoped_refptr<ClientBuffer>& buffer,
+ uint32 release_sync_point,
+ double consumer_resource_utilization);
+ void OnClientBufferFinished2(
+ int buffer_id,
+ const scoped_refptr<ClientBuffer2>& buffer,
+ uint32 release_sync_point,
+ double consumer_resource_utilization);
void StopDevice();
void RestartCapture();
@@ -147,8 +158,10 @@ class CONTENT_EXPORT VideoCaptureImpl
std::vector<VideoCaptureDeviceFormatsCB> device_formats_in_use_cb_queue_;
// Buffers available for sending to the client.
- typedef std::map<int32, scoped_refptr<ClientBuffer> > ClientBufferMap;
+ typedef std::map<int32, scoped_refptr<ClientBuffer>> ClientBufferMap;
ClientBufferMap client_buffers_;
+ typedef std::map<int32, scoped_refptr<ClientBuffer2>> ClientBuffer2Map;
+ ClientBuffer2Map client_buffer2s_;
// Track information for the video capture client, consisting of parameters
// for capturing and callbacks to the client.
« no previous file with comments | « content/common/media/video_capture_messages.h ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698