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

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: reveman@ comment: remove multiple textures. 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/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..ba7b3355581414f8de350244016e8e8a06d49e1d 100644
--- a/content/renderer/media/video_capture_impl.h
+++ b/content/renderer/media/video_capture_impl.h
@@ -84,20 +84,28 @@ class CONTENT_EXPORT VideoCaptureImpl
// Carries a shared memory for transferring video frames from browser to
// renderer.
class ClientBuffer;
+ // Carries GpuMemoryBuffers for transferring video frames from browser to
+ // renderer.
+ class ClientVideoCaptureBuffer;
reveman 2015/08/26 11:54:05 ClientBuffer2? I think the existing comment is suf
emircan 2015/08/26 21:23:12 Done.
// VideoCaptureMessageFilter::Delegate interface.
void OnBufferCreated(base::SharedMemoryHandle handle,
int length,
int buffer_id) override;
+ void OnBufferCreated2(
+ const std::vector<gfx::GpuMemoryBufferHandle>& gmb_handles,
reveman 2015/08/26 11:54:05 nit: s/gmb_handles/handles/
emircan 2015/08/26 21:23:12 Done.
+ 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_holders) override;
reveman 2015/08/26 11:54:05 why "holders??
emircan 2015/08/26 21:23:12 Done.
void OnStateChanged(VideoCaptureState state) override;
void OnDeviceSupportedFormatsEnumerated(
const media::VideoCaptureFormats& supported_formats) override;
@@ -107,10 +115,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<ClientVideoCaptureBuffer>& buffer,
+ uint32 release_sync_point,
+ double consumer_resource_utilization);
void StopDevice();
void RestartCapture();
@@ -147,8 +161,11 @@ 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<ClientVideoCaptureBuffer>>
+ ClientVideoCaptureBufferMap;
+ ClientVideoCaptureBufferMap client_video_capture_buffers_;
// Track information for the video capture client, consisting of parameters
// for capturing and callbacks to the client.

Powered by Google App Engine
This is Rietveld 408576698